I tried following this notebook: https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/work-with-data/datadrift-tutorial/datadrift-tutorial.ipynb and I am getting the below error when I tried to get the metrics/results of the dataset monitors using the python SDK:
running:
monitor = DataDriftDetector.get_by_name(ws, 'weather-monitor')
results, metrics = monitor.get_output(start_time=datetime(year=2015, month=4, day=1))
causes this error:
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
c:\Users**\create_monitors.py in
2
3 # get results from Python SDK (wait for backfills or monitor runs to finish)
----> 4 results, metrics = monitor.get_output(start_time=datetime(year=2015, month=4, day=1))
~\AppData\Local\Continuum\miniconda3\envs\aml72\lib\site-packages\azureml\datadrift\datadriftdetector.py in get_output(self, start_time, end_time, run_id)
1263 self._latest_run_time = d.latest_run_time
1264
-> 1265 return _all_outputs(self, start_time, end_time, run_id, actlogger)
1266
1267 def update(self, services=..., compute_target=..., feature_list=..., schedule_start=..., alert_config=...,
~\AppData\Local\Continuum\miniconda3\envs\aml72\lib\site-packages\azureml\datadrift_result_handler.py in _all_outputs(datadriftdetector, start_time, end_time, run_id, activity_logger)
129 else:
130 metrics_got = _get_metrics(datadriftdetector, start_time, end_time, run_id,
--> 131 daily_latest_only=True, logger=logger)
132 if len(metrics_got) < 1:
133 logger.error("No resoults found for scheduled/backfill runs. All results are from adhoc runs.")
~\AppData\Local\Continuum\miniconda3\envs\aml72\lib\site-packages\azureml\datadrift_result_handler.py in _get_metrics(datadriftdetector, start_time, end_time, run_id, daily_latest_only, with_adhoc, logger)
203 if drift_type == DATADRIFT_TYPE_DATASET:
204 metrics, latest_pipeline_times = _download_from_blob_metrics(datadriftdetector, local_temp_root, None,
--> 205 start_time, end_time, run_id, with_adhoc, logger)
206 # Only model based drift needs check all services.
207 elif drift_type == DATADRIFT_TYPE_MODEL:
~\AppData\Local\Continuum\miniconda3\envs\aml72\lib\site-packages\azureml\datadrift_result_handler.py in _download_from_blob_metrics(datadriftdetector, local_temp_root, service, start_time, end_time, run_id, with_adhoc, logger)
304 metrics_rel_base = _get_metrics_path(model_name, model_version, service,
305 drift_type=drift_type, datadrift_id=datadrift_id,
--> 306 datastore=data_store, logger=logger)
307 logger.info("Relative metrics path confirmed. Drift id = {}, path = {}".format(datadrift_id, metrics_rel_base))
308
~\AppData\Local\Continuum\miniconda3\envs\aml72\lib\site-packages\azureml\datadrift_result_handler.py in _get_metrics_path(model_name, model_version, service, target_date, drift_type, datadrift_id, datastore, logger)
422 general_output_folder_exist = True
423 if datastore:
--> 424 blobs = datastore.blob_service.list_blobs(container_name=datastore.container_name, prefix=metrics_output_path)
425 blobs = datastore._filter_conflicting_blobs(blobs)
426 if len(blobs) == 0:
AttributeError: 'AzureFileDatastore' object has no attribute 'blob_service'`
@swanderz
I tried following this notebook: https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/work-with-data/datadrift-tutorial/datadrift-tutorial.ipynb and I am getting the below error when I tried to get the metrics/results of the dataset monitors using the python SDK:
running:
monitor = DataDriftDetector.get_by_name(ws, 'weather-monitor')results, metrics = monitor.get_output(start_time=datetime(year=2015, month=4, day=1))causes this error:
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
c:\Users**\create_monitors.py in
2
3 # get results from Python SDK (wait for backfills or monitor runs to finish)
----> 4 results, metrics = monitor.get_output(start_time=datetime(year=2015, month=4, day=1))
~\AppData\Local\Continuum\miniconda3\envs\aml72\lib\site-packages\azureml\datadrift\datadriftdetector.py in get_output(self, start_time, end_time, run_id)
1263 self._latest_run_time = d.latest_run_time
1264
-> 1265 return _all_outputs(self, start_time, end_time, run_id, actlogger)
1266
1267 def update(self, services=..., compute_target=..., feature_list=..., schedule_start=..., alert_config=...,
~\AppData\Local\Continuum\miniconda3\envs\aml72\lib\site-packages\azureml\datadrift_result_handler.py in _all_outputs(datadriftdetector, start_time, end_time, run_id, activity_logger)
129 else:
130 metrics_got = _get_metrics(datadriftdetector, start_time, end_time, run_id,
--> 131 daily_latest_only=True, logger=logger)
132 if len(metrics_got) < 1:
133 logger.error("No resoults found for scheduled/backfill runs. All results are from adhoc runs.")
~\AppData\Local\Continuum\miniconda3\envs\aml72\lib\site-packages\azureml\datadrift_result_handler.py in _get_metrics(datadriftdetector, start_time, end_time, run_id, daily_latest_only, with_adhoc, logger)
203 if drift_type == DATADRIFT_TYPE_DATASET:
204 metrics, latest_pipeline_times = _download_from_blob_metrics(datadriftdetector, local_temp_root, None,
--> 205 start_time, end_time, run_id, with_adhoc, logger)
206 # Only model based drift needs check all services.
207 elif drift_type == DATADRIFT_TYPE_MODEL:
~\AppData\Local\Continuum\miniconda3\envs\aml72\lib\site-packages\azureml\datadrift_result_handler.py in _download_from_blob_metrics(datadriftdetector, local_temp_root, service, start_time, end_time, run_id, with_adhoc, logger)
304 metrics_rel_base = _get_metrics_path(model_name, model_version, service,
305 drift_type=drift_type, datadrift_id=datadrift_id,
--> 306 datastore=data_store, logger=logger)
307 logger.info("Relative metrics path confirmed. Drift id = {}, path = {}".format(datadrift_id, metrics_rel_base))
308
~\AppData\Local\Continuum\miniconda3\envs\aml72\lib\site-packages\azureml\datadrift_result_handler.py in _get_metrics_path(model_name, model_version, service, target_date, drift_type, datadrift_id, datastore, logger)
422 general_output_folder_exist = True
423 if datastore:
--> 424 blobs = datastore.blob_service.list_blobs(container_name=datastore.container_name, prefix=metrics_output_path)
425 blobs = datastore._filter_conflicting_blobs(blobs)
426 if len(blobs) == 0:
AttributeError: 'AzureFileDatastore' object has no attribute 'blob_service'`
@swanderz