Repository navigation
tester: follow parent and sibling testers, math and loops; drop stale values - #258
Merged
Merged
Conversation
Merged
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.
Follow-up to #254/#255 for the older-style testers that huggingface/transformers#50972 and #50976 move onto
ModelTesterConfigMixin. Their static values use forms the reader skipped:Cohere2ModelTester(CohereModelTester),pocket_tts.PocketTTSModelTester), withsmall_config_overrides/defaultsinherited from the nearest declaring tester and the testers' ownget_small_config_defaults()overrides chained the waysuper()runs them.X.defaults/X.small_config_overridesresolve for any such tester (defaults = {**Parent.defaults, **Parent.small_config_overrides}).BlipTextModelTester.get_small_config_defaults(**text_kwargs), evaluated with the caller's kwargs, and an override's own parameters (text_kwargs=None).math.ceil/floor/…,+=,dict.pop, plain class attributes (cls.base),**keyword arguments, and constant arithmetic in a dict (32 * 4).layer_typesread as the literalNoneinstead of its computed list).Nothing is imported or run; module-level helpers, staticmethods and
get_config()stay unfollowed.Results (static read vs
Tester.get_small_config_defaults()at runtime)ModelTesterConfigMixinclass intests/models: 500/510 exact with this PR vs 449/510 on main, no wrong values (1 on main), no regressions. The migrated testers alone: 330/338 vs 283/338.device), so fixture builds only change as those PRs land.make_divisible/_layer_typeshelpers, a staticmethod (cohere_asr),get_config().to_dict()on throwaway sub-testers (owlvit/owlv2),len()of a module constant (openai_privacy_filter).test_model_tester_forms_from_transformers_50972covers each form; it fails on main.🤖 Generated with Claude Code