这是indexloc提供的服务,不要输入任何密码
Skip to content

fix vecenv action_space randomness #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 1, 2021

Conversation

Trinkle23897
Copy link
Collaborator

fix #299

@codecov-io
Copy link

codecov-io commented Feb 28, 2021

Codecov Report

Merging #300 (0ef3b9a) into dev (f22b539) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #300      +/-   ##
==========================================
+ Coverage   93.91%   93.92%   +0.01%     
==========================================
  Files          47       47              
  Lines        3235     3242       +7     
==========================================
+ Hits         3038     3045       +7     
  Misses        197      197              
Flag Coverage Δ
unittests 93.92% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tianshou/data/buffer.py 93.29% <100.00%> (ø)
tianshou/env/venvs.py 93.89% <100.00%> (+0.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f22b539...0ef3b9a. Read the comment docs.

@Trinkle23897 Trinkle23897 changed the title fix action_space randomness fix vecenv action_space randomness Feb 28, 2021
@ChenDRAG
Copy link
Collaborator

There perhaps is another way to do this: In collector, set seed for self._action_spcae rather than train_envs. Both seems okay to me.

@Trinkle23897
Copy link
Collaborator Author

Trinkle23897 commented Feb 28, 2021

There perhaps is another way to do this: In collector, set seed for self._action_spcae rather than train_envs. Both seems okay to me.

However you need to first figure out what seed is used in VecEnv, extract it and send it to action_space inside the Collector. From the current API, that approach is impossible.

@Trinkle23897 Trinkle23897 requested a review from ChenDRAG March 1, 2021 04:59
@Trinkle23897 Trinkle23897 merged commit 31e7f44 into thu-ml:dev Mar 1, 2021
@Trinkle23897 Trinkle23897 deleted the fix-vecenv-action_space-seed branch March 1, 2021 07:44
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
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.

action_space in SubprocVectorEnv make it harder to reproduce result.
3 participants