Big file_utils cleanup (#16396)
* Big file_utils cleanup * This one still needs to be treated separately
This commit is contained in:
@@ -88,4 +88,4 @@ Due to Pytorch design, this functionality is only available for floating dtypes.
|
||||
|
||||
## Pushing to the Hub
|
||||
|
||||
[[autodoc]] file_utils.PushToHubMixin
|
||||
[[autodoc]] utils.PushToHubMixin
|
||||
|
||||
@@ -12,7 +12,7 @@ specific language governing permissions and limitations under the License.
|
||||
|
||||
# Model outputs
|
||||
|
||||
All models have outputs that are instances of subclasses of [`~file_utils.ModelOutput`]. Those are
|
||||
All models have outputs that are instances of subclasses of [`~utils.ModelOutput`]. Those are
|
||||
data structures containing all the information returned by the model, but that can also be used as tuples or
|
||||
dictionaries.
|
||||
|
||||
@@ -57,7 +57,7 @@ documented on their corresponding model page.
|
||||
|
||||
## ModelOutput
|
||||
|
||||
[[autodoc]] file_utils.ModelOutput
|
||||
[[autodoc]] utils.ModelOutput
|
||||
- to_tuple
|
||||
|
||||
## BaseModelOutput
|
||||
|
||||
@@ -40,7 +40,7 @@ The [`Trainer`] contains the basic training loop which supports the above featur
|
||||
The [`Trainer`] class is optimized for 🤗 Transformers models and can have surprising behaviors
|
||||
when you use it on other models. When using it on your own model, make sure:
|
||||
|
||||
- your model always return tuples or subclasses of [`~file_utils.ModelOutput`].
|
||||
- your model always return tuples or subclasses of [`~utils.ModelOutput`].
|
||||
- your model can compute the loss if a `labels` argument is provided and that loss is returned as the first
|
||||
element of the tuple (if your model returns tuples)
|
||||
- your model can accept multiple label arguments (use the `label_names` in your [`TrainingArguments`] to indicate their name to the [`Trainer`]) but none of them should be named `"label"`.
|
||||
|
||||
Reference in New Issue
Block a user