fix(utils): Resolve backbone utils test regressions#45594
Open
harshaljanjani wants to merge 1 commit intohuggingface:mainfrom
Open
fix(utils): Resolve backbone utils test regressions#45594harshaljanjani wants to merge 1 commit intohuggingface:mainfrom
harshaljanjani wants to merge 1 commit intohuggingface:mainfrom
Conversation
Member
|
cc @ydshieh @tarekziade maybe? We may want to consider ditching these tests if they're all slow and we don't even notice when they break! |
Member
|
Hm, I usually try to check daily CI for things that I might have broken, so prob this one slipped off the CI-bot feedback? Been quite a while since the last time "timm" was updated... |
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?
The following regressions were identified and fixed in this PR:
→ 0c4fe5c ("Delete duplicate code in backbone utils") removed
use_pretrained_backbonefromload_backbone; pretrained weights are now loaded viafrom_pretrainedon the parent. The tests in test_backbone_utils.py#L217 weren't updated likely becausetests/utils/wasn't in therun-slowscope of that PR. Updated the test to match the new design (load_backbonealways initializes with random weights).→ dff54ad ("out_indices always a list") made
out_indicesalways return a list via backbone_utils.py#L57. The assertion at test_backbone_utils.py#L165 was written before that change in #28784 and still expected a tuple. Updated the assertion to expect a list.cc: @zucchini-nlp @Rocketknight1
CI coverage fixed by this PR (checked in the latest CI run):
Current output:
Output after fix:
Code Agent Policy
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.