Trainer
- class neuromancer.trainer.Trainer(problem: ~neuromancer.problem.Problem, train_data: ~torch.utils.data.dataloader.DataLoader, dev_data: ~torch.utils.data.dataloader.DataLoader | None = None, test_data: ~torch.utils.data.dataloader.DataLoader | None = None, optimizer: ~torch.optim.optimizer.Optimizer | None = None, logger: ~neuromancer.loggers.BasicLogger | None = None, callback=<neuromancer.callbacks.Callback object>, lr_scheduler=False, epochs=1000, epoch_verbose=1, patience=5, warmup=0, train_metric='train_loss', dev_metric='dev_loss', test_metric='test_loss', eval_metric='dev_loss', eval_mode='min', clip=100.0, device='cpu')[source]
Class encapsulating boilerplate PyTorch training code. Training procedure is somewhat extensible through methods in Callback objects associated with training and evaluation waypoints.