DVCLive allows you to add experiment tracking capabilities to your Catalyst projects.
To start using DVCLive, add a few lines to your training code in any Catalyst project.
Include the
DvcLiveCallback
int the callbacks list passed to your
Runner
:
+from dvclive.catalyst import DvcLiveCallback
. . .
runner.train(
model=model,
criterion=criterion,
optimizer=optimizer,
loaders=loaders,
- num_epochs=2)
+ num_epochs=2,
+ callbacks=[DvcLiveCallback()])
This will generate the outputs as described in the Get Started.
Without requiring additional modifications to your training code, you can use DVCLive alongside DVC. See DVCLive with DVC for more info.
model_file
- (None
by default) - The name of the file where the model will
be saved at the end of each step
.
**kwargs
- Any additional arguments will be passed to
Live
.
model_file
.from dvclive.catalyst import DvcLiveCallback
runner.train(
model=model,
criterion=criterion,
optimizer=optimizer,
loaders=loaders,
num_epochs=2,
callbacks=[DvcLiveCallback(model_file="model.pth")])
**kwargs
to customize Live
.from dvclive.catalyst import DvcLiveCallback
runner.train(
model=model,
criterion=criterion,
optimizer=optimizer,
loaders=loaders,
num_epochs=2,
callbacks=[
DvcLiveCallback(model_file="model.pth", path="custom_path")])