Skip to content

fix: preserve zero max wait duration - #7072

Draft
hugosmoreira wants to merge 1 commit into
googleapis:mainfrom
hugosmoreira:fix/max-wait-duration-zero
Draft

fix: preserve zero max wait duration#7072
hugosmoreira wants to merge 1 commit into
googleapis:mainfrom
hugosmoreira:fix/max-wait-duration-zero

Conversation

@hugosmoreira

Copy link
Copy Markdown

Summary

  • preserve an explicit max_wait_duration=0 when building custom-training scheduling inputs
  • continue treating None as an omitted duration
  • add regression coverage for omission, zero with Flex Start, zero without another scheduling option, and a positive duration

Why

The documented value 0 is a sentinel that requests an indefinite Dynamic Workload Scheduler wait. Request preparation used truthiness checks, causing explicit zero to be converted to None and silently omitted from the outgoing training pipeline.

Using explicit is not None checks keeps the API distinction between omission and zero without changing positive-duration behavior.

Fixes #7067.

Validation

  • focused regression test: 4 passed, 236 deselected
  • complete tests/unit/aiplatform/test_training_jobs.py module: 240 passed
  • negative control: restoring the original truthiness checks makes both zero cases fail with None != "0s"
  • Black 24.8.0 check passes for the changed production file
  • Flake8 6.1.0 passes for both changed files
  • git diff --check passes

A broader local Windows package run was not completed because the Python process encountered a native memory-access failure; no full-suite result is claimed. GitHub's Linux CI remains the broader verification environment.

@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: vertex-ai Issues related to the googleapis/python-aiplatform API. labels Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: vertex-ai Issues related to the googleapis/python-aiplatform API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CustomContainerTrainingJob.run drops max_wait_duration=0 instead of requesting indefinite DWS wait

1 participant