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
6f98c780
Commit
6f98c780
authored
Jun 02, 2023
by
lintangsutawika
Browse files
adjusted to follow pre-commit conventions
parent
9329fc9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
lm_eval/prompts/__init__.py
lm_eval/prompts/__init__.py
+5
-3
setup.py
setup.py
+3
-1
No files found.
lm_eval/prompts/__init__.py
View file @
6f98c780
...
...
@@ -22,10 +22,12 @@ def get_prompt(prompt_id: str, dataset_name=None, subset_name=None):
eval_logger
.
info
(
f
"Loading prompt from
{
category_name
}
for
{
dataset_full_name
}
"
)
if
category_name
==
"promptsource"
:
try
:
from
promptsource.templates
import
DatasetTemplates
from
promptsource.templates
import
DatasetTemplates
except
ModuleNotFoundError
:
raise
Exception
(
"Tried to load a Promptsource template, but promptsource is not installed "
,
"please install promptsource via pip install lm-eval[promptsource] or pip install -e .[promptsource]"
)
raise
Exception
(
"Tried to load a Promptsource template, but promptsource is not installed "
,
"please install promptsource via pip install lm-eval[promptsource] or pip install -e .[promptsource]"
,
)
try
:
if
subset_name
is
None
:
prompts
=
DatasetTemplates
(
dataset_name
=
dataset_name
)
...
...
setup.py
View file @
6f98c780
...
...
@@ -44,6 +44,8 @@ setuptools.setup(
"dev"
:
[
"black"
,
"flake8"
,
"pre-commit"
,
"pytest"
,
"pytest-cov"
],
"multilingual"
:
[
"nagisa>=0.2.7"
,
"jieba>=0.42.1"
],
"sentencepiece"
:
[
"sentencepiece>=0.1.98"
,
"protobuf>=4.22.1"
],
"promptsource"
:
[
"promptsource @ git+https://github.com/bigscience-workshop/promptsource.git#egg=promptsource"
]
"promptsource"
:
[
"promptsource @ git+https://github.com/bigscience-workshop/promptsource.git#egg=promptsource"
],
},
)
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