Skip to content

Logger

source

Logger(
   log_dir: Path
)


The logger class.

Args

  • log_dir : The logging location.

Returns

Logger instance.

Methods:

.record

source

.record(
   key: str, value: Any
)


Record the metric.

Args

  • key (str) : The key of the metric.
  • value (Any) : The value of the metric.

Returns

None.

.parse_train_msg

source

.parse_train_msg(
   msg: Dict
)


Parse the training message.

Args

  • msg (Dict) : The training message.

Returns

The formatted string.

.parse_eval_msg

source

.parse_eval_msg(
   msg: Dict
)


Parse the evaluation message.

Args

  • msg (Dict) : The evaluation message.

Returns

The formatted string.

.time_stamp

source

.time_stamp()


Return the current time stamp.

.info

source

.info(
   msg: str
)


Output msg with 'info' level.

Args

  • msg (str) : Message to be printed.

Returns

None.

.debug

source

.debug(
   msg: str
)


Output msg with 'debug' level.

Args

  • msg (str) : Message to be printed.

Returns

None.

.error

source

.error(
   msg: str
)


Output msg with 'error' level.

Args

  • msg (str) : Message to be printed.

Returns

None.

.train

source

.train(
   msg: Dict
)


Output msg with 'train' level.

Args

  • msg (Dict) : Message to be printed.

Returns

None.

.eval

source

.eval(
   msg: Dict
)


Output msg with 'eval' level.

Args

  • msg (Dict) : Message to be printed.

Returns

None.