From 9a5ef83748d656e65013567f6feedb201d44258b Mon Sep 17 00:00:00 2001 From: Sam Shleifer Date: Sat, 8 Aug 2020 21:51:37 -0400 Subject: [PATCH] [s2s] fix --gpus clarg collision (#6358) --- examples/lightning_base.py | 5 ----- examples/text-classification/run_pl_glue.py | 7 ++++++- examples/token-classification/run_pl_ner.py | 6 ++++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/examples/lightning_base.py b/examples/lightning_base.py index 54719b4ae9..e2532a28ea 100644 --- a/examples/lightning_base.py +++ b/examples/lightning_base.py @@ -277,11 +277,6 @@ def add_generic_args(parser, root_dir) -> None: required=True, help="The output directory where the model predictions and checkpoints will be written.", ) - - parser.add_argument( - "--gpus", default=0, type=int, help="The number of GPUs allocated for this, it is by default 0 meaning none", - ) - parser.add_argument( "--fp16", action="store_true", diff --git a/examples/text-classification/run_pl_glue.py b/examples/text-classification/run_pl_glue.py index cf706798b9..0ed60537ee 100644 --- a/examples/text-classification/run_pl_glue.py +++ b/examples/text-classification/run_pl_glue.py @@ -155,7 +155,12 @@ class GLUETransformer(BaseTransformer): parser.add_argument( "--task", default="", type=str, required=True, help="The GLUE task to run", ) - + parser.add_argument( + "--gpus", + default=0, + type=int, + help="The number of GPUs allocated for this, it is by default 0 meaning none", + ) parser.add_argument( "--data_dir", default=None, diff --git a/examples/token-classification/run_pl_ner.py b/examples/token-classification/run_pl_ner.py index eca8ffd5f5..022f7f32b9 100644 --- a/examples/token-classification/run_pl_ner.py +++ b/examples/token-classification/run_pl_ner.py @@ -168,6 +168,12 @@ class NERTransformer(BaseTransformer): type=str, help="Path to a file containing all labels. If not specified, CoNLL-2003 labels are used.", ) + parser.add_argument( + "--gpus", + default=0, + type=int, + help="The number of GPUs allocated for this, it is by default 0 meaning none", + ) parser.add_argument( "--data_dir",