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
chenych
lm-evaluation-harness
Commits
792a9c2b
Commit
792a9c2b
authored
May 24, 2024
by
Rayyyyy
Browse files
Modify bugs in hellaswag
parent
6e092c81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
lm_eval/api/task.py
lm_eval/api/task.py
+3
-1
lm_eval/tasks/hellaswag/hellaswag.yaml
lm_eval/tasks/hellaswag/hellaswag.yaml
+1
-1
No files found.
lm_eval/api/task.py
View file @
792a9c2b
...
@@ -26,6 +26,7 @@ import numpy as np
...
@@ -26,6 +26,7 @@ import numpy as np
from
tqdm
import
tqdm
from
tqdm
import
tqdm
from
lm_eval
import
utils
from
lm_eval
import
utils
from
lm_eval.datasets.hellaswag
import
hellaswag
from
lm_eval.api
import
samplers
from
lm_eval.api
import
samplers
from
lm_eval.api.instance
import
Instance
,
OutputType
from
lm_eval.api.instance
import
Instance
,
OutputType
from
lm_eval.api.metrics
import
bits_per_byte
,
mean
,
weighted_perplexity
from
lm_eval.api.metrics
import
bits_per_byte
,
mean
,
weighted_perplexity
...
@@ -51,6 +52,7 @@ ALL_OUTPUT_TYPES = [
...
@@ -51,6 +52,7 @@ ALL_OUTPUT_TYPES = [
eval_logger
=
logging
.
getLogger
(
"lm-eval"
)
eval_logger
=
logging
.
getLogger
(
"lm-eval"
)
CLASS_DATASETS
=
{
'hellaswag'
:
hellaswag
}
@
dataclass
@
dataclass
class
TaskConfig
(
dict
):
class
TaskConfig
(
dict
):
...
@@ -708,7 +710,7 @@ class ConfigurableTask(Task):
...
@@ -708,7 +710,7 @@ class ConfigurableTask(Task):
self
.
OUTPUT_TYPE
=
self
.
config
.
output_type
self
.
OUTPUT_TYPE
=
self
.
config
.
output_type
if
self
.
config
.
dataset_path
is
not
None
:
if
self
.
config
.
dataset_path
is
not
None
:
self
.
DATASET_PATH
=
inspect
.
getfile
(
self
.
config
.
dataset_
path
)
self
.
DATASET_PATH
=
inspect
.
getfile
(
CLASS_DATASETS
[
self
.
config
.
dataset_
name
]
)
if
self
.
config
.
dataset_name
is
not
None
:
if
self
.
config
.
dataset_name
is
not
None
:
self
.
DATASET_NAME
=
self
.
config
.
dataset_name
self
.
DATASET_NAME
=
self
.
config
.
dataset_name
...
...
lm_eval/tasks/hellaswag/hellaswag.yaml
View file @
792a9c2b
group
:
group
:
-
multiple_choice
-
multiple_choice
task
:
hellaswag
task
:
hellaswag
dataset_path
:
lm_eval.datasets.hellaswag.hellaswag
dataset_path
:
None
dataset_name
:
hellaswag
dataset_name
:
hellaswag
output_type
:
multiple_choice
output_type
:
multiple_choice
training_split
:
train
training_split
:
train
...
...
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