-
Notifications
You must be signed in to change notification settings - Fork 110
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
Make torchx scheduler opts support enums #870
base: main
Are you sure you want to change the base?
Conversation
This pull request was exported from Phabricator. Differential Revision: D55551233 |
Summary: Added Support for Enumerations in scheduler options. This is a bit more generic as it takes in a creator function which converts a CfgVal to another type. There are some limitations on how general it can be based on how the typing is setup. This also makes it tricky to make a convenience function to handle only Enums. Differential Revision: D55551233
bd12c44
to
820ea58
Compare
This pull request was exported from Phabricator. Differential Revision: D55551233 |
Summary: Added Support for Enumerations in scheduler options. This is a bit more generic as it takes in a creator function which converts a CfgVal to another type. There are some limitations on how general it can be based on how the typing is setup. This also makes it tricky to make a convenience function to handle only Enums. Differential Revision: D55551233
820ea58
to
64524dd
Compare
This pull request was exported from Phabricator. Differential Revision: D55551233 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D55551233 |
Summary: Added Support for Enumerations in scheduler options. This is a bit more generic as it takes in a creator function which converts a CfgVal to another type. There are some limitations on how general it can be based on how the typing is setup. This also makes it tricky to make a convenience function to handle only Enums. Differential Revision: D55551233
64524dd
to
e8715ab
Compare
Summary: Added Support for Enumerations in scheduler options. This is a bit more generic as it takes in a creator function which converts a CfgVal to another type. There are some limitations on how general it can be based on how the typing is setup. This also makes it tricky to make a convenience function to handle only Enums. Differential Revision: D55551233
e8715ab
to
b9573f0
Compare
This pull request was exported from Phabricator. Differential Revision: D55551233 |
b9573f0
to
aee0801
Compare
Summary: Added Support for Enumerations in scheduler options. This is a bit more generic as it takes in a creator function which converts a CfgVal to another type. There are some limitations on how general it can be based on how the typing is setup. This also makes it tricky to make a convenience function to handle only Enums. Differential Revision: D55551233
This pull request was exported from Phabricator. Differential Revision: D55551233 |
Summary: Added Support for Enumerations in scheduler options. This is a bit more generic as it takes in a creator function which converts a CfgVal to another type. There are some limitations on how general it can be based on how the typing is setup. This also makes it tricky to make a convenience function to handle only Enums. Differential Revision: D55551233
aee0801
to
da0152a
Compare
This pull request was exported from Phabricator. Differential Revision: D55551233 |
Summary: Added Support for Enumerations in scheduler options. This is a bit more generic as it takes in a creator function which converts a CfgVal to another type. There are some limitations on how general it can be based on how the typing is setup. This also makes it tricky to make a convenience function to handle only Enums. Differential Revision: D55551233
da0152a
to
5e1d68d
Compare
Summary: Added Support for Enumerations in scheduler options. This is a bit more generic as it takes in a creator function which converts a CfgVal to another type. There are some limitations on how general it can be based on how the typing is setup. This also makes it tricky to make a convenience function to handle only Enums. Differential Revision: D55551233
This pull request was exported from Phabricator. Differential Revision: D55551233 |
5e1d68d
to
4227419
Compare
This pull request was exported from Phabricator. Differential Revision: D55551233 |
@@ -702,6 +702,7 @@ class runopt: | |||
opt_type: Type[CfgVal] | |||
is_required: bool | |||
help: str | |||
creator: Optional[Callable[[CfgVal], CfgVal]] = None |
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.
Its not clear how to use this creator
. Can/should I use a creator
for a primitive CfgVal
(eg ones that are not enums)?
In general schedule options were kept dead simple because they are meant to be directly parsable from command-line (after all torchx is mostly used from CLI). This is why they are not structured, and only basic type checking is done for sanity. Enums are tricky to support especially when the values are sent over the wire and as such support for enums in scheduler opts should be well motivated and thorougly justified as we would be trading off simplicity/clarity for .
I'd like to understand the motivation behind wanting to support enums for scheduler opts before we add them. cc @d4l3k
Summary:
Added Support for Enumerations in scheduler options.
This is a bit more generic as it takes in a creator function which converts a CfgVal to another type. There are some limitations on how general it can be based on how the typing is setup. This also makes it tricky to make a convenience function to handle only Enums.
Differential Revision: D55551233