Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/transformers/models/levit/convert_levit_timm_to_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,14 @@ def convert_weights_and_push(save_directory: Path, model_name: str = None, push_
required=False,
help="Path to the output PyTorch model directory.",
)
parser.add_argument("--push_to_hub", action="store_true", help="Push model and feature extractor to the hub")
parser.add_argument(
"--push_to_hub",
default=True,
type=bool,
required=False,
help="If True, push model and feature extractor to the hub.",
"--no-push_to_hub",
dest="push_to_hub",
action="store_false",
help="Do not push model and feature extractor to the hub",
)
parser.set_defaults(push_to_hub=True)

@NielsRogge NielsRogge Jan 5, 2023

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) I'm not using this line in any conversion script

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NielsRogge removed.


args = parser.parse_args()
pytorch_dump_folder_path: Path = args.pytorch_dump_folder_path
Expand Down