Commit 6f98c780 authored by lintangsutawika's avatar lintangsutawika
Browse files

adjusted to follow pre-commit conventions

parent 9329fc9b
...@@ -24,8 +24,10 @@ def get_prompt(prompt_id: str, dataset_name=None, subset_name=None): ...@@ -24,8 +24,10 @@ def get_prompt(prompt_id: str, dataset_name=None, subset_name=None):
try: try:
from promptsource.templates import DatasetTemplates from promptsource.templates import DatasetTemplates
except ModuleNotFoundError: except ModuleNotFoundError:
raise Exception("Tried to load a Promptsource template, but promptsource is not installed ", raise Exception(
"please install promptsource via pip install lm-eval[promptsource] or pip install -e .[promptsource]") "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: try:
if subset_name is None: if subset_name is None:
prompts = DatasetTemplates(dataset_name=dataset_name) prompts = DatasetTemplates(dataset_name=dataset_name)
......
...@@ -44,6 +44,8 @@ setuptools.setup( ...@@ -44,6 +44,8 @@ setuptools.setup(
"dev": ["black", "flake8", "pre-commit", "pytest", "pytest-cov"], "dev": ["black", "flake8", "pre-commit", "pytest", "pytest-cov"],
"multilingual": ["nagisa>=0.2.7", "jieba>=0.42.1"], "multilingual": ["nagisa>=0.2.7", "jieba>=0.42.1"],
"sentencepiece": ["sentencepiece>=0.1.98", "protobuf>=4.22.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"
],
}, },
) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment