Skip to content

Commit

Permalink
version 0.1 pub
Browse files Browse the repository at this point in the history
  • Loading branch information
Lr-2002 committed Jan 21, 2024
1 parent f823420 commit 6c9396f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions scripts/play.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

fps=15
header=0
reconstruction=0
reconstruction=1
save_mode=0
mode="agent_in_env"

Expand Down Expand Up @@ -37,4 +37,5 @@ while [ "$1" != "" ]; do
shift
done

python src/play.py hydra.run.dir=. hydra.output_subdir=null +mode="${mode}" +fps="${fps}" +header="${header}" +reconstruction="${reconstruction}" +save_mode="${save_mode}"
python src/play.py hydra.run.dir=. hydra.output_subdir=null train +mode="${mode}" +fps="${fps}" +header="${header}" +reconstruction="${reconstruction}" +save_mode="${save_mode}"
#python src/play.py env.train.id=homegrid-task hydra.run.dir=. hydra.output_subdir=null +mode="play_in_world_model" +fps="15" +header="1" +reconstruction="1" +save_mode="1"
2 changes: 1 addition & 1 deletion src/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def main(cfg: DictConfig):
config=instantiate(cfg.world_model))
actor_critic = ActorCritic(**cfg.actor_critic, act_vocab_size=test_env.num_actions)
agent = Agent(tokenizer, world_model, actor_critic).to(device)
agent.load(Path('/root/root/iris/outputs/2024-01-17/16-47-18/checkpoints/last.pt'), device)
agent.load(Path('/root/iris/outputs/2024-01-20/14-49-13/checkpoints/last.pt'), device)

if cfg.mode == 'play_in_world_model':
env = WorldModelEnv(tokenizer=agent.tokenizer, world_model=agent.world_model, device=device, env=env_fn())
Expand Down

0 comments on commit 6c9396f

Please sign in to comment.