console_logger
allennlp.training.callbacks.console_logger
ConsoleLoggerCallback¶
@TrainerCallback.register("console_logger")
class ConsoleLoggerCallback(TrainerCallback):
| def __init__(
| self,
| serialization_dir: str,
| should_log_inputs: bool = True
| ) -> None
on_batch¶
class ConsoleLoggerCallback(TrainerCallback):
| ...
| def on_batch(
| self,
| trainer: "GradientDescentTrainer",
| batch_inputs: List[TensorDict],
| batch_outputs: List[Dict[str, Any]],
| batch_metrics: Dict[str, Any],
| epoch: int,
| batch_number: int,
| is_training: bool,
| is_primary: bool = True,
| batch_grad_norm: Optional[float] = None,
| **kwargs
| ) -> None
on_epoch¶
class ConsoleLoggerCallback(TrainerCallback):
| ...
| def on_epoch(
| self,
| trainer: "GradientDescentTrainer",
| metrics: Dict[str, Any],
| epoch: int,
| is_primary: bool = True,
| **kwargs
| ) -> None