diff --git a/.vscode/launch.json b/.vscode/launch.json index dbe115f..4554801 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -19,8 +19,8 @@ "env.train.id=CrafterReward-v1", // # make it start early "training.tokenizer.start_after_epochs=1", - "training.world_model.start_after_epochs=1", - "training.actor_critic.start_after_epochs=1", + "training.world_model.start_after_epochs=2", + "training.actor_critic.start_after_epochs=3", "training.tokenizer.steps_per_epoch=10", "training.world_model.steps_per_epoch=10", "training.actor_critic.steps_per_epoch=10", diff --git a/research_journal.md b/research_journal.md index fd40272..eac579f 100644 --- a/research_journal.md +++ b/research_journal.md @@ -345,9 +345,6 @@ Why is it not learning? It's because the dynamics model is total BS!!! # 2023-11-19 06:45:34 So I tried just trainign the world model for 200 epochs. And with a post_embedding layer. It helped the flickering. But not enougth to actually go for the obvious local minima of the next state equals the last - - - idea - bypass embedding?, but wait dreamerv3 needed quant z... @@ -357,3 +354,7 @@ idea ok we need to freeze it, and change dtype +OK it seems slightly better yay! Lets train it overnight and see + +next idea is to the delta-IRIS thing where the tokens only have to encode the diff(obs) + diff --git a/scripts/play.sh b/scripts/play.sh index 967db60..45fed21 100755 --- a/scripts/play.sh +++ b/scripts/play.sh @@ -27,6 +27,7 @@ while [ "$1" != "" ]; do -e | --episode ) mode="episode_replay" ;; # replay train, test, or imagined episodes. shows quality of dynamics model + # this is quick low resource way to check the dynamics model and agent while training -w | --world-model ) mode="play_in_world_model" ;; # human plays in world model @@ -37,4 +38,4 @@ while [ "$1" != "" ]; do shift done -python -m pdb 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 +mode="${mode}" +fps="${fps}" +header="${header}" +reconstruction="${reconstruction}" +save_mode="${save_mode}" diff --git a/src/trainer.py b/src/trainer.py index 2b4e1b5..6c3b8f0 100644 --- a/src/trainer.py +++ b/src/trainer.py @@ -200,7 +200,7 @@ class Trainer: if epoch > cfg_world_model.start_after_epochs: metrics_world_model = self.eval_component(self.agent.world_model, cfg_world_model.batch_num_samples, sequence_length=self.cfg.common.sequence_length, tokenizer=self.agent.tokenizer) - if epoch > cfg_actor_critic.start_after_epochs: + if epoch > cfg_world_model.start_after_epochs: self.inspect_imagination(epoch) if cfg_tokenizer.save_reconstructions: