-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[refactor] Move custom_types from util/state
to _private/
#50183
[refactor] Move custom_types from util/state
to _private/
#50183
Conversation
@@ -72,9 +71,19 @@ | |||
"DRIVER_TASK", | |||
] | |||
TypeTaskType = Literal[tuple(TASK_TYPE)] | |||
TypeReferenceType = Literal[ | |||
tuple(reference_type.value for reference_type in ReferenceType) | |||
# TODO(kevin85421): `class ReferenceType(Enum)` is defined in |
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.
To make this PR easier to review, I will open a follow up PR to address this instead of including in this PR.
ray/python/ray/dashboard/memory_utils.py
Line 47 in 766a525
class ReferenceType(Enum): |
Signed-off-by: kaihsun <[email protected]>
8b366a5
to
8a513f2
Compare
Signed-off-by: kaihsun <[email protected]>
# `dashboard/memory_utils.py` to avoid complex dependencies. I redefined | ||
# it here. Eventually, we should remove the one in `dashboard/memory_utils.py` | ||
# and define it under `ray/_private`. | ||
REFERENCE_TYPE = [ |
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.
Now we have two REFERENCE_TYPE
s in our codebase, one for enum list, another for string list;
wondering if it's possible to combine them into one?
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.
NVM, see you TODO comment.
Why are these changes needed?
custom_types.py
defines valid options for the Ray system, such as task status and actor status. However, some parts of the Ray codebase redefine this set of valid options or hardcode it as strings in multiple places. It will be useful to movecustom_types
to the top-level of the repo so that many other places can import it.Follow up:
custom_types
to refactor some functions.class TypeReferenceType
in a place other than dashboard.Related issue number
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.