Skip to content

[Python] Configure object detection benchmark timeout - #39949

Draft
bvolpato wants to merge 1 commit into
apache:masterfrom
bvolpato:bvolpato/fix-inference-benchmark-timeout
Draft

[Python] Configure object detection benchmark timeout#39949
bvolpato wants to merge 1 commit into
apache:masterfrom
bvolpato:bvolpato/fix-inference-benchmark-timeout

Conversation

@bvolpato

@bvolpato bvolpato commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Addresses #38782.

Status: draft pending #39953 and an end-to-end Dataflow run. #39953 fixes the ignored fixed-batch configuration, which may change benchmark runtime. This timeout increase should not merge until the corrected benchmark confirms that 30 minutes remains insufficient.

Why

The Faster R-CNN benchmark added in #37186 has not completed successfully in the daily workflow. Recent runs consistently reach the object-detection batch CPU step, start the Dataflow job, and then cancel it after about 1,803 seconds.

This is not the GitHub Actions timeout. Each benchmark step allows 180 minutes, but pytorch_image_object_detection.run() has its own hard-coded 30-minute wait_until_finish() call. Its finally block cancels the still-running Dataflow job before the outer workflow timeout can help.

What changed

  • Add a --timeout_ms option to the object-detection example, preserving the existing 30-minute default for other callers.
  • Set this benchmark timeout to 60 minutes.

Keeping the override in benchmark options makes future runtime tuning possible without changing example behavior globally.

Validation

  • python -m py_compile sdks/python/apache_beam/examples/inference/pytorch_image_object_detection.py
  • yapf==0.43.0 --diff on the changed Python file
  • ruff==0.15.22 check --ignore I001,UP006 on the changed Python file
  • git diff --check

End-to-end validation requires Dataflow benchmark infrastructure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant