-
Notifications
You must be signed in to change notification settings - Fork 4
test: unset flex_start_max_run_duration_minutes when null or zero #403
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,6 @@ | |
|
|
||
| from aignostics import platform | ||
| from aignostics.platform import Run, RunSdkMetadata | ||
| from aignostics.platform._sdk_metadata import GPUConfig | ||
| from tests.constants_test import ( | ||
| HETA_APPLICATION_ID, | ||
| HETA_APPLICATION_VERSION, | ||
|
|
@@ -281,12 +280,6 @@ def _submit_and_validate( # noqa: PLR0913, PLR0917 | |
|
|
||
| logger.trace(f"Submitting application run for {application_id} version {application_version}") | ||
| client = platform.Client() | ||
| gpu_config = GPUConfig( | ||
| gpu_type=PIPELINE_GPU_TYPE, | ||
| provisioning_mode=PIPELINE_GPU_PROVISIONING_MODE, | ||
| max_gpus_per_slide=PIPELINE_MAX_GPUS_PER_SLIDE, | ||
| flex_start_max_run_duration_minutes=PIPELINE_GPU_FLEX_START_MAX_RUN_DURATION_MINUTES, | ||
| ) | ||
| custom_metadata = { | ||
| "sdk": { | ||
| "tags": tags or set(), | ||
|
|
@@ -295,14 +288,23 @@ def _submit_and_validate( # noqa: PLR0913, PLR0917 | |
| "deadline": deadline.isoformat(), | ||
| }, | ||
| "pipeline": { | ||
| "gpu": gpu_config.model_dump(), | ||
| "gpu": { | ||
| "gpu_type": PIPELINE_GPU_TYPE, | ||
| "provisioning_mode": PIPELINE_GPU_PROVISIONING_MODE, | ||
| "max_gpus_per_slide": PIPELINE_MAX_GPUS_PER_SLIDE, | ||
| }, | ||
| "cpu": { | ||
| "provisioning_mode": PIPELINE_CPU_PROVISIONING_MODE, | ||
| }, | ||
| "node_acquisition_timeout_minutes": PIPELINE_NODE_ACQUISITION_TIMEOUT_MINUTES, | ||
| }, | ||
| } | ||
| } | ||
| # TODO(oliverm): remove this conditional when applications handle null flex_start_max_run_duration_minutes | ||
| if PIPELINE_GPU_FLEX_START_MAX_RUN_DURATION_MINUTES: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would using
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, however that would also exclude other fields which happen to be null, and if any of those are nullable but not optional on the application side, I could end up breaking something. Since this is a temporary fix, I prefer this slightly messier but also slightly less risky approach. |
||
| custom_metadata["sdk"]["pipeline"]["gpu"]["flex_start_max_run_duration_minutes"] = ( | ||
| PIPELINE_GPU_FLEX_START_MAX_RUN_DURATION_MINUTES | ||
| ) | ||
olivermeyer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run = client.runs.submit( | ||
| application_id=application_id, | ||
| application_version=application_version, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.