src/transformers/trainer_utils.py
def stop_and_update_metrics(self, metrics=None):
        """ combine stop + update in one call for simpler code """
        if self.skip_memory_metrics:
            return

        stage = self.derive_stage()
        self.stop(stage)

        # init doesn't have metrics to update so we just save that data for later stages to retrieve
        if metrics is not None:
            self.update_metrics(stage, metrics)
 combine stop + update in one call for simpler code 
combine stop + update in one call for simpler code
combine stop + update in one call for simpler code
def stop_and_update_metrics(self, metrics=None):
        if self.skip_memory_metrics:
            return
        stage = self.derive_stage()
        self.stop(stage)
        if metrics is not None:
            self.update_metrics(stage, metrics)
def stop_and_update_metrics ( self , metrics = None ) : if self . skip_memory_metrics : return stage = self . derive_stage ( ) self . stop ( stage ) if metrics is not None : self . update_metrics ( stage , metrics )
combine stop + update in one call for simpler code
combine stop + update in one call for simpler code
""" combine stop + update in one call for simpler code """ # init doesn't have metrics to update so we just save that data for later stages to retrieve
self
metrics