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

Changes for release 1.2.0 (v1 release with fixes/improvements backported from v2) #1258

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 58 commits into from
Jun 23, 2025

Conversation

opcode81
Copy link
Collaborator

@opcode81 opcode81 commented May 15, 2025

See change log

Closes: #1225 #1265

opcode81 and others added 30 commits March 4, 2025 19:46
… spaces

and allow coefficient to be modified, adding an informative docstring
(previous implementation was reasonable only for continuous action spaces)

Adjust parametrisation to match procedural example in atari_sac_hl
… in NPG and TRPO

 * Parameter optim must not include the actor parameters (as they are updated
   via natural gradients that are computed internally)
 * Fix incorrect optimizer instantiation in high-level API
…to running the trainer,

yet recently introduced parameter `reset_prior_to_run` of `run` suggested that it was optional.
But it was not respected, because `__iter__` would always call `reset(reset_collectors=True, reset_buffer=False)`
regardless. The parameter was removed; instead, the parameters of `run` now mirror the parameters of `reset`,
and the implicit `reset` call in `__iter__` was removed.
This aligns with upcoming changes in Tianshou v2.0.0.
responsible for creating the snapshot(s) on the original branch and then
compare with results on a modified branch.

Add writing of a log file for determinism tests.
Fix some broken tests that directly used the trainer's iterator instead of using run():
  * test/continuous/test_ppo
  * test/continuous/test_td3
@codecov-commenter
Copy link

codecov-commenter commented May 19, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 50.65359% with 151 lines in your changes missing coverage. Please review.

Project coverage is 84.10%. Comparing base (14b97ea) to head (fd93ab3).

Files with missing lines Patch % Lines
tianshou/utils/determinism.py 31.97% 117 Missing ⚠️
tianshou/trainer/base.py 63.63% 12 Missing ⚠️
tianshou/evaluation/rliable_evaluation_hl.py 0.00% 11 Missing ⚠️
tianshou/highlevel/params/alpha.py 16.66% 5 Missing ⚠️
tianshou/highlevel/agent.py 85.71% 2 Missing ⚠️
tianshou/highlevel/env.py 93.75% 2 Missing ⚠️
tianshou/data/buffer/her.py 75.00% 1 Missing ⚠️
tianshou/highlevel/experiment.py 50.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1258      +/-   ##
==========================================
- Coverage   85.28%   84.10%   -1.18%     
==========================================
  Files         102      104       +2     
  Lines        9083     9328     +245     
==========================================
+ Hits         7746     7845      +99     
- Misses       1337     1483     +146     
Flag Coverage Δ
unittests 84.10% <50.65%> (-1.18%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

MischaPanch and others added 6 commits May 19, 2025 13:41
Slightly enhanced docstrings in collector
The mechanism introduced in v1.1.0 was completely revised:
  - The `train_seed` and `test_seed` attributes were removed from `SamplingConfig`.
    Instead, the seeds are derived from the seed defined in `ExperimentConfig`.
  - Seed attributes of `EnvFactory` classes were removed.
    Instead, seeds are passed to methods of `EnvFactory`.
@MischaPanch MischaPanch marked this pull request as ready for review June 23, 2025 11:55
@MischaPanch MischaPanch merged commit f637a4d into master Jun 23, 2025
@MischaPanch MischaPanch deleted the dev-v1 branch June 23, 2025 11:57
@opcode81 opcode81 restored the dev-v1 branch June 27, 2025 14:19
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.

Major Performance Decrease in Tianshou 1.2 Compared to 0.5 on Windows and Linux
3 participants