fix(utils): Resolve backbone utils test regressions#45594
fix(utils): Resolve backbone utils test regressions#45594harshaljanjani wants to merge 1 commit intohuggingface:mainfrom
Conversation
|
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! |
|
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... |
|
Good day; just checking in to see if there are any updates on the direction we should take regarding this :) |
zucchini-nlp
left a comment
There was a problem hiding this comment.
sorry for delay, I checked with the prev breaking PRs and existing tests. I think these slow tests are meant to be in timm_backbone tester as IntegrationTests, whenever it makes sense
Since we simplified a lot loading backbones, and there's no specific loading anymore, some could be not-useful anymore. For ex test_load_backbone from config/kwargs/ckpt are tested in individual models
|
Will look into the same and revert, thank you :) |
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.