Verta
Search…
How to manage model dependencies
Environmemt variables are critical to ensure model reproducibility and versioning.
Here is the example on how to capture metadata about Python libraries, installed packages, and system environment variables:
1
#Model training
2
3
run = client.set_experiment_run()
4
5
# log environment
6
from verta.environment import Python
7
run.log_environment(Python(['scikit-learn', 'pandas']),overwrite=True)
Copied!
This information can be visualized in the web UI.

OS level dependencies

Capturing OS level dependencies are helpful in the following scenario:
    If you have a python dependency that requires a specific package to be installed on the image to build or to run (e.g. GCC)
    If you need a specific version of a package that for python dependency and python doesn't have a way to specify OS-level dependencies
Here is the example to capture OS level dependencies (e.g. for computer vision models):
1
#Model training
2
3
from verta.environment import Python
4
run = client.set_experiment_run()
5
#run.log_environment(Python(['scikit-learn', 'pandas']),overwrite=True)
6
run.log_environment(
7
Python(['scikit-learn', 'pandas'],
8
apt_packages=["python3-opencv"]),
9
overwrite=True
10
)
Copied!
This information can be visualized in the web UI.
Last modified 1mo ago
Copy link