Black preview (#17217)
* Black preview * Fixup too! * Fix check copies * Use the same version as the CI * Bump black
This commit is contained in:
@@ -219,7 +219,10 @@ def parse_args():
|
||||
"--pad_to_multiple_of",
|
||||
type=int,
|
||||
default=None,
|
||||
help="If set will pad the sequence to a multiple of the provided value. This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability >= 7.5 (Volta).",
|
||||
help=(
|
||||
"If set will pad the sequence to a multiple of the provided value. This is especially useful to enable the"
|
||||
" use of Tensor Cores on NVIDIA hardware with compute capability >= 7.5 (Volta)."
|
||||
),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--adam_beta1",
|
||||
@@ -440,7 +443,7 @@ def main():
|
||||
# only normalized-inputs-training is supported
|
||||
if not feature_extractor.do_normalize:
|
||||
raise ValueError(
|
||||
"Training is only supported for normalized inputs. " "Make sure ``feature_extractor.do_normalize == True``"
|
||||
"Training is only supported for normalized inputs. Make sure ``feature_extractor.do_normalize == True``"
|
||||
)
|
||||
|
||||
# set max & min audio length in number of samples
|
||||
@@ -496,7 +499,8 @@ def main():
|
||||
# apply_spec_augment has to be True, mask_feature_prob has to be 0.0
|
||||
if not config.do_stable_layer_norm or config.feat_extract_norm != "layer":
|
||||
raise ValueError(
|
||||
"PreTraining is only supported for ``config.do_stable_layer_norm=True`` and ``config.feat_extract_norm='layer'"
|
||||
"PreTraining is only supported for ``config.do_stable_layer_norm=True`` and"
|
||||
" ``config.feat_extract_norm='layer'"
|
||||
)
|
||||
|
||||
# initialize random model
|
||||
@@ -615,7 +619,7 @@ def main():
|
||||
lr_scheduler.step()
|
||||
elif accelerator.is_local_main_process:
|
||||
progress_bar.write(
|
||||
"Gradients have overflown - skipping update step... " f"Updating gradient scale to {scale}..."
|
||||
f"Gradients have overflown - skipping update step... Updating gradient scale to {scale}..."
|
||||
)
|
||||
|
||||
# update gumbel temperature
|
||||
|
||||
Reference in New Issue
Block a user