{"id":23513,"library":"datarobot-mlops","title":"DataRobot MLOps","description":"Python SDK for DataRobot MLOps to read and report model monitoring statistics (accuracy, drift, data quality) to DataRobot's MLOps platform. Current version 11.1.28, requires Python >=3.9. Released as part of DataRobot's MLOps cloud or on-premise deployment with frequent minor releases.","status":"active","version":"11.1.28","language":"python","source_language":"en","source_url":"https://github.com/datarobot/datarobot-mlops","tags":["MLOps","model-monitoring","DataRobot","statistics","reporting"],"install":[{"cmd":"pip install datarobot-mlops","lang":"bash","label":"Standard install"}],"dependencies":[{"reason":"Required for data handling in reporting functions","package":"pandas","optional":false}],"imports":[{"note":"Old pattern used dot-based submodule; correct import uses underscore","wrong":"from datarobot.mlops import MLOpsReporting","symbol":"MLOpsReporting","correct":"from datarobot_mlops import MLOpsReporting"},{"note":"Common mistake due to PyPI name","wrong":"import datarobot.mlops as mlops","symbol":"mlops","correct":"import datarobot_mlops as mlops"}],"quickstart":{"code":"import os\nfrom datarobot_mlops import MLOpsReporting\n\n# Initialize with API credentials from environment\nmlops_report = MLOpsReporting(\n    server_url=os.environ.get('DATAROBOT_API_ENDPOINT', ''),\n    api_token=os.environ.get('DATAROBOT_API_TOKEN', '')\n)\n\n# Report deployment stats\nmlops_report.report_deployment_stats(\n    deployment_id='your-deployment-id',\n    predictions=100,\n    execution_time=0.5,\n    model_id='your-model-id'\n)\nprint(\"Stats reported successfully.\")","lang":"python","description":"Basic usage to report model predictions and execution time to a DataRobot MLOps deployment."},"warnings":[{"fix":"Replace 'application_key' with 'api_token' in constructor.","message":"In version 11.x, MLOpsReporting no longer accepts 'application_key' argument; use 'api_token' instead.","severity":"breaking","affected_versions":">=11.0.0"},{"fix":"Use 'report_classification_stats' with 'class_names' parameter instead.","message":"The method 'report_binary_classification_stats' is deprecated in 10.x+ and removed in 11.x.","severity":"deprecated","affected_versions":">=10.0.0"},{"fix":"Wrap report calls with threading or use an async HTTP client if available (not natively supported).","message":"The SDK uses blocking HTTP calls. In production, run reporting in a separate thread or async task to avoid blocking model inference.","severity":"gotcha","affected_versions":"all"},{"fix":"Always pass deployment_id as str(deployment_id).","message":"Deployment ID must be a string; integer or UUID object will raise AttributeError.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use correct import: 'from datarobot_mlops import MLOpsReporting'","cause":"Importing as 'datarobot.mlops' instead of 'datarobot_mlops'.","error":"AttributeError: module 'datarobot' has no attribute 'mlops'"},{"fix":"Replace application_key='...' with api_token='...'.","cause":"datarobot-mlops 11.x removed application_key; use api_token.","error":"TypeError: MLOpsReporting.__init__() got an unexpected keyword argument 'application_key'"},{"fix":"Verify API token and permissions; check server_url and token environment variables.","cause":"Invalid or expired API token, or insufficient permissions on the deployment.","error":"datarobot_mlops.exceptions.MLOpsException: (403) Forbidden"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}