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

[Core] "ValueError" For "num_cpus" worker option == 1.5 #37241

Closed
SebastianMorawiec opened this issue Jul 10, 2023 · 2 comments · Fixed by #39293
Closed

[Core] "ValueError" For "num_cpus" worker option == 1.5 #37241

SebastianMorawiec opened this issue Jul 10, 2023 · 2 comments · Fixed by #39293
Assignees
Labels
core Issues that should be addressed in Ray Core docs An issue or change related to documentation good first issue Great starter issue for someone just starting to contribute to Ray P1 Issue that should be fixed within a few weeks

Comments

@SebastianMorawiec
Copy link

What happened + What you expected to happen

What happens:
When using num_cpus option = 1.5 for worker, Ray throws out "ValueError: Resource quantities >1 must be whole numbers."

What is expected to be happen:
Either accept fractions, or document. Current documentation states that fractions are accepted without limitations stated

Versions / Dependencies

ray 2.4, MACOS M1 (although, I'm quite sure it does not matter)

Reproduction script

import ray


@ray.remote(num_cpus=1.5)
def task():
    return 5


if __name__ == "__main__":
    result = ray.get(task.remote())
    print(result)

Issue Severity

Medium: It is a significant difficulty but I can work around it.

@SebastianMorawiec SebastianMorawiec added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jul 10, 2023
@jjyao jjyao added core Issues that should be addressed in Ray Core docs An issue or change related to documentation P1 Issue that should be fixed within a few weeks good first issue Great starter issue for someone just starting to contribute to Ray and removed bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jul 10, 2023
@Tanmoy037
Copy link

I want to try this, please assign this to me.

@andreichalapco
Copy link
Contributor

Hello so I suppose this is just changing the documentation. We need to mention in the documentation that the fractional input should be between 0 and 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues that should be addressed in Ray Core docs An issue or change related to documentation good first issue Great starter issue for someone just starting to contribute to Ray P1 Issue that should be fixed within a few weeks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants