-
Notifications
You must be signed in to change notification settings - Fork 277
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
allow using on-demand instead of spot only #622
base: main
Are you sure you want to change the base?
Conversation
@markblee could you review please? I need this in order to test on internal on-demand capacity. |
@Ethanlm would love your thoughts too |
@@ -508,8 +516,9 @@ def _build_pod(self) -> Nested[Any]: | |||
logging.info("Found tier=%s in env. Using reservation=%s", tier, cfg.reservation) | |||
selector.update({"cloud.google.com/reservation-name": cfg.reservation}) | |||
else: |
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 about using tier == "1"
for spot and tier == "2"
for on-demand? You can configure the quota file s.t. there's only on-demand quota like
[[total_resources]]
v5litepod = 0
[[total_resources]]
v5litepod = 0
[[total_resources]]
v5litepod = X
...
Which corresponds to 0 quota for tier 0/1 and X quota on tier 2. More generally we can also make the logic for tier -> selector
mapping configurable, for more flexible schemes. WDYT?
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!
if not cfg.enable_ondemand: | ||
logging.info("Found tier=%s in env. Using spot quota", tier) | ||
selector.update({"cloud.google.com/gke-spot": "true"}) |
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.
Is there a unittest that can be updated?
This fixes #621