Skip to content

build: require PyAV >= 17 and cap requires-python below 3.14 - #267

Merged
lfengad merged 1 commit into
mainfrom
pzeren/av-lower-bound
Sep 20, 2026
Merged

lfengad merged 1 commit into
mainfrom
pzeren/av-lower-bound

Conversation

@pengcuo

@pengcuo pengcuo commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Why

Release PRs #265 and #266 fail the unittest job and nothing else. The tree they ship now includes cosmos_framework/data/generator/augmentors/hr_lr_degradation/codec.py, which calls VideoFrame.reformat(threads=...) (PyAV >= 17). This repo lists av with no floor and the lock resolved 16.1.0, so 12 codec tests fail with TypeError: reformat() got an unexpected keyword argument 'threads'. degrade_test.py::test_codec_round_trip_bounds_encoder_and_decoder_threads then leaves its non-daemon thread-count sampler running (the error is raised before stop.set()), pytest never exits after printing its summary at ~36 min, and the job is killed at the 60-minute timeout. Same picture on both days.

What

Mirror the three constraints cosmos-framework-private already has (suggested by @lfengad):

change private origin
av>=17,<18; python_version < '3.11' nvidia-cosmos/cosmos-framework-private#94
av>=18,<19; python_version >= '3.11' (what the imaginaire4 images ship) private e428840
requires-python = ">=3.10,<3.14" nvidia-cosmos/cosmos-framework-private#92

The cap is not optional: without it uv 0.12.17 cannot re-resolve this lock at all (multi-storage-client 0.44.0 has no aarch64 wheel for the Python 3.14 split), so no dependency bump can land here until it does.

Verification

  • uv 0.12.17 (the version setup-uv@v7 installs) reproduces main's uv.lock byte-for-byte on the untouched tree.
  • After the change the only (name, version) pairs that move are av 16.1.0 -> 17.1.0 / 18.1.0; every other package is unchanged. The large diff is the dropped 3.14 resolution splits, exactly as in private toml_config: add [job].upload_reproducible_setup, default False for OSS #92.
  • uv lock --check passes.

Follow-ups (not in this PR)

  • The sampler thread in degrade_test.py should be daemon or wrapped in try/finally so a codec failure can never hang the whole unittest job again; that is an imaginaire4-side change (the file is release-mapped).
  • Once this lands, re-run Release 2026-09-20 (i4 4d9b6cfd) #266's GPU Tests (or regenerate it); the failing tests then run on PyAV 18.

…hon below 3.14

The release PRs since #265 fail `unittest`: the newly shipped
cosmos_framework/data/generator/augmentors/hr_lr_degradation/codec.py calls
``VideoFrame.reformat(threads=...)``, added in PyAV 17, but this repo listed
``av`` without a floor and the lock resolved 16.1.0, so 12 tests raise
``TypeError: reformat() got an unexpected keyword argument 'threads'``. One of
them then leaves its thread-count sampler running, so pytest never exits and
the job dies at the 60-minute timeout.

Mirror what cosmos-framework-private already carries:

- ``av>=17,<18; python_version < '3.11'`` and ``av>=18,<19; python_version >= '3.11'``
  (private e428840 + #94). PyAV 18 is what the imaginaire4 images ship.
- ``requires-python = ">=3.10,<3.14"`` (private #92): without the cap uv 0.12.17
  cannot re-resolve this lock at all -- multi-storage-client 0.44.0 has no
  aarch64 wheel for the Python 3.14 split -- so no dependency change is
  possible until it lands here too.

Verification (uv 0.12.17, the version setup-uv@v7 installs): the untouched
tree re-locks byte-for-byte; after the change only ``av`` moves
(16.1.0 -> 17.1.0 / 18.1.0), no other (name, version) pair changes;
``uv lock --check`` passes. The remaining lock churn is the dropped 3.14
resolution splits, as in private #92.
@pengcuo
pengcuo requested a review from lfengad September 20, 2026 07:59
@lfengad
lfengad enabled auto-merge (squash) September 20, 2026 08:18
@lfengad
lfengad disabled auto-merge September 20, 2026 08:28
@lfengad
lfengad enabled auto-merge (squash) September 20, 2026 08:29
@lfengad
lfengad merged commit 3b391bd into main Sep 20, 2026
10 checks passed
@lfengad
lfengad deleted the pzeren/av-lower-bound branch September 20, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants