Unverified Commit bf8625e7 authored by Philip May's avatar Philip May Committed by GitHub
Browse files

add evaluate doc - trainer.evaluate returns 'epoch' from training (#8273)



* add evaluate doc

* fix style with utils/style.doc

* Update src/transformers/trainer.py
Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
parent ebde57ac
...@@ -1297,7 +1297,8 @@ class Trainer: ...@@ -1297,7 +1297,8 @@ class Trainer:
:obj:`__len__` method. :obj:`__len__` method.
Returns: Returns:
A dictionary containing the evaluation loss and the potential metrics computed from the predictions. A dictionary containing the evaluation loss and the potential metrics computed from the predictions. The
dictionary also contains the epoch number which comes from the training state.
""" """
if eval_dataset is not None and not isinstance(eval_dataset, collections.abc.Sized): if eval_dataset is not None and not isinstance(eval_dataset, collections.abc.Sized):
raise ValueError("eval_dataset must implement __len__") raise ValueError("eval_dataset must implement __len__")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment