{"record":{"id":"4fcfca9e68d4a93a","repo":"huggingface/pytorch-image-models","slug":"importing-from-name-is-deprecated-please-im-4fcfca","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/fx_features.py","lineNumber":4,"sourceCode":"from ._features_fx import *\n\nimport warnings\nwarnings.warn(f\"Importing from {__name__} is deprecated, please import via timm.models\", FutureWarning)\n","sourceCodeStart":1,"sourceCodeEnd":5,"githubUrl":"https://github.com/huggingface/pytorch-image-models/blob/9a5261e31b3b5128526eb2658333b4c0a54464ae/timm/models/fx_features.py#L1-L5","documentation":"Importing timm.models.fx_features is deprecated: it now lives at timm.models._features_fx and this shim re-exports it with a FutureWarning. Use timm.models imports for FeatureGraphNet / GraphExtractNet.","triggerScenarios":"from timm.models.fx_features import FeatureGraphNet, GraphExtractNet; import timm.models.fx_features in torch.fx-based feature extraction code.","commonSituations":"FX-tracing pipelines and feature-graph extraction scripts written for older timm versions.","solutions":["Import from timm.models instead: from timm.models import FeatureGraphNet","Or use timm.models._features_fx for the private module path","Update forks/plugins referencing the old filename"],"exampleFix":"# before\nfrom timm.models.fx_features import FeatureGraphNet\n# after\nfrom timm.models import FeatureGraphNet","handlingStrategy":"validation","validationCode":"from timm.models import FeatureGraphNet  # modern path","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import FX feature classes from timm.models","Avoid hard-coded old module paths","Consider timm.create_model(..., exportable=True) for tracing workflows"],"tags":["timm","deprecation","import","torch-fx"],"backgroundTag":"deprecated-module-import","analyzedSha":"9a5261e31b3b5128526eb2658333b4c0a54464ae","analyzedAt":"2026-08-27T02:34:25.417Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}