Skip to content

Commit 6620770

Browse files
committed
Simpler approach to loading entrypoints in hubconf works properly
1 parent e0685dd commit 6620770

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

hubconf.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
dependencies = ['torch']
2-
32
from timm.models import registry
43

5-
current_module = __import__(__name__)
6-
current_module.__dict__.update(registry._model_entrypoints)
7-
#for fn_name in registry.list_models():
8-
# fn = registry.model_entrypoint(fn_name)
9-
# setattr(current_module, fn_name, fn)
10-
4+
globals().update(registry._model_entrypoints)

0 commit comments

Comments
 (0)