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

fix docs and add docstring check #210

Merged
merged 3 commits into from Sep 10, 2020
Merged

fix docs and add docstring check #210

merged 3 commits into from Sep 10, 2020

Conversation

Trinkle23897
Copy link
Collaborator

@Trinkle23897 Trinkle23897 commented Sep 10, 2020

cherry-pick from #200.

  • fix broken links and out-of-the-date content
  • add pydocstyle and doc8 check
  • remove collector.seed and collector.render

@codecov-commenter
Copy link

Codecov Report

Merging #210 into master will increase coverage by 0.05%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #210      +/-   ##
==========================================
+ Coverage   94.05%   94.11%   +0.05%     
==========================================
  Files          40       40              
  Lines        2457     2448       -9     
==========================================
- Hits         2311     2304       -7     
+ Misses        146      144       -2     
Flag Coverage Δ
#unittests 94.11% <87.50%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
tianshou/data/collector.py 91.84% <0.00%> (+0.35%) ⬆️
tianshou/data/utils/converter.py 100.00% <ø> (ø)
tianshou/data/utils/segtree.py 65.62% <ø> (ø)
tianshou/env/maenv.py 84.61% <ø> (ø)
tianshou/env/utils.py 75.00% <ø> (ø)
tianshou/env/venvs.py 92.91% <ø> (ø)
tianshou/env/worker/base.py 75.00% <ø> (ø)
tianshou/env/worker/dummy.py 91.30% <ø> (ø)
tianshou/env/worker/subproc.py 91.15% <ø> (ø)
tianshou/exploration/random.py 97.29% <ø> (ø)
... and 20 more

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 64af7ea...ed61f92. Read the comment docs.

duburcqa
duburcqa previously approved these changes Sep 10, 2020
Copy link
Collaborator

@duburcqa duburcqa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with review.

.github/workflows/lint_and_docs.yml Show resolved Hide resolved
docs/contributing.rst Outdated Show resolved Hide resolved
docs/tutorials/cheatsheet.rst Outdated Show resolved Hide resolved
docs/tutorials/concepts.rst Outdated Show resolved Hide resolved
docs/tutorials/concepts.rst Outdated Show resolved Hide resolved
@@ -83,29 +87,32 @@ Tianshou supports any user-defined PyTorch networks and optimizers but with the
net = Net(state_shape, action_shape)
optim = torch.optim.Adam(net.parameters(), lr=1e-3)

You can also have a try with those pre-defined networks in :mod:`~tianshou.utils.net.common`, :mod:`~tianshou.utils.net.discrete`, and :mod:`~tianshou.utils.net.continuous`. The rules of self-defined networks are:
You can have a try with those pre-defined networks in :mod:`~tianshou.utils.net.common`, :mod:`~tianshou.utils.net.discrete`, and :mod:`~tianshou.utils.net.continuous`. The rules of self-defined networks are:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"It is also possible to use pre-defined networks in ..."

Besides, I would rather present first the pre-defined networks available, rather than the custom one. I think it is more appropriate to come later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides, I would rather present first the pre-defined networks available, rather than the custom one. I think it is more appropriate to come later.

I don't agree since I want to give users the maximum freedom to define the network.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but I think it is better to start with predefined network, to provide a extremely quick and concise way to run a learning algorithm to get the feeling of the dataflow of Tianshou, how easy it is to train a model, and how fast is Tianshou. Then you introduce a more advanced example now that the user is convince the lib fits its need. But that's just my opinion.

docs/tutorials/dqn.rst Outdated Show resolved Hide resolved
test/base/test_collector.py Show resolved Hide resolved
tianshou/data/batch.py Outdated Show resolved Hide resolved
tianshou/env/venvs.py Outdated Show resolved Hide resolved
@duburcqa
Copy link
Collaborator

duburcqa commented Sep 10, 2020

Nice work ! I really appreciate your effort to keep the doc up to date and to clearly explain how to use Tianshou and make the best out of it. It is not so common nowaday.

@Trinkle23897 Trinkle23897 merged commit b86d787 into thu-ml:master Sep 10, 2020
@Trinkle23897 Trinkle23897 deleted the fix-doc branch September 10, 2020 23:55
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
- fix broken links and out-of-the-date content
- add pydocstyle and doc8 check
- remove collector.seed and collector.render
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.

How to use policy.forward to compute an action from given observation for TicTacToe example?
3 participants