General Utilities
Last updated
Last updated
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.
( valuenames = Nonemodule = Nonequalname = Nonetype = Nonestart = 1 )
Enum with more explicit error message for missing values.
( valuenames = Nonemodule = Nonequalname = Nonetype = Nonestart = 1 )
Possible values for the padding
argument in . Useful for tab-completion in an IDE.
( valuenames = Nonemodule = Nonequalname = Nonetype = Nonestart = 1 )
transformers.add_start_docstrings
( *docstr )
transformers.utils.add_start_docstrings_to_model_forward
( *docstr )
transformers.add_end_docstrings
( *docstr )
transformers.utils.add_code_sample_docstrings
( *docstrprocessor_class = Nonecheckpoint = Noneoutput_type = Noneconfig_class = Nonemask = '[MASK]'qa_target_start_index = 14qa_target_end_index = 15model_cls = Nonemodality = Noneexpected_output = Noneexpected_loss = Nonereal_checkpoint = None )
transformers.utils.replace_return_docstrings
( output_type = Noneconfig_class = None )
( fget = Nonefset = Nonefdel = Nonedoc = None )
Descriptor that mimics @property but caches output in member variable.
From tensorflow_datasets
Built-in in functools from Python 3.8.
( namemodule_fileimport_structuremodule_spec = Noneextra_objects = None )
Module class that surfaces all objects but only performs associated imports when the objects are requested.
Possible values for the return_tensors
argument in . Useful for tab-completion in an IDE.