Kevin Fink commited on
Commit
d37e5b1
·
1 Parent(s): 959fe56
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -126,6 +126,7 @@ def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size
126
  if os.access(f'/data/{hub_id.strip()}_test_dataset', os.R_OK):
127
  train_dataset = load_from_disk(f'/data/{hub_id.strip()}_train_dataset3')
128
  saved_test_dataset = load_from_disk(f'/data/{hub_id.strip()}_validation_dataset')
 
129
  print("FOUND TEST")
130
  # Create Trainer
131
  data_collator = DataCollatorForSeq2Seq(tokenizer, model=model)
@@ -133,7 +134,7 @@ def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size
133
  model=model,
134
  args=training_args,
135
  train_dataset=train_dataset,
136
- eval_dataset=saved_test_dataset,
137
  compute_metrics=compute_metrics,
138
  data_collator=data_collator,
139
  #processing_class=tokenizer,
 
126
  if os.access(f'/data/{hub_id.strip()}_test_dataset', os.R_OK):
127
  train_dataset = load_from_disk(f'/data/{hub_id.strip()}_train_dataset3')
128
  saved_test_dataset = load_from_disk(f'/data/{hub_id.strip()}_validation_dataset')
129
+ dataset = load_dataset(dataset_name.strip())
130
  print("FOUND TEST")
131
  # Create Trainer
132
  data_collator = DataCollatorForSeq2Seq(tokenizer, model=model)
 
134
  model=model,
135
  args=training_args,
136
  train_dataset=train_dataset,
137
+ eval_dataset=dataset['validation'],
138
  compute_metrics=compute_metrics,
139
  data_collator=data_collator,
140
  #processing_class=tokenizer,