{"record":{"id":"59d475510afb4e0b","repo":"huggingface/pytorch-image-models","slug":"importing-from-name-is-deprecated-please-im-59d475","errorCode":null,"errorMessage":"Importing from {__name__} is deprecated, please import via timm.models","messagePattern":"Importing from (.+?) is deprecated, please import via timm\\.models","errorType":"console","errorClass":"FutureWarning","httpStatus":null,"severity":"warning","filePath":"timm/models/helpers.py","lineNumber":7,"sourceCode":"from ._builder import *\nfrom ._helpers import *\nfrom ._manipulate import *\nfrom ._prune import *\n\nimport warnings\nwarnings.warn(f\"Importing from {__name__} is deprecated, please import via timm.models\", FutureWarning)\n","sourceCodeStart":1,"sourceCodeEnd":8,"githubUrl":"https://github.com/huggingface/pytorch-image-models/blob/9a5261e31b3b5128526eb2658333b4c0a54464ae/timm/models/helpers.py#L1-L8","documentation":"Importing timm.models.helpers is deprecated: its contents were split into timm.models._builder, _helpers, _manipulate, and _prune, and the shim re-exports all of them with a FutureWarning. Import via timm.models instead.","triggerScenarios":"from timm.models.helpers import build_model_with_cfg, checkpoint_seq, adapt_input_conv, resolve_pretrained_cfg; import timm.models.helpers in model-construction utilities.","commonSituations":"Custom models built with build_model_with_cfg; repositories vendoring timm model helpers from pre-0.9 versions.","solutions":["Import from timm.models: from timm.models import build_model_with_cfg, checkpoint_seq","Use the specific private modules (timm.models._builder etc.) if needed","Grep and replace 'timm.models.helpers' across the project"],"exampleFix":"# before\nfrom timm.models.helpers import build_model_with_cfg\n# after\nfrom timm.models import build_model_with_cfg","handlingStrategy":"validation","validationCode":"from timm.models import build_model_with_cfg, checkpoint_seq, adapt_input_conv  # modern path","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import builder/prune helpers via timm.models","Grep for 'timm.models.helpers' during upgrades","Depend on timm >=0.9 explicitly in requirements"],"tags":["timm","deprecation","import","builder"],"backgroundTag":"deprecated-module-import","analyzedSha":"9a5261e31b3b5128526eb2658333b4c0a54464ae","analyzedAt":"2026-08-27T02:34:25.417Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}