How to version code

You can log and track the exact version of the model code as part of an experiment run. This can be done by capturing metadata about the git commit with the specified branch, tag, or commit_hash.

Here is the example to automatically capture git commit information:

#Model training
#log code versions during experiment runs

from verta.code import Git
run = client.set_experiment_run()
run.log_code()

Here is the example to manually provide git commit information:

#Model training
#log code versions during experiment runs

from verta.code import Git
run = client.set_experiment_run()
# log git information
run.log_code(
    repo_url="git@github.com:VertaAI/modeldb.git",
    commit_hash="d412a0d9",
    autocapture=False,
    )

Last updated