Skip to content

Fix the RNN encoder [Bug #12 and #13]#32

Open
CeyaoZhang wants to merge 2 commits intokaterakelly:masterfrom
CeyaoZhang:master
Open

Fix the RNN encoder [Bug #12 and #13]#32
CeyaoZhang wants to merge 2 commits intokaterakelly:masterfrom
CeyaoZhang:master

Conversation

@CeyaoZhang
Copy link

modified:   rlkit/core/rl_algorithm.py

By adding self.agent.clear_z() after

self.env.reset_task(idx)

RNN hidden state will be reset and corresponds to the one task set in the evaluate fun.

modified:   launch_experiment.py

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.

modified:   rlkit/launchers/launcher_util.py

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

new file:   run.sh

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

    modified:   rlkit/core/rl_algorithm.py

By adding `self.agent.clear_z()` after the line 419 of
**rlkit/core/rl_algorithm.py**. The RNN hidden state will be reset
and corresponds to the one task setting in the `evaluate` func.

    modified:   launch_experiment.py

I add two click.option, which allows you to run the PEARL with *rnn/mlp*
encoder network and *traj/tran* context.

I also add seed option to launch experiment with different seed.
The default one is 0.

    modified:   rlkit/launchers/launcher_util.py

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

    new file:   run.sh

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant