Skip to content

Commit

Permalink
Fixing some boolean expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Veton Matoshi authored and Veton Matoshi committed Jun 2, 2023
1 parent 7445227 commit 3aac11d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
parser.add_argument('-bz', '--batch_size', help='Define the batch size.', default=None)
parser.add_argument('-dhs', '--do_hyperparameter_search',
help="Specify if you want to apply hyperparameter search.", default=False)
parser.add_argument('-fp16', '--do_fp16', help='Decide if you want to train and evaluate on fp16.', default=None)
parser.add_argument('-fp16', '--do_fp16', help='Decide if you want to train and evaluate on fp16.', default=False)
parser.add_argument('-es', '--evaluation_strategy',
help="The evaluation strategy to adopt during training. Possible values are: no = No "
"evaluation is done during training; steps = Evaluation is done (and logged) every "
Expand Down
2 changes: 1 addition & 1 deletion utils/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def generate_command_for_experiments(**data):
# If no GPU available, we cannot make use of --fp16 --fp16_full_eval
data["gpu_number"] = ""
else: # only when we have a GPU, we can run fp16 training
if data["do_fp16"] is None:
if data["do_fp16"] == False:
if data["model_name"] == "microsoft/mdeberta-v3-base":
if int(data["gpu_memory"]) == 80: # A100 also supports bf16
command_template += ' --bf16 --bf16_full_eval'
Expand Down

0 comments on commit 3aac11d

Please sign in to comment.