-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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] PPO doesn't work with fractional num gpus #3396
Conversation
Test FAILed. |
Test FAILed. |
would love to have this merged just so I can build with the wheel instead of from source |
@jhpenger just a note that if you want to build wheels on branches/commits that we don't provide, that can be done by following the instructions in https://github.com/ray-project/ray/blob/master/python/README-building-wheels.md. |
@@ -44,7 +45,9 @@ def _init(self, | |||
if not num_gpus: | |||
self.devices = ["/cpu:0"] | |||
else: | |||
self.devices = ["/gpu:{}".format(i) for i in range(num_gpus)] | |||
self.devices = [ | |||
"/gpu:{}".format(i) for i in range(int(math.ceil(num_gpus))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't numpy already imported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to avoid numpy if you can use standard libraries instead.
Test FAILed. |
jenkins retest this please |
Test FAILed. |
What do these changes do?
Round up to next int when allocating ids w/fractional gpus.
Related issue number
Closes #3394