-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Update --labels
and add --labels-from-file
options for Label Selector API
#51706
base: master
Are you sure you want to change the base?
Update --labels
and add --labels-from-file
options for Label Selector API
#51706
Conversation
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
Signed-off-by: Ryan O'Leary <[email protected]>
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.
Thanks!
python/ray/scripts/scripts.py
Outdated
default="{}", | ||
type=str, | ||
help="a JSON serialized dictionary mapping label name to label value.", | ||
help="a JSON serialized dictionary mapping label name to label value sourced from a file.", |
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.
In the REP here: https://github.com/ray-project/enhancements/pull/60/files#diff-8ffbf04d141c252596eb1746813e1a8ea927b710fb74d252e11eba7c886c02a6R140, it mentioned that the content will be in YAML format. Wondering should we follow that or we want to update it to json?
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.
Done in b6e99ea, I changed it to read from file.
Signed-off-by: Ryan O'Leary <[email protected]>
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.
Thanks!
Signed-off-by: Ryan O'Leary <[email protected]>
Why are these changes needed?
This PR updates the
--labels
option toray start
orray init
to accept a string list of key-value pairs mapping label names to label values. Labels follow Kubernetes label syntax. This PR also adds a--labels-from-file
argument to support sourcing labels from a file. Files are expected to contain a valid JSON string containing a serialized key-value pair map. We useparse_node_labels_json
to parse the argument passed to--labels-from-file
.Related issue number
#51564
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.