matrice.drift_monitor module#
- class matrice.drift_monitor.DriftMonitoring(session)[source]#
Bases:
object
Class for managing drift monitoring operations within a project.
- Parameters:
session (object) – The session object that provides access to the RPC interface and project ID.
- session#
Session object for facilitating RPC communication.
- Type:
object
- project_id#
ID of the project associated with this drift monitoring instance.
- Type:
str
- rpc#
RPC interface for making backend API calls.
- Type:
object
Example
>>> session = Session(account_number="account_number") >>> drift_monitoring = DriftMonitoring(session=session)
- add_params(_idDeployment, deploymentName, imageStoreConfidenceThreshold, imageStoreCountThreshold)[source]#
Add drift monitoring parameters for a specified deployment.
- Parameters:
_idDeployment (str) – The ID of the deployment.
deploymentName (str) – The name of the deployment.
imageStoreConfidenceThreshold (float) – Confidence threshold for storing images.
imageStoreCountThreshold (int) – Count threshold for storing images.
- Returns:
A tuple containing three elements: - dict:
The API response indicating the success or failure of adding parameters.
- str or None:
Error message if an error occurred, otherwise None.
- str:
Message indicating success or error status.
- Return type:
tuple
Example
>>> from pprint import pprint >>> add_params, err, msg = drift_monitoring.add_params( ... _idDeployment="deployment123", ... deploymentName="MyDeployment", ... imageStoreConfidenceThreshold=0.85, ... imageStoreCountThreshold=100 ... ) >>> if err: ... pprint(err) >>> else: ... pprint(add_params)
- update(_idDeployment, deploymentName, imageStoreConfidenceThreshold, imageStoreCountThreshold)[source]#
Update existing drift monitoring parameters for a specified deployment.
- Parameters:
_idDeployment (str) – The ID of the deployment.
deploymentName (str) – The name of the deployment.
imageStoreConfidenceThreshold (float) – Confidence threshold for storing images.
imageStoreCountThreshold (int) – Count threshold for storing images.
- Returns:
A tuple containing three elements: - dict:
The API response indicating the success or failure of the update.
- str or None:
Error message if an error occurred, otherwise None.
- str:
Message indicating success or error status.
- Return type:
tuple
Example
>>> from pprint import pprint >>> update, err, msg = drift_monitoring.update( ... _idDeployment="deployment123", ... deploymentName="MyDeployment", ... imageStoreConfidenceThreshold=0.9, ... imageStoreCountThreshold=150 ... ) >>> if err: ... pprint(err) >>> else: ... pprint(update)