This is the third PR of 6 commits mentioned in #274, which features refactor of Collector to fix #245. You can check #274 for more detail. Things changed in this PR: 1. refactor collector to be more cleaner, split AsyncCollector to support asyncvenv; 2. change buffer.add api to add(batch, bffer_ids); add several types of buffer (VectorReplayBuffer, PrioritizedVectorReplayBuffer, etc.) 3. add policy.exploration_noise(act, batch) -> act 4. small change in BasePolicy.compute_*_returns 5. move reward_metric from collector to trainer 6. fix np.asanyarray issue (different version's numpy will result in different output) 7. flake8 maxlength=88 8. polish docs and fix test Co-authored-by: n+e <trinkle23897@gmail.com>
37 lines
658 B
INI
37 lines
658 B
INI
[flake8]
|
|
exclude =
|
|
.git
|
|
log
|
|
__pycache__
|
|
docs
|
|
build
|
|
dist
|
|
*.egg-info
|
|
max-line-length = 87
|
|
|
|
[mypy]
|
|
files = tianshou/**/*.py
|
|
allow_redefinition = True
|
|
check_untyped_defs = True
|
|
disallow_incomplete_defs = True
|
|
disallow_untyped_defs = True
|
|
ignore_missing_imports = True
|
|
no_implicit_optional = True
|
|
pretty = True
|
|
show_error_codes = True
|
|
show_error_context = True
|
|
show_traceback = True
|
|
strict_equality = True
|
|
strict_optional = True
|
|
warn_no_return = True
|
|
warn_redundant_casts = True
|
|
warn_unreachable = True
|
|
warn_unused_configs = True
|
|
warn_unused_ignores = True
|
|
|
|
[pydocstyle]
|
|
ignore = D100,D102,D104,D105,D107,D203,D213,D401,D402
|
|
|
|
[doc8]
|
|
max-line-length = 1000
|