-
-
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
Add option for preemptible instances on GCP #256
Conversation
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.
Thank @tomwhite ! This looks great. Left one small comment. I think it would also be good if there was a test for preemptible instances. Lastly, will GCP reject the submission if preemptible
is True and automaticRestart
is True?
@@ -146,9 +148,9 @@ def create_gcp_config(self): | |||
}, | |||
"labels": {"container-vm": "dask-cloudprovider"}, | |||
"scheduling": { | |||
"preemptible": "false", | |||
"preemptible": ("true" if self.preemptible else "false"), |
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.
What do you think about making the default preemptible=False
rather than None ? I think keeping the massive dictionary cleaner is a good goal
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.
Fixed
Thanks for the review @quasiben. I haven't added a test yet - what would you recommend? Also, any thoughts on how to make the scheduler non-preemptible?
Yes, it did when I tried. |
Naively, a test where |
I've updated with a change so that scheduler instances are never preemptible. This is important, since losing the scheduler means the whole cluster is unusable.
Are you asking about GPUs on preemptible instances? I haven't tried them, but that doc suggests they would work the same. |
Sorry, yes. I was asking about GPU instances. The last change where schedulers are not preemptible is a very good idea. Merging now. Thanks @tomwhite ! |
Here's a simple fix for #255.
As it stands, if preemptible instances are enabled, all instances in the cluster - including the scheduler - are preemptible. It would be better if the scheduler instance was always a standard (non-preemptible) instance. Suggestions for how to do that would be very welcome.