2525
2626from aignostics import platform
2727from aignostics .platform import Run , RunSdkMetadata
28- from aignostics .platform ._sdk_metadata import GPUConfig
2928from tests .constants_test import (
3029 HETA_APPLICATION_ID ,
3130 HETA_APPLICATION_VERSION ,
@@ -281,12 +280,6 @@ def _submit_and_validate( # noqa: PLR0913, PLR0917
281280
282281 logger .trace (f"Submitting application run for { application_id } version { application_version } " )
283282 client = platform .Client ()
284- gpu_config = GPUConfig (
285- gpu_type = PIPELINE_GPU_TYPE ,
286- provisioning_mode = PIPELINE_GPU_PROVISIONING_MODE ,
287- max_gpus_per_slide = PIPELINE_MAX_GPUS_PER_SLIDE ,
288- flex_start_max_run_duration_minutes = PIPELINE_GPU_FLEX_START_MAX_RUN_DURATION_MINUTES ,
289- )
290283 custom_metadata = {
291284 "sdk" : {
292285 "tags" : tags or set (),
@@ -295,14 +288,23 @@ def _submit_and_validate( # noqa: PLR0913, PLR0917
295288 "deadline" : deadline .isoformat (),
296289 },
297290 "pipeline" : {
298- "gpu" : gpu_config .model_dump (),
291+ "gpu" : {
292+ "gpu_type" : PIPELINE_GPU_TYPE ,
293+ "provisioning_mode" : PIPELINE_GPU_PROVISIONING_MODE ,
294+ "max_gpus_per_slide" : PIPELINE_MAX_GPUS_PER_SLIDE ,
295+ },
299296 "cpu" : {
300297 "provisioning_mode" : PIPELINE_CPU_PROVISIONING_MODE ,
301298 },
302299 "node_acquisition_timeout_minutes" : PIPELINE_NODE_ACQUISITION_TIMEOUT_MINUTES ,
303300 },
304301 }
305302 }
303+ # TODO(oliverm): remove this conditional when applications handle null flex_start_max_run_duration_minutes
304+ if PIPELINE_GPU_FLEX_START_MAX_RUN_DURATION_MINUTES :
305+ custom_metadata ["sdk" ]["pipeline" ]["gpu" ]["flex_start_max_run_duration_minutes" ] = (
306+ PIPELINE_GPU_FLEX_START_MAX_RUN_DURATION_MINUTES
307+ )
306308 run = client .runs .submit (
307309 application_id = application_id ,
308310 application_version = application_version ,
0 commit comments