Skip to content

Commit

Permalink
Informative 2 (huggingface#34154)
Browse files Browse the repository at this point in the history
* Informative

* style

* Informative 2

* Apply suggestions from code review

Co-authored-by: lewtun <[email protected]>

---------

Co-authored-by: lewtun <[email protected]>
  • Loading branch information
2 people authored and BernardZach committed Dec 6, 2024
1 parent fb8a413 commit ef0d2ac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ def unzip(zip_path: str, dest_dir: str) -> None:
parser.add_argument(
"--src",
type=str,
help="path to marian model sub dir. yaml.load will be used to load the configuration file, please be weary of which file you're loading.",
help="path to marian model sub dir. yaml.load will be used to load the configuration file, please be wary of which file you're loading.",
default="en-de",
)
parser.add_argument("--dest", type=str, default=None, help="Path to the output PyTorch model.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,8 @@ def get_name(checkpoint_file: Path):
type=Path,
help=(
"A directory containing the model's checkpoints. The directory has to have the following structure:"
" <DIR_NAME>/<DATASET_NAME>/<CONFIG_NAME>.pkl"
" <DIR_NAME>/<DATASET_NAME>/<CONFIG_NAME>.pkl\n"
"Given the files are in the pickle format, please be wary of passing it files you trust."
),
)
parser.add_argument(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def convert_mobilevitv2_checkpoint(task_name, checkpoint_path, orig_config_path,
"--orig_config_path",
required=True,
type=str,
help="Path to the original config file. yaml.load will be used to load the file, please be weary of which file you're loading.",
help="Path to the original config file. yaml.load will be used to load the file, please be wary of which file you're loading.",
)
parser.add_argument(
"--pytorch_dump_folder_path", required=True, type=str, help="Path to the output PyTorch model directory."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,12 @@ def convert_trax_checkpoint_to_pytorch(trax_model_pkl_path, config_file, pytorch
parser = argparse.ArgumentParser()
# Required parameters
parser.add_argument(
"--trax_model_pkl_path", default=None, type=str, required=True, help="Path to the TensorFlow checkpoint path."
"--trax_model_pkl_path",
default=None,
type=str,
required=True,
help="Path to the TensorFlow checkpoint path.\n"
"Given the files are in the pickle format, please be wary of passing it files you trust.",
)
parser.add_argument(
"--config_file",
Expand Down

0 comments on commit ef0d2ac

Please sign in to comment.