Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -31,8 +31,7 @@ def compute_model_card_evaluation_results(tokenizer, model_checkpoint, raw_datas
|
|
31 |
tokenized_datasets = raw_datasets.map(preprocess_function, batched=True)
|
32 |
model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)
|
33 |
|
34 |
-
|
35 |
-
batch_size = 8
|
36 |
args = TrainingArguments(
|
37 |
"test-glue",
|
38 |
eval_strategy = "epoch",
|
@@ -47,23 +46,6 @@ def compute_model_card_evaluation_results(tokenizer, model_checkpoint, raw_datas
|
|
47 |
metric_for_best_model="accuracy",
|
48 |
report_to="none"
|
49 |
)
|
50 |
-
"""
|
51 |
-
batch_size = 1024
|
52 |
-
args = TrainingArguments(
|
53 |
-
"test-glue",
|
54 |
-
eval_strategy = "epoch",
|
55 |
-
learning_rate=0.0007199555649276667,
|
56 |
-
seed=33,
|
57 |
-
lr_scheduler_type="linear",
|
58 |
-
per_device_train_batch_size=batch_size,
|
59 |
-
per_device_eval_batch_size=batch_size,
|
60 |
-
num_train_epochs=7,
|
61 |
-
weight_decay=0.01,
|
62 |
-
load_best_model_at_end=False,
|
63 |
-
metric_for_best_model="accuracy",
|
64 |
-
report_to="none"
|
65 |
-
)
|
66 |
-
"""
|
67 |
trainer = Trainer(
|
68 |
model,
|
69 |
args,
|
|
|
31 |
tokenized_datasets = raw_datasets.map(preprocess_function, batched=True)
|
32 |
model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)
|
33 |
|
34 |
+
batch_size = 16
|
|
|
35 |
args = TrainingArguments(
|
36 |
"test-glue",
|
37 |
eval_strategy = "epoch",
|
|
|
46 |
metric_for_best_model="accuracy",
|
47 |
report_to="none"
|
48 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
trainer = Trainer(
|
50 |
model,
|
51 |
args,
|