Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot reproduce colab-notebook #21

Open
j0st opened this issue Aug 19, 2021 · 0 comments
Open

Cannot reproduce colab-notebook #21

j0st opened this issue Aug 19, 2021 · 0 comments

Comments

@j0st
Copy link

j0st commented Aug 19, 2021

Hi,
I wanted to reproduce the Paraphrase.ipynb colab notebook but I get some errors in the fine-tuning section with PAWS-X dataset

checkpoint_callback = pl.callbacks.ModelCheckpoint(
    filepath=args.output_dir, prefix="checkpoint", monitor="val_loss", mode="min", save_top_k=5
)

train_params = dict(
    accumulate_grad_batches=args.gradient_accumulation_steps,
    gpus=args.n_gpu,
    max_epochs=args.num_train_epochs,
    early_stop_callback=False,
    precision= 16 if args.fp_16 else 32,
    amp_level=args.opt_level,
    gradient_clip_val=args.max_grad_norm,
    checkpoint_callback=checkpoint_callback,
    callbacks=[LoggingCallback()],
)

creates this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-17-213583cfc1cf> in <module>()
      1 checkpoint_callback = pl.callbacks.ModelCheckpoint(
----> 2     filepath=args.output_dir, prefix="checkpoint", monitor="val_loss", mode="min", save_top_k=5
      3 )
      4 
      5 train_params = dict(

TypeError: __init__() got an unexpected keyword argument 'filepath'

Any ideas? I just ran the notebook in google colab and didn't change any cells

Edit: managed to solve this by replacing "filepath" with "dirpath" and "prefix" with "filename" but then another error occured in the second the cell after that:

TypeError: __init__() got an unexpected keyword argument 'early_stop_callback'

Which probably still comes from the train_params or the checkpoint_callback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant