Simpler approach to loading entrypoints in hubconf works properly

This commit is contained in:
Ross Wightman 2020-02-18 14:58:23 -08:00
parent e0685dd415
commit 6620770665

View File

@ -1,10 +1,4 @@
dependencies = ['torch']
from timm.models import registry
current_module = __import__(__name__)
current_module.__dict__.update(registry._model_entrypoints)
#for fn_name in registry.list_models():
# fn = registry.model_entrypoint(fn_name)
# setattr(current_module, fn_name, fn)
globals().update(registry._model_entrypoints)