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

Custom Resources from using ray start in CLI do not work as intended #36374

Closed
lavkeshg opened this issue Jun 13, 2023 · 7 comments
Closed

Custom Resources from using ray start in CLI do not work as intended #36374

lavkeshg opened this issue Jun 13, 2023 · 7 comments

Comments

@lavkeshg
Copy link

Running into an issue where the examples for custom resources do not work in Powershell as intended.

ray start --head --num-cpus=3 --num-gpus=4 --resources='{"special_hardware": 1, "custom_label": 1}'

Should be straightforward enough, however it yields the following response,
--resources is not a valid JSON string.
Valid values look like this: --resources='{"CustomResource3": 1, "CustomResource2": 2}}'

I have also tried the example for "valid" values suggested in the error response,
ray start --head --resources='{"CustomResource3": 1, "CustomResource2": 2}}'

This yields the exact same error as well.

I have also tried wrapping the whole text further within quotes looking at some other issues, like so,
ray start --head --num-cpus=3 --num-gpus=4 --resources="'{ \"special_hardware\": 1, \"custom_label\": 1 }'"
this didn't help either

I have attached the environment.yml used here.

environment.yml
name: ray_unpack channels: default dependencies: python=3.8 pip pip: - -r requirements.txt

requirements.txt
joblib==1.2.0 numpy==1.24.0 pandas==1.5.2 psycopg2==2.9.5 PyYAML==6.0 ray==2.5.0 SQLAlchemy==1.4.45

I am running this on PSVersion: 5.1.17763.3770

Thank you!

@larrylian
Copy link
Contributor

There is an error in your example above. The following is correct. You can use the following。

ray start --head --resources='{"CustomResource3": 1, "CustomResource2": 2}'

image

@lavkeshg
Copy link
Author

Thanks for your response! However that didn't work either. The }} typo is something I took from what the error suggests. Please see the screenshot below, where I run the line from your response.
image

@larrylian
Copy link
Contributor

  1. There is an extra } in this error message and we will fix it.
  2. You try to remove the space in the middle.
    image

@lavkeshg
Copy link
Author

removing whitespaces still gives the same issue, see below
image

rather than this back and forth, does this ray start operation generate a log file which I can send you? Let me where would I be able to find that. Thank you!

@larrylian
Copy link
Contributor

I will try to find a Windows environment and use PowerShell to reproduce the issue you encountered.
This will take a few days to complete.

@larrylian
Copy link
Contributor

larrylian commented Jun 25, 2023

@lavkeshg Today i reproduce the issue in windows env, you should use follow case:

ray start --head --resources='{\"CustomResource3\": 1, \"CustomResource2\": 2}'

@lavkeshg
Copy link
Author

That worked for me! Thank you so much

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

No branches or pull requests

2 participants