bstraehle commited on
Commit
9d8f256
·
verified ·
1 Parent(s): a28b4b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -67,10 +67,10 @@ def fine_tune_model(base_model_name, dataset_name):
67
 
68
  # Split dataset into training and validation sets
69
 
70
- #train_dataset = dataset["train"]
71
- #test_dataset = dataset["test"]
72
- train_dataset = dataset["train"].shuffle(seed=42).select(range(1000))
73
- test_dataset = dataset["test"].shuffle(seed=42).select(range(100))
74
 
75
  print("### Training dataset")
76
  print(train_dataset)
@@ -86,6 +86,7 @@ def fine_tune_model(base_model_name, dataset_name):
86
  num_train_epochs=1,
87
  max_steps=1, # overwrites num_train_epochs
88
  push_to_hub=True, # only model, also need to push tokenizer
 
89
  #per_device_train_batch_size=16,
90
  #per_device_eval_batch_size=64,
91
  #eval_strategy="steps",
@@ -111,6 +112,7 @@ def fine_tune_model(base_model_name, dataset_name):
111
  args=training_args,
112
  train_dataset=train_dataset,
113
  eval_dataset=test_dataset,
 
114
  #compute_metrics=lambda pred: {"accuracy": torch.sum(pred.label_ids == pred.predictions.argmax(-1))},
115
  )
116
 
 
67
 
68
  # Split dataset into training and validation sets
69
 
70
+ train_dataset = dataset["train"]
71
+ test_dataset = dataset["test"]
72
+ #train_dataset = dataset["train"].shuffle(seed=42).select(range(1000))
73
+ #test_dataset = dataset["test"].shuffle(seed=42).select(range(100))
74
 
75
  print("### Training dataset")
76
  print(train_dataset)
 
86
  num_train_epochs=1,
87
  max_steps=1, # overwrites num_train_epochs
88
  push_to_hub=True, # only model, also need to push tokenizer
89
+ ### TODO ###
90
  #per_device_train_batch_size=16,
91
  #per_device_eval_batch_size=64,
92
  #eval_strategy="steps",
 
112
  args=training_args,
113
  train_dataset=train_dataset,
114
  eval_dataset=test_dataset,
115
+ ### TODO ###
116
  #compute_metrics=lambda pred: {"accuracy": torch.sum(pred.label_ids == pred.predictions.argmax(-1))},
117
  )
118