Skip to content
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

Add Trainers as generators #559

Merged
merged 46 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8bad065
add docstring :param buffer to offline_trainer in offline.py
jamartinh Mar 5, 2022
ff9c0c9
Add param yield_epoch to trainers. if True, converts the function int…
jamartinh Mar 5, 2022
2b72992
Add trainer geneators for offline.py, offpolicy.py and onpolicy.py .
jamartinh Mar 5, 2022
9a6a72b
fix PEP8
jamartinh Mar 5, 2022
d05f0e0
fix PEP8
jamartinh Mar 5, 2022
5566be0
fix PEP8
jamartinh Mar 5, 2022
185c006
fix yapf
jamartinh Mar 5, 2022
79f050a
removed comments in format section of Makefile. It produces errors on…
jamartinh Mar 5, 2022
4cbc7c8
fix isort
jamartinh Mar 5, 2022
ffbe30a
fix rare error with dict with mypy
jamartinh Mar 5, 2022
23f00d2
fix rare error with dict with mypy
jamartinh Mar 5, 2022
f64eb2d
fix docstrings
jamartinh Mar 5, 2022
b6b0ed7
refactored offline.py to one iterator class
jamartinh Mar 6, 2022
0f39eac
drop test_sac_with_il_trainer_generator.py
jamartinh Mar 6, 2022
21cdbe6
improve offline.py with best practices on exhausting iterator and cle…
jamartinh Mar 6, 2022
2483dea
Create an Iterator class instead of a generator function, following t…
jamartinh Mar 6, 2022
88cb63c
Expose new _iter versions and Iterator Classes
jamartinh Mar 6, 2022
34feb5b
Add OffPolicyTrainer as Iterator adn add testing in test_td3.py
jamartinh Mar 6, 2022
1c7eaef
fix doc format
jamartinh Mar 6, 2022
4067428
Merge branch 'master' into trainers_as_generators
Trinkle23897 Mar 8, 2022
5ca6fb8
* Refactored trainers into One BaseTrainer class.
jamartinh Mar 8, 2022
d705744
Merge remote-tracking branch 'jamh/trainers_as_generators' into train…
jamartinh Mar 8, 2022
b4fa395
fix formatting
jamartinh Mar 8, 2022
91c787c
Merge remote-tracking branch 'origin/master' into trainers_as_generators
Trinkle23897 Mar 8, 2022
c1f5f25
docs
Trinkle23897 Mar 8, 2022
b12beb1
fix missing import
Trinkle23897 Mar 9, 2022
a4ae2e3
* fix formatting
jamartinh Mar 12, 2022
0690d12
Merge branch 'thu-ml:master' into trainers_as_generators
jamartinh Mar 12, 2022
e2756f0
Merge branch 'master' into trainers_as_generators
Trinkle23897 Mar 12, 2022
c902d61
update docs
Trinkle23897 Mar 12, 2022
a3e7e2c
update rst
Trinkle23897 Mar 12, 2022
651726f
fix early stopping during train [train_step]
jamartinh Mar 12, 2022
e6b00e2
* fix early stopping during train train_step
jamartinh Mar 12, 2022
4d76843
* fix early stopping during train train_step
jamartinh Mar 12, 2022
23ce483
* fix early stopping during train train_step
jamartinh Mar 12, 2022
1d707f8
* fix early stopping during train train_step
jamartinh Mar 13, 2022
479b794
* fix early stopping during train train_step
jamartinh Mar 13, 2022
3adf0e1
Merge branch 'master' into trainers_as_generators
Trinkle23897 Mar 16, 2022
08f65a6
fix a bug in BaseTrainer.run return value missing
Trinkle23897 Mar 16, 2022
5ec4eb3
change seed to pass ci
Trinkle23897 Mar 16, 2022
89ce44f
learning_type: str
Trinkle23897 Mar 16, 2022
a320e68
fix ci
Trinkle23897 Mar 16, 2022
6df9365
reorg some code
Trinkle23897 Mar 17, 2022
7a00daf
revert
Trinkle23897 Mar 17, 2022
3ce4f6d
missing docs for on-policy trainer
Trinkle23897 Mar 17, 2022
a62cf84
missing docs
Trinkle23897 Mar 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix docstrings
  • Loading branch information
jamartinh committed Mar 5, 2022
commit f64eb2dad6a7a0d573630680fb1f8b0ecf3c295c
3 changes: 2 additions & 1 deletion tianshou/trainer/offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ def offline_trainer_generator(
logger: BaseLogger = LazyLogger(),
verbose: bool = True,
) -> Generator[Tuple[int, Dict[str, Any], Dict[str, Any]], None, None]:
"""A wrapper for offline trainer procedure.
"""A generator wrapper for offline trainer procedure.

Returns a generator that yields a 3-tuple (epoch, stats, info) of train results
on every epoch.

Expand Down
3 changes: 2 additions & 1 deletion tianshou/trainer/offpolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ def offpolicy_trainer_generator(
verbose: bool = True,
test_in_train: bool = True,
) -> Generator[Tuple[int, Dict[str, Any], Dict[str, Any]], None, None]:
"""A wrapper for off-policy trainer procedure.
"""A generator wrapper for off-policy trainer procedure.

Returns a generator that yields a 3-tuple (epoch, stats, info) of train results
on every epoch.

Expand Down
3 changes: 2 additions & 1 deletion tianshou/trainer/onpolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ def onpolicy_trainer_generator(
verbose: bool = True,
test_in_train: bool = True,
) -> Generator[Tuple[int, Dict[str, Any], Dict[str, Any]], None, None]:
"""A wrapper for on-policy trainer procedure.
"""A generator wrapper for on-policy trainer procedure.

Returns a generator that yields a 3-tuple (epoch, stats, info) of train results
on every epoch.

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy