Enable monitoring
To start uploading ongoing monitoring results for a record (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 records.
Prerequisites
Steps
1. Get monitoring code snippet
Initialize the ValidMind Library with the code snippet unique to each record (model) per document to connect your environment to the ValidMind Platform, ensuring test results are uploaded to the correct record and automatically populated in the right document.
To enable ongoing monitoring for a record, add monitoring=True to your code snippet:
In the ValidMind Platform, either register a new record2 or locate an existing record:
- In the left sidebar, click Inventory.
- Select a record or find your record by applying a filter or searching for it.3
Copy the code snippet for your record:
- In the left sidebar that appears for your record, 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.
2. Select monitoring template
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 record or find your record by applying a filter or searching for it.5
In the left sidebar that appears for your record, 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.
3. Run code snippet
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 record 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