asahi417 commited on
Commit
0f15dd4
1 Parent(s): 3e831ea
Files changed (1) hide show
  1. training_scripts/finetune_t5.py +2 -1
training_scripts/finetune_t5.py CHANGED
@@ -162,7 +162,8 @@ def validate(
162
  label = [i[dataset_column_label] for i in dataset_instance]
163
  data = [i[dataset_column_text] for i in dataset_instance]
164
  model_score = []
165
- for model_path in glob(f"{output_dir}/*/*"):
 
166
  prediction_file = f"{model_path}/prediction.validate.{os.path.basename(dataset)}.{dataset_name}.txt"
167
  metric_file = f"{model_path}/metric.validate.{os.path.basename(dataset)}.{dataset_name}.json"
168
  metric = get_metric(
 
162
  label = [i[dataset_column_label] for i in dataset_instance]
163
  data = [i[dataset_column_text] for i in dataset_instance]
164
  model_score = []
165
+ for model_path in glob(f"{output_dir}/*/*/pytorch_model.bin"):
166
+ model_path = os.path.dirname(model_path)
167
  prediction_file = f"{model_path}/prediction.validate.{os.path.basename(dataset)}.{dataset_name}.txt"
168
  metric_file = f"{model_path}/metric.validate.{os.path.basename(dataset)}.{dataset_name}.json"
169
  metric = get_metric(