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

Fixing casts to int by to_torch_as(...) calls in policies when using discrete actions #521

Merged
merged 4 commits into from
Feb 6, 2022

Conversation

Kenneth-Schroeder
Copy link
Contributor

@Kenneth-Schroeder Kenneth-Schroeder commented Feb 4, 2022

  • I have marked all applicable categories:
    • exception-raising fix
    • algorithm implementation fix
    • documentation modification
    • new feature
  • I have reformatted the code using make format (required)
  • I have checked the code using make commit-checks (required)
  • If applicable, I have mentioned the relevant/related issue(s)
  • If applicable, I have listed every items in this Pull Request below

related issue: #520

@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2022

Codecov Report

Merging #521 (5ff3145) into master (c25926d) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #521   +/-   ##
=======================================
  Coverage   94.41%   94.41%           
=======================================
  Files          63       63           
  Lines        4246     4246           
=======================================
  Hits         4009     4009           
  Misses        237      237           
Flag Coverage Δ
unittests 94.41% <100.00%> (ø)

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

Impacted Files Coverage Δ
tianshou/policy/modelfree/pg.py 98.21% <100.00%> (ø)

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 c25926d...5ff3145. Read the comment docs.

@Kenneth-Schroeder Kenneth-Schroeder changed the title WIP: Fixing casts to int by to_torch_as(...) calls in policies when using discrete actions Fixing casts to int by to_torch_as(...) calls in policies when using discrete actions Feb 5, 2022
Copy link
Collaborator

@Trinkle23897 Trinkle23897 left a comment

Choose a reason for hiding this comment

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

LGTM. Double checked and only here has the issue.

@Trinkle23897 Trinkle23897 merged commit cd7654b into thu-ml:master Feb 6, 2022
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
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.

policy gradient learn function casting episode returns to int when using discrete actions
3 participants