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

Confusing error message when a model isn't supplied #269

Closed
jxmorris12 opened this issue Sep 1, 2020 · 3 comments
Closed

Confusing error message when a model isn't supplied #269

jxmorris12 opened this issue Sep 1, 2020 · 3 comments
Labels
good first issue Good for newcomers invalid This doesn't seem right

Comments

@jxmorris12
Copy link
Collaborator

Output when I specify an attack without a model:

(torch) jxmorris12 12:50 PM > textattack attack --recipe bae
Traceback (most recent call last):
...
  File "/p/qdata/jm8wx/research/text_attacks/textattack/textattack/commands/attack/attack_args_helpers.py", line 343, in parse_model_from_args
    raise ValueError(f"Error: unsupported TextAttack model {args.model}")
ValueError: Error: unsupported TextAttack model None

I think that throwing an error (rather than providing a model by default) is the correct behavior. But this error message is unclear. We should check if any --model* args are supplied, and, if not, throw an error that says "please supply a model" or something like that!

@jxmorris12 jxmorris12 added good first issue Good for newcomers invalid This doesn't seem right labels Sep 1, 2020
@github-actions
Copy link

Stale issue message

@Hanyu-Liu-123
Copy link
Collaborator

I think the issue has been fixed so I'll close this issue!

@srujanjoshi
Copy link
Contributor

As of the latest version of TextAttack, this issue is fixed.
This is the (more helpful) error that the code snippet now produces:
ValueError: Must supply pretrained model or dataset

Not sure why this is open again, but I will close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers invalid This doesn't seem right
Projects
No open projects
Development

No branches or pull requests

4 participants