Fix the RNN encoder [Bug #12 and #13] #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By adding
self.agent.clear_z()
afteroyster/rlkit/core/rl_algorithm.py
Line 419 in 44e20fd
RNN hidden state will be reset and corresponds to the one task set in the
evaluate
fun.I add two click.option, which allows you to run the PEARL with rnn/mlp encoder network and traj/tran context.
I also add a seed option to launch experiments with different seeds. The default one is 0.
I restructure the output file by adding rnn/mlp, traj/tran and seed options in the exp name file. For example,
The previous result path is: output/cheetah-dir/2022_11_30_08_07_43
The current one: output/cheetah-dir/2022_11_30_08_28_57-rnn-tran-sd1
If you want to run experiments, just check and run the run.sh.
Changes to be committed:
modified: .gitignore
modified: configs/default.py
modified: launch_experiment.py
modified: rlkit/core/rl_algorithm.py
modified: rlkit/data_management/simple_replay_buffer.py
modified: rlkit/launchers/launcher_util.py
modified: rlkit/torch/sac/sac.py
new file: run.sh