-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
collision between different cl arg definitions in examples #6310
Comments
Here is a potential idea of how to keep all the common cl arg definitions in
Granted, there is no public API to remove args once registered. This idea uses a hack that taps into an internal API. Alternatively,
or if no abstraction is desired it could go as explicit as:
but this probably defeats the purpose, just as well copy the whole thing. One thing to consider in either solution is that a subclass may want to have different defaults, so the new API could provide for defaults override as well. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The
examples
have an incosistency of how the cl args are defined and parsed. Some rely on PL's main args asfinetune.py
does: https://github.com/huggingface/transformers/blob/master/examples/seq2seq/finetune.py#L410others like
run_pl_glue.py
rely onlightening_base.py
's main args: https://github.com/huggingface/transformers/blob/master/examples/text-classification/run_pl_glue.py#L176now that we pushed
--gpus
intolightening_base.py
's main args the scripts that run PL's main args collide and we have:i.e. PL already supplies
--gpus
and many other args that some of the scripts inexamples
re-define.So either the example scripts need to stop using
pl.Trainer.add_argparse_args(parser)
and rely exclusively onlightning_base.add_generic_args
, or we need a different clean approach. It appears that different scripts have different needs arg-wise. But they all uselightning_base
.The problem got exposed in: #6027 and #6307
The text was updated successfully, but these errors were encountered: