Loggers

class neuromancer.loggers.BasicLogger(args=None, savedir='test', verbosity=10, stdout=('nstep_dev_loss', 'loop_dev_loss', 'best_loop_dev_loss', 'nstep_dev_ref_loss', 'loop_dev_ref_loss'))[source]
clean_up()[source]
log_artifacts(artifacts)[source]

Stores artifacts created in training to disc.

Parameters:

artifacts – (dict {str: Object})

log_metrics(output, step=None)[source]

Print metrics to stdout.

Parameters:
  • output – (dict {str: tensor}) Will only record 0d tensors (scalars)

  • step – (int) Epoch of training

log_parameters()[source]

Pring experiment parameters to stdout

Parameters:

args – (Namespace) returned by argparse.ArgumentParser.parse_args()

log_weights(model)[source]
Parameters:

model – (nn.Module)

Returns:

(int) The number of learnable parameters in the model

class neuromancer.loggers.MLFlowLogger(args=None, savedir='test', verbosity=1, id=None, stdout=('nstep_dev_loss', 'loop_dev_loss', 'best_loop_dev_loss', 'nstep_dev_ref_loss', 'loop_dev_ref_loss'), logout=None)[source]
clean_up()[source]

Remove temporary files from file system

log_artifacts(artifacts={})[source]

Stores artifacts created in training to mlflow.

Parameters:

artifacts – (dict {str: Object})

log_metrics(output, step=0)[source]

Record metrics to mlflow

Parameters:
  • output – (dict {str: tensor}) Will only record 0d torch.Tensors (scalars)

  • step – (int) Epoch of training

log_parameters()[source]

Print experiment parameters to stdout

log_weights(model)[source]
Parameters:

model – (nn.Module)

Returns:

(int) Number of learnable parameters in the model.