transformers/docs/source/en/internal/file_utils.md

1.4 KiB

General Utilities

This page lists all of Transformers general utility functions that are found in the file utils.py.

Most of those are only useful if you are studying the general code in the library.

Enums and namedtuples

autodoc utils.ExplicitEnum

autodoc utils.PaddingStrategy

autodoc utils.TensorType

Special Decorators

autodoc utils.add_start_docstrings

autodoc utils.add_start_docstrings_to_model_forward

autodoc utils.add_end_docstrings

autodoc utils.add_code_sample_docstrings

autodoc utils.replace_return_docstrings

Special Properties

autodoc utils.cached_property

Other Utilities

autodoc utils._LazyModule