[Trainer] memory tracker metrics (#10225)
* memory tracker metrics * go back to eval for somewhat consistency * handle no-gpu case * deal with stackable eval calls * restore callback order * style * simplify the API * add test * docs * consistently use eval_ prefix * improve docs * Update src/transformers/trainer_utils.py Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * rename method * style Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
This commit is contained in:
@@ -252,6 +252,9 @@ class TrainingArguments:
|
||||
otherwise.
|
||||
dataloader_pin_memory (:obj:`bool`, `optional`, defaults to :obj:`True`)):
|
||||
Whether you want to pin memory in data loaders or not. Will default to :obj:`True`.
|
||||
skip_memory_metrics (:obj:`bool`, `optional`, defaults to :obj:`False`)):
|
||||
Whether to skip adding of memory profiler reports to metrics. Defaults to :obj:`False`.
|
||||
|
||||
"""
|
||||
|
||||
output_dir: Optional[str] = field(
|
||||
@@ -451,6 +454,9 @@ class TrainingArguments:
|
||||
dataloader_pin_memory: bool = field(
|
||||
default=True, metadata={"help": "Whether or not to pin memory for DataLoader."}
|
||||
)
|
||||
skip_memory_metrics: bool = field(
|
||||
default=False, metadata={"help": "Whether or not to skip adding of memory profiler reports to metrics."}
|
||||
)
|
||||
_n_gpu: int = field(init=False, repr=False, default=-1)
|
||||
|
||||
def __post_init__(self):
|
||||
|
||||
Reference in New Issue
Block a user