-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[tune] Introduce tune.with_resources() to specify function trainable resources #26830
Conversation
Signed-off-by: Kai Fricke <[email protected]>
Signed-off-by: Kai Fricke <[email protected]>
Signed-off-by: Kai Fricke <[email protected]>
Signed-off-by: Kai Fricke <[email protected]>
def with_resources( | ||
trainable, | ||
resources: Union[ | ||
Dict[str, float], PlacementGroupFactory, Callable[[dict], PlacementGroupFactory] |
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.
I am a little hesitant about adding PlacementGroupFactory actually.
We need a better API. How about just plain resources dict for now? Until someone yells at us?
it covers most simple cases.
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.
We use it for resources_per_trial
so it would be a bit odd to leave it out imo.
We could add ScalingConfig here... :-D
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.
I think we should keep the placement group factory for now - it's a tune concept, it's advanced, but it's the same as in resources_per_trial
. I'm happy to deprecate this once we have a good alternative, but then we can deprecate it in all places. Does that sound good?
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.
ok sg!
Signed-off-by: Kai Fricke <[email protected]>
Signed-off-by: Kai Fricke <[email protected]>
…resources (ray-project#26830) We don't have a way to specify resource requirements with the Tuner() API. This PR introduces tune.with_resources() to attach a resource request to class and function trainables. In class trainables, it will override potential existing default resource requests. Signed-off-by: Kai Fricke <[email protected]> Signed-off-by: Rohan138 <[email protected]>
…resources (ray-project#26830) We don't have a way to specify resource requirements with the Tuner() API. This PR introduces tune.with_resources() to attach a resource request to class and function trainables. In class trainables, it will override potential existing default resource requests. Signed-off-by: Kai Fricke <[email protected]> Signed-off-by: Stefan van der Kleij <[email protected]>
Why are these changes needed?
We don't have a way to specify resource requirements with the Tuner() API. This PR introduces
tune.with_resources()
to attach a resource request to class and function trainables. In class trainables, it will override potential existing default resource requests.Related issue number
Checks
scripts/format.sh
to lint the changes in this PR.