Skip to content

General

Paweł Redzyński edited this page Nov 20, 2020 · 1 revision

The general idea behind the project is that it will be a library used to log metrics from within the code. Each run/training is considered as a set of consecutive steps. The purpose of the logger is to allow user to log metrics every n steps - n needs to adjustable. Before entering training loop, user needs to initialize the logger. Inside the training loop, user should log the metrics. After each step, and when all necessary metrics are logged, user should call next_step to stress the fact that current step has ended, and latest state of training can be updated. (TODO Consider autoreset)

There are three main methods of this project:

  • init(directory: str, is_continue: bool = False, step: int = 0) - creates logs directory under directory. All the metrics one will log with dvclive will end up in some form in this repository

  • log(self, name: str, val: float, step: int = None) - appends val altogether with information about timestamp and training step to file stored under directory/history/{name}.tsv. Cannot be used if init has not been used.

  • next_step() - dumps all the metrics logged with log method during current step into directory/latest.json. Increments the step value - TODO - tests!!!.

Clone this wiki locally