Repository navigation
Preserve timm architecture names in model identity - #86
Merged
Merged
Conversation
Coverage report
Top uncovered files
|
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.
timm models currently register under their Python class name, so different architectures such as resnet18 and resnet50 both become
ResNet. Their telemetry is merged under one handle and retains the first model's metadata.Preserve the full name passed to
timm.create_model()on the returned model before automatic registration. Use it for both model ID and display name, including variant tags and hub-qualified names. For manually registered models, fall back to the architecture in timm's pretrained/default config. Explicit model IDs still take priority; ordinary PyTorch models keep the class-name fallback.Promotes the existing architecture-collision regression from expected failure to a passing compatibility test. Tests also verify inference attribution, repeated-architecture identity, positional/keyword names, variant/hub names and explicit overrides.
Fixes #73.
Validation
pretrained=False, without downloading weights. Tested with Python 3.12, PyTorch 2.14.1 and NumPy 1.26.4 on macOS.Existing stored records under class-based IDs are not migrated; new registrations use the corrected identity.