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

Draft
wants to merge 56 commits into
base: master
Choose a base branch
from

Conversation

opcode81
Copy link
Collaborator

See change log

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 49.15254% with 150 lines in your changes missing coverage. Please review.

Project coverage is 84.09%. Comparing base (14b97ea) to head (0db2e74).

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/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.09%   -1.19%     
==========================================
  Files         102      104       +2     
  Lines        9083     9327     +244     
==========================================
+ Hits         7746     7844      +98     
- Misses       1337     1483     +146     
Flag Coverage Δ
unittests 84.09% <49.15%> (-1.19%) ⬇️

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`.
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.

3 participants