ray
ray copied to clipboard
Custom Resources from using `ray start` in CLI do not work as intended
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!
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}'
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.
- There is an extra
}
in this error message and we will fix it. - You try to remove the space in the middle.
removing whitespaces still gives the same issue, see below
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!
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.
@lavkeshg Today i reproduce the issue in windows env, you should use follow case:
ray start --head --resources='{\"CustomResource3\": 1, \"CustomResource2\": 2}'
That worked for me! Thank you so much