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

defaults changed #7600

Merged
merged 4 commits into from
Oct 3, 2023
Merged
Changes from 3 commits
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
10 changes: 5 additions & 5 deletions scripts/metric_calculation/peft_metric_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ def metric_max_over_ground_truths(metric_fn, prediction, ground_truths):
def main():
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument(
'--pred-file',
'--pred_file',
type=str,
help="Text file with test set prompts + model predictions. Prediction file can be made by running NeMo/examples/nlp/language_modeling/megatron_gpt_prompt_learning_eval.py",
)
parser.add_argument(
'--pred-field',
'--pred_field',
type=str,
help="The field in the json file that contains the prediction tokens",
default="pred",
)
parser.add_argument(
'--ground-truth-field',
'--label_field',
type=str,
help="The field in the json file that contains the ground truth tokens",
default="original_answers",
default="label",
)

args = parser.parse_args()
Expand All @@ -120,7 +120,7 @@ def main():
pred_line = json.loads(preds[i])

pred_answer = pred_line[args.pred_field]
true_answers = pred_line[args.ground_truth_field]
true_answers = pred_line[args.label_field]
if not isinstance(true_answers, list):
true_answers = [true_answers]

Expand Down