Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Support new accelerate api #33

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions evaluation/run_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ def parse_args():
default=None,
help="The configuration name of the dataset to use (via the datasets library).",
)
parser.add_argument(
"--template_config_name",
type=str,
default=None,
help="The name of the dataset_config_name of the template we want to use, example: use XNLI En prompts for XNLI Fr",
)
parser.add_argument(
"--template_name",
type=str,
Expand Down Expand Up @@ -366,10 +372,16 @@ def main():

# Get the prompt to apply and the possible targets.
# TODO(Victor): If pulling from pre-processed data, remove this logic.

if args.dataset_config_name is None or args.template_config_name is None or args.dataset_name == "anli":
Copy link
Member Author

@thomasw21 thomasw21 Jul 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops merged too fast, this should've been

if (args.dataset_config_name is None and args.template_config_name is None) or args.dataset_name == "anli"

cc @lintangsutawika

prompt_dataset_name = f"{args.dataset_name}"
elif args.template_config_name is not None:
prompt_dataset_name = f"{args.dataset_name}/{args.template_config_name}"
else:
prompt_dataset_name = f"{args.dataset_name}/{args.dataset_config_name}"

prompts = DatasetTemplates(
f"{args.dataset_name}"
if args.dataset_config_name is None or args.dataset_name == "anli"
else f"{args.dataset_name}/{args.dataset_config_name}"
prompt_dataset_name
)

if args.template_name is not None:
Expand Down