Skip to content

Add docstrings to type validator functions#45700

Closed
dhruv7477 wants to merge 1 commit intohuggingface:mainfrom
dhruv7477:doc/type-validators-docstrings
Closed

Add docstrings to type validator functions#45700
dhruv7477 wants to merge 1 commit intohuggingface:mainfrom
dhruv7477:doc/type-validators-docstrings

Conversation

@dhruv7477
Copy link
Copy Markdown

Add missing docstrings to the 11 undocumented public functions in src/transformers/utils/type_validators.py. The existing interval, probability, and activation_fn_key functions already had docstrings; this brings the rest of the file up to the same standard.

Each docstring follows the Google-style format used elsewhere in the file, listing accepted types and valid values where non-obvious (e.g. the valid keys for image_size_validator, the accepted device names for device_validator, the nested structure accepted by video_metadata_validator).

No logic changes.

Signed-off-by: Dhruv Sharma <dhruv7477@gmail.com>
@Rocketknight1
Copy link
Copy Markdown
Member

We generally don't want things like code agent docstrings right now, I'm sorry! We might do this ourselves in an agent cleanup pass at some point, but it just creates a lot of reviewer noise at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants