TypeError: full_like() got an unexpected keyword argument 'shape'
I have finished training my BERT model from scratch after callingtrainer.train()Next, I want to evaluate my val set and get val loss by callingtrainer.evaluate()but I have received this errorTypeError: full_like() got an unexpected keyword argument 'shape'I couldn’t find much information about this error or a solution to fix it. If anyone could give me a suggestion it would be highly appreciated.Here is the full code of my Trainer and Training arguments:from transformers import Trainer, TrainingArgumentstraining_args = TrainingArguments(
    output_dir="./bertmodel",
    overwrite_output_dir=True,
    num_train_epochs=5,
    per_device_train_batch_size=32,
    per_device_eval_batch_size=32,
    save_steps=10000,
    save_total_limit=2,
    do_train=True,                        
    do_eval=True, 
    logging_steps=700,
    eval_steps = None,
    prediction_loss_only=True,
)

trainer = Trainer(
    model=model,
    args=training_args,
    data_collator=data_collator,
    train_dataset=train_dataset,
    eval_dataset=eval_dataset,
)
2021-01-25T11:40:31Z
Maybe you need upgrade package numpy by ‘pip install numpy --upgrade’
2021-02-01T21:41:29Z
Is this error related to numpy package version? Interesting - I will try that out. Thank you very much!
2021-02-01T21:47:41Z
Oh it’s new-ish indeed. I made aPRto ensure we have numpy 1.17 minimum installed as a dependency to avoid this error in the future.
2021-02-04T07:51:43Z
Thank you so much, now it makes sense why my code didn’t work previously!!