-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[CI] Update test fetcher script #14607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DN6
wants to merge
4
commits into
main
Choose a base branch
from
update-tests-fetcher-script
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+473
−1,009
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
341e55f
[CI] Rewrite `tests_fetcher.py` as an AST-based import-graph selector…
DN6 c7c8cc4
[tests] Import pipeline/model classes inside the tests that use them …
DN6 4242566
[CI] Give `single_file` model tests their own fetcher job; they need …
DN6 bd8d8b8
[tests] Keep `create_flux_ip_adapter_state_dict` in `test_models_tran…
DN6 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ | |
| from huggingface_hub import ModelCard, delete_repo, snapshot_download, try_to_load_from_cache | ||
| from huggingface_hub.utils import HfHubHTTPError, is_jinja_available | ||
|
|
||
| from diffusers.models import FluxTransformer2DModel, SD3Transformer2DModel, UNet2DConditionModel | ||
| from diffusers.models import UNet2DConditionModel | ||
|
|
||
| from ..others.test_utils import TOKEN, USER, is_staging_test | ||
| from ..testing_utils import ( | ||
|
|
@@ -118,6 +118,8 @@ def test_cached_files_are_used_when_no_internet(self): | |
| assert False, "Parameters not the same!" | ||
|
|
||
| def test_local_files_only_with_sharded_checkpoint(self): | ||
| from diffusers.models import FluxTransformer2DModel | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar issue as AutoPipelines. Importing Flux and SD3 at the top of the file suggests to the test fetcher that these model objects are a dependency for anything that imports from this file. |
||
|
|
||
| repo_id = "hf-internal-testing/tiny-flux-sharded" | ||
| error_response = mock.Mock( | ||
| status_code=500, | ||
|
|
@@ -232,6 +234,8 @@ def test_keep_modules_in_fp32(self): | |
| A simple tests to check if the modules under `_keep_in_fp32_modules` are kept in fp32 when we load the model in fp16/bf16 | ||
| Also ensures if inference works. | ||
| """ | ||
| from diffusers.models import SD3Transformer2DModel | ||
|
|
||
| fp32_modules = SD3Transformer2DModel._keep_in_fp32_modules | ||
|
|
||
| for torch_dtype in [torch.bfloat16, torch.float16]: | ||
|
|
||
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fetcher decides "this test depends on file X" by looking at the imports at the top of the test file.
AutoPipelineForText2Imagelives inauto_pipeline.py, and that file imports every pipeline in the library. So if a test file importsAutoPipelineForText2Imageat the top, the fetcher concludes that test depends on every pipeline, and any PR touching any pipeline would run it.