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

finetune.py: error: unrecognized arguments #6477

Closed
2 of 4 tasks
KylePiira opened this issue Aug 14, 2020 · 0 comments · Fixed by #6493
Closed
2 of 4 tasks

finetune.py: error: unrecognized arguments #6477

KylePiira opened this issue Aug 14, 2020 · 0 comments · Fixed by #6493

Comments

@KylePiira
Copy link
Contributor

Who can help

examples/distillation: @VictorSanh
examples/seq2seq: @sshleifer

Information

Model I am using (Bert, XLNet ...):

The problem arises when using:

  • the official example scripts: (give details below)
  • my own modified scripts: (give details below)

The tasks I am working on is:

  • an official GLUE/SQUaD task: (give the name)
  • my own task or dataset: (give details below)

To reproduce

Steps to reproduce the behavior:

  1. Try running seq2seq/finetune.sh with data_dir or output_dir with escaped spaces in it
  2. You'll get a finetune.py: error: unrecognized arguments

This is bad because Google Drive mounts at /content/drive/My Drive/ in Colab and thus the example scripts won't work if saving or reading from Drive.

I've created a Colab Notebook with repro.

The fix I've found is to change:

python finetune.py \
    --learning_rate=3e-5 \
    --fp16 \
    --gpus 1 \
    --do_train \
    --do_predict \
    --n_val 1000 \
    --val_check_interval 0.1 \
    $@

to

python finetune.py \
    --learning_rate=3e-5 \
    --fp16 \
    --gpus 1 \
    --do_train \
    --do_predict \
    --n_val 1000 \
    --val_check_interval 0.1 \
    "$@"
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

Successfully merging a pull request may close this issue.

1 participant