Joshua Lochner commited on
Commit
63f1925
1 Parent(s): 69fe24d

Allow seeding for evaluations

Browse files
Files changed (1) hide show
  1. src/evaluate.py +5 -4
src/evaluate.py CHANGED
@@ -6,8 +6,8 @@ from transformers import (
6
  )
7
  from preprocess import DatasetArguments, ProcessedArguments, get_words
8
  from model import get_classifier_vectorizer
9
- from shared import device
10
- from predict import ClassifierArguments, predict, filter_predictions, TrainingOutputArguments
11
  from segment import word_start, word_end, SegmentationArguments, add_labels_to_words
12
  import pandas as pd
13
  from dataclasses import dataclass, field
@@ -150,10 +150,11 @@ def main():
150
  EvaluationArguments,
151
  ProcessedArguments,
152
  SegmentationArguments,
153
- ClassifierArguments
 
154
  ))
155
 
156
- evaluation_args, processed_args, segmentation_args, classifier_args = hf_parser.parse_args_into_dataclasses()
157
 
158
  model = AutoModelForSeq2SeqLM.from_pretrained(evaluation_args.model_path)
159
  model.to(device())
 
6
  )
7
  from preprocess import DatasetArguments, ProcessedArguments, get_words
8
  from model import get_classifier_vectorizer
9
+ from shared import device, GeneralArguments
10
+ from predict import ClassifierArguments, predict, add_predictions, TrainingOutputArguments
11
  from segment import word_start, word_end, SegmentationArguments, add_labels_to_words
12
  import pandas as pd
13
  from dataclasses import dataclass, field
 
150
  EvaluationArguments,
151
  ProcessedArguments,
152
  SegmentationArguments,
153
+ ClassifierArguments,
154
+ GeneralArguments
155
  ))
156
 
157
+ evaluation_args, processed_args, segmentation_args, classifier_args, _ = hf_parser.parse_args_into_dataclasses()
158
 
159
  model = AutoModelForSeq2SeqLM.from_pretrained(evaluation_args.model_path)
160
  model.to(device())