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

[rllib] Fix torch c51 dqn #16716

Merged
merged 5 commits into from
Jul 13, 2021
Merged

[rllib] Fix torch c51 dqn #16716

merged 5 commits into from
Jul 13, 2021

Conversation

gbartyzel
Copy link
Contributor

@gbartyzel gbartyzel commented Jun 28, 2021

Why are these changes needed?

Currently, it is not possible to train a c51 torch agent. The output shape of the value head in DqnTorchModel should be equal to the num_atoms (now it is equal to 1). Also in the current implementation, the noisy option doesn't affect the value head. There are also minor fixes in QLoss, like target probs should be detached before loss calculation.

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@richardliaw
Copy link
Contributor

Hmm @Souphis it looks like TestExplorations.test_td3 is failing because of this?

Is it possible to investigate that failure?

@gbartyzel
Copy link
Contributor Author

I don't think that this PR is related to this failure, but I will investigate this.

@sven1977
Copy link
Contributor

@Souphis , thanks for this PR! Taking a look at the failing test. I think it's not related to this PR, though, so should be good, but I'll confirm. ...

@gbartyzel
Copy link
Contributor Author

gbartyzel commented Jul 13, 2021

@sven1977 I ran tests once again locally, both td3 and dqn passed them. So, I think that this error is not related to this PR.

@sven1977
Copy link
Contributor

Merged with master, which has a fix for this test case. Waiting for tests to pass again. ...

@sven1977
Copy link
Contributor

@Souphis , agree. Will merge as soon as everything passes. Should be today :)

Copy link
Contributor

@sven1977 sven1977 left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes @Souphis !

@sven1977 sven1977 merged commit d553d4d into ray-project:master Jul 13, 2021
@gbartyzel gbartyzel deleted the fix_torch_c51_dqn branch July 13, 2021 20:54
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.

4 participants