-
Notifications
You must be signed in to change notification settings - Fork 38
General
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 underdirectory
. 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)
- appendsval
altogether with information about timestamp and trainingstep
to file stored underdirectory/history/{name}.tsv
. Cannot be used ifinit
has not been used. -
next_step()
- dumps all the metrics logged withlog
method during current step intodirectory/latest.json
. Increments the step value - TODO - tests!!!.