Skip to content

module core.metric

Global Variables

  • TYPE_CHECKING

class Meter

value reducer that works recursively.


method evaluate

evaluate(*args, **kwds)

method reset

reset()

method sync

sync()

method update

update(value, *args)

class DictMetric

method __init__

__init__(meters=None, meter_prototype=None)

method evaluate

evaluate(*args, **kwds)

method reset

reset()

method sync

sync()

method update

update(explicit={}, *shared_args, **kwds)

class MetricNode

method __init__

__init__(*args, **kwds)

property board

the board writer of current task.


property device

the assigned device by current launcher.


property epoch_size

the size of current epoch.


property epoch_steps

the steps of current epoch.


property global_auto_steps

the global steps of current task.


property global_train_epochs

the global train epochs of current task.


property global_train_steps

the global train steps of current task.


property grad_acc_steps

the grad accumulator steps of current task.


property grad_scaler

the grad scaler of current task.


property launcher

the current launcher.


property name

the node name in the current activated ExecutableGraph.


property out_dir

the output directory of current task.


property run_id

the run id of current task.


property step_mode

whether current task is running by step (True) or by epoch (False).


property task

the current task.


property training

whether current task is training.


method better

better(new_value)  bool

method epoch_end

epoch_end()

method epoch_start

epoch_start()

method tensorboard_log_metric

tensorboard_log_metric(postfix='')

method update

update()

class ValueMeter


method evaluate

evaluate()

method reset

reset()

method sync

sync()

method update

update(value: 'Tensor')

class SummationMeter


method evaluate

evaluate()

method reset

reset()

method sync

sync()

method update

update(batch_sum: 'Tensor')

class AverageMeter


method evaluate

evaluate()

method reset

reset()

method sync

sync()

method update

update(batch_avg: 'Tensor', count: 'int' = 1)

class MovingAverageMeter

method __init__

__init__(window_size: 'int')  None

method evaluate

evaluate()

method reset

reset()

method sync

sync()

method update

update(*values)