Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix type annotations for arguments in training_args #24550

Merged
merged 21 commits into from
Jul 20, 2023
Merged
Changes from 6 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
6 changes: 3 additions & 3 deletions src/transformers/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ class TrainingArguments:
)
},
)
sharded_ddp: str = field(
sharded_ddp: Union[Optional[str], bool, List[ShardedDDPOption]] = field(
shauray8 marked this conversation as resolved.
Show resolved Hide resolved
default="",
metadata={
"help": (
Expand All @@ -955,7 +955,7 @@ class TrainingArguments:
),
},
)
fsdp: str = field(
fsdp: Union[Optional[str], bool, List[FSDPOption]] = field(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense, I copy pasted the types from the issue itself. Thank You

default="",
metadata={
"help": (
Expand All @@ -976,7 +976,7 @@ class TrainingArguments:
)
},
)
fsdp_config: Optional[str] = field(
fsdp_config: Union[Optional[str], Dict] = field(
Copy link
Collaborator

Choose a reason for hiding this comment

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

This was already taken care of in #24549

default=None,
metadata={
"help": (
Expand Down