Enable monitoring
To start uploading ongoing monitoring results for a model to ValidMind, enable monitoring in your code snippet within the ValidMind Platform and then select a monitoring template. You can enable monitoring for both new and existing models.
Prerequisites
Steps
Initialize the ValidMind Library with the code snippet unique to each model per document to connect your environment to the ValidMind Platform, ensuring test results are uploaded to the correct model and automatically populated in the right document.
To enable ongoing monitoring for a model, add monitoring=True to your code snippet:
In the ValidMind Platform, either register a new model2 or locate an existing model:
- In the left sidebar, click Inventory.
- Select a model or find your model by applying a filter or searching for it.3
Copy the code snippet for the model:
- In the left sidebar that appears for your model, click Getting Started.
- Select a Monitoring document type from the document drop-down menu.4
- Set enable monitoring? to true.
- Click Copy snippet to clipboard.
4 Selecting a document to connect to requires ValidMind Library version >=2.12.0.
Before you can start sending ongoing monitoring data using the ValidMind Library to the ValidMind Platform, you must select a monitoring template:
In the ValidMind Platform, click Inventory in the left sidebar.
Select a model or find your model by applying a filter or searching for it.5
In the left sidebar that appears for your model, click Documents and select the Latest tab.6
Click on a Monitoring type file.7
From the template drop-down, select one of the available monitoring templates.
Click Use Template to apply your desired template.
- After you select a template, the initial document where your ongoing monitoring results will be stored becomes available.
- Review this documents structure to confirm that it meets your requirements, then start running your code to populate the template with monitoring results.
Paste the code snippet into your Jupyter Notebook or other development environment.
Confirm that
monitoring=Trueis present in thevm.initmethod, similar to this example:import validmind as vm vm.init( api_host="https://api.prod.validmind.ai/api/v1/tracking", api_key="...", api_secret="...", model="...", document="monitoring", # Unique key for your monitoring document monitoring=True )Run the code snippet to initialize the ValidMind Library and connect to the selected monitoring document for your model in the ValidMind Platform.8
What’s next
After you have enabled ongoing monitoring and run your code to generate some output, you can start reviewing the monitoring results.9