Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
9af24b7e
Commit
9af24b7e
authored
Jul 28, 2025
by
Baber
Browse files
refactor registry for simplicity and improved maintainability
parent
907f5f28
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
180 additions
and
465 deletions
+180
-465
lm_eval/api/registry.py
lm_eval/api/registry.py
+178
-463
lm_eval/models/__init__.py
lm_eval/models/__init__.py
+2
-2
No files found.
lm_eval/api/registry.py
View file @
9af24b7e
This diff is collapsed.
Click to expand it.
lm_eval/models/__init__.py
View file @
9af24b7e
...
...
@@ -41,8 +41,8 @@ def _register_all_models():
for
name
,
path
in
MODEL_MAPPING
.
items
():
# Only register if not already present (avoids conflicts when modules are imported)
if
name
not
in
model_registry
:
# Register the lazy placeholder
directly
model_registry
.
register
(
name
,
path
)
# Register the lazy placeholder
using lazy parameter
model_registry
.
register
(
name
,
lazy
=
path
)
# Call registration on module import
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment