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
42619159
Commit
42619159
authored
Jan 22, 2024
by
lintangsutawika
Browse files
add GroupConfig object
parent
318d706b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
lm_eval/api/task.py
lm_eval/api/task.py
+15
-0
No files found.
lm_eval/api/task.py
View file @
42619159
...
@@ -40,6 +40,21 @@ ALL_OUTPUT_TYPES = [
...
@@ -40,6 +40,21 @@ ALL_OUTPUT_TYPES = [
eval_logger
=
logging
.
getLogger
(
"lm-eval"
)
eval_logger
=
logging
.
getLogger
(
"lm-eval"
)
@
dataclass
class
GroupConfig
(
dict
):
group
:
str
=
None
task
:
Union
[
str
,
list
]
=
None
weight_by_size
:
bool
=
False
def
__getitem__
(
self
,
item
):
return
getattr
(
self
,
item
)
def
__setitem__
(
self
,
item
,
value
):
return
setattr
(
self
,
item
,
value
)
def
to_dict
(
self
):
return
asdict
(
self
)
@
dataclass
@
dataclass
class
TaskConfig
(
dict
):
class
TaskConfig
(
dict
):
...
...
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