Repository navigation
Test model imports with older TorchAO installations - #15117
Open
wpyaoxueros wants to merge 1 commit into
Open
wpyaoxueros wants to merge 1 commit into
wpyaoxueros wants to merge 1 commit into
Conversation
Add isolated regression coverage for the version guard from huggingface#15095. Codex prepared the test, ran remote validation, and submitted it at the contributor request; no human review is claimed. Co-authored-by: Codex <noreply@openai.com>
Contributor
|
Hi @wpyaoxueros, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Please note that PRs without a linked issue are likely to be automatically closed 10 days after this notice. Once the PR links an issue (or gets the |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Add isolated regression coverage for the old-TorchAO model-import failure fixed by #15095 (reported in #15085). This changes only
tests/others/test_dependencies.py; the merged runtime fix is unchanged.The test places a minimal TorchAO 0.14.1 package and distribution metadata on a subprocess's
PYTHONPATH, verifies Diffusers recognizes the installed older version, and imports the realUNet2DModelandDDPMPipelineclasses. The stand-in deliberately lacks the newerFqnToConfigexport. It does not monkeypatch Diffusers availability/version helpers, install TorchAO, or download model weights. The subprocess isolates optional-dependency detection from the parent test process; the case skips when PyTorch is disabled.Validation
All checks ran on the designated remote Linux workstation, Python 3.11.17 / PyTorch 2.6.0+cu124, against main
48cdbaef5ee3d718aaee392b44f2099ae511c4a5:python -m pytest -q tests/others/test_dependencies.py: 5 passed.cannot import name 'FqnToConfig'; restoring the guard passes. No runtime modification is included in the PR.USE_TORCH=0 python -m pytest -q tests/others/test_dependencies.py -k old_torchao: 1 skipped.make styleandmake fix-copiescompleted; an unrelated generated loader-init change was reverted. Final changed-file Ruff check/format,utils/check_ai.py,utils/check_copies.py,utils/check_dummies.py, andgit diff --checkpass.The full Diffusers suite and Windows/macOS were not run.
Self-review notes
Reviewed against
.ai/references/review-rules.md, coding-style and testing guidance. No blocking technical findings or dead code found. The fixture represents the optional dependency's package/metadata boundary, and the regression demonstrably fails when the production guard is removed. No new pipeline, model, runtime behavior or documentation surface is added.AI disclosure: Codex prepared the test, performed the remote validation and self-review, wrote this description, and submitted the PR on behalf of @wpyaoxueros at the contributor's explicit request. No independent human review or personally executed human tests are claimed.