chore: fix function argument descriptions (#36392)

This commit is contained in:
Afanti 2025-02-25 22:28:34 +08:00 committed by GitHub
parent 7c8916ddb5
commit ca6ebcb9bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1523,7 +1523,7 @@ def get_user_field(
is_valid_answer (`Callable`, *optional*):
If set, the question will be asked until this function returns `True` on the provided answer.
convert_to (`Callable`, *optional*):
If set, the answer will be passed to this function. If this function raises an error on the procided
If set, the answer will be passed to this function. If this function raises an error on the provided
answer, the question will be asked again.
fallback_message (`str`, *optional*):
A message that will be displayed each time the question is asked again to the user.
@ -1710,7 +1710,7 @@ def get_user_input():
frameworks = None
else:
frameworks = get_user_field(
"Please enter the list of framworks you want (pt, tf, flax) separated by spaces",
"Please enter the list of frameworks you want (pt, tf, flax) separated by spaces",
is_valid_answer=lambda x: all(p in ["pt", "tf", "flax"] for p in x.split(" ")),
)
frameworks = list(set(frameworks.split(" ")))