You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/setneg-dir/Uli/uli-env/lib/python3.6/site-packages/transformers/trainer.py in init(self, model, args, data_collator, train_dataset, eval_dataset, tokenizer, model_init, compute_metrics, callbacks, optimizers, preprocess_logits_for_metrics)
427
428 if train_dataset is not None and not has_length(train_dataset) and args.max_steps <= 0:
--> 429 raise ValueError("train_dataset does not implement len, max_steps has to be specified")
430
431 if (
ValueError: train_dataset does not implement len, max_steps has to be specified
may i ask you for your advices to solve the problem?
Thank You
The text was updated successfully, but these errors were encountered:
dear authors, i tried to re-implemented IndoBERT based on your code but when i train the model :
metric = load_metric("accuracy")
def compute_metrics(eval_pred):
logits, labels = eval_pred
predictions = np.argmax(logits, axis=-1)
trainer = Trainer(
model=model,
args=training_args,
train_dataset=train_dataset,
eval_dataset=eval_dataset,
compute_metrics=compute_metrics,
)
train_history = trainer.train()
train_evaluate = trainer.evaluate()
i found the issue like this:
ValueError Traceback (most recent call last)
in
12 train_dataset=train_dataset,
13 eval_dataset=eval_dataset,
---> 14 compute_metrics=compute_metrics,
15 )
16
/setneg-dir/Uli/uli-env/lib/python3.6/site-packages/transformers/trainer.py in init(self, model, args, data_collator, train_dataset, eval_dataset, tokenizer, model_init, compute_metrics, callbacks, optimizers, preprocess_logits_for_metrics)
427
428 if train_dataset is not None and not has_length(train_dataset) and args.max_steps <= 0:
--> 429 raise ValueError("train_dataset does not implement len, max_steps has to be specified")
430
431 if (
ValueError: train_dataset does not implement len, max_steps has to be specified
may i ask you for your advices to solve the problem?
Thank You
The text was updated successfully, but these errors were encountered: