Troubleshooting
Problem
When using Out of the Box Notebook model - "PMI - Anomaly Detection-UnSupervised" in Watson Studio.
The following statement in notebook for model training throws errors:
df = group.execute(start_ts='2020-07-06',end_ts='2021-07-06')
Notebook errors are:
2022-12-01T15:16:27.699 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:16:37.196 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:16:43.654 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:16:49.068 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:16:54.024 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:16:57.847 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:17:02.580 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:17:06.063 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:17:10.882 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:17:17.469 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:17:24.484 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:16:37.196 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:16:43.654 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:16:49.068 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:16:54.024 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:16:57.847 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:17:02.580 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:17:06.063 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:17:10.882 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:17:17.469 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
2022-12-01T15:17:24.484 WARNING::iotfunctions.db.__init__: Unable to locate CORE API URL by using base API URL
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/iotfunctions/pipeline.py in _execute_stage(self, stage, df, start_ts, end_ts, entities, register, to_csv, dropna, abort_on_fail)
2343 if contains_extended_args:
-> 2344 newdf = stage.execute(df=df_stage, start_ts=start_ts, end_ts=end_ts, entities=entities)
2345 else:
ImportError Traceback (most recent call last)
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/iotfunctions/pipeline.py in _execute_stage(self, stage, df, start_ts, end_ts, entities, register, to_csv, dropna, abort_on_fail)
2343 if contains_extended_args:
-> 2344 newdf = stage.execute(df=df_stage, start_ts=start_ts, end_ts=end_ts, entities=entities)
2345 else:
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/pmlib/loader.py in execute(self, df, start_ts, end_ts, entities)
286 else:
--> 287 entity_type_service = api.get_entity_type(entity_type, db=self._entity_type.db)
288
286 else:
--> 287 entity_type_service = api.get_entity_type(entity_type, db=self._entity_type.db)
288
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/pmlib/api.py in get_entity_type(entity_type_name, db, *args, **kwargs)
3334 logger.debug('Creating instance of ServerEntityType with uuid=%s', uuid)
-> 3335 SERVER_ENTITY_TYPES[entity_type_name] = ServerEntityType(resource_uuid=uuid, db=db, db_schema=db_schema)
3336 return SERVER_ENTITY_TYPES[entity_type_name]
3334 logger.debug('Creating instance of ServerEntityType with uuid=%s', uuid)
-> 3335 SERVER_ENTITY_TYPES[entity_type_name] = ServerEntityType(resource_uuid=uuid, db=db, db_schema=db_schema)
3336 return SERVER_ENTITY_TYPES[entity_type_name]
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/iotfunctions/metadata.py in __init__(self, resource_uuid, db, db_schema)
2143 # turn function metadata into function objects
-> 2144 (self._functions, self._invalid_stages, self._disabled_stages) = self.build_function_objects(kpis)
2145
2143 # turn function metadata into function objects
-> 2144 (self._functions, self._invalid_stages, self._disabled_stages) = self.build_function_objects(kpis)
2145
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/iotfunctions/metadata.py in build_function_objects(self, server_kpis)
2232 valid_kpi_names = [x.get('catalogFunctionName') for x in valid_kpis]
-> 2233 self.db.load_catalog(install_missing=True, function_list=valid_kpi_names)
2234
2232 valid_kpi_names = [x.get('catalogFunctionName') for x in valid_kpis]
-> 2233 self.db.load_catalog(install_missing=True, function_list=valid_kpi_names)
2234
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/iotfunctions/db.py in load_catalog(self, install_missing, unregister_invalid_target, function_list)
1297
-> 1298 raise ImportError(msg)
1299
1297
-> 1298 raise ImportError(msg)
1299
ImportError: The class iotfunctions.anomaly.MatrixProfileAnomalyScore for function MatrixProfileAnomalyScore could not be imported from repository None.
During handling of the above exception, another exception occurred:
StageException Traceback (most recent call last)
/tmp/1000770000/ipykernel_117/2618016663.py in <module>
----> 1 df = group.execute(start_ts='2020-07-06',end_ts='2021-07-06')
/tmp/1000770000/ipykernel_117/2618016663.py in <module>
----> 1 df = group.execute(start_ts='2020-07-06',end_ts='2021-07-06')
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/pmlib/pipeline.py in execute(self, df, start_ts, end_ts, entities)
1364
1365 # now execute the pipeline
-> 1366 df_predicted = pipeline.execute(to_csv=self.debug, start_ts=start_ts, end_ts=end_ts, entities=entities)
1367
1368 # once executed, check if any newly trained model
1364
1365 # now execute the pipeline
-> 1366 df_predicted = pipeline.execute(to_csv=self.debug, start_ts=start_ts, end_ts=end_ts, entities=entities)
1367
1368 # once executed, check if any newly trained model
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/iotfunctions/pipeline.py in execute(self, df, to_csv, dropna, start_ts, end_ts, entities, preloaded_item_names, register)
2250 # a primary data source. A primary data source will have a merge_method of 'replace'. This
2251 # implies that it replaces whatever data was fed into the pipeline as default entity data.
-> 2252 (df, stages) = self._execute_data_sources(df=df, stages=stages, start_ts=start_ts, end_ts=end_ts,
2253 entities=entities, to_csv=to_csv, register=register,
2254 dropna=dropna)
2250 # a primary data source. A primary data source will have a merge_method of 'replace'. This
2251 # implies that it replaces whatever data was fed into the pipeline as default entity data.
-> 2252 (df, stages) = self._execute_data_sources(df=df, stages=stages, start_ts=start_ts, end_ts=end_ts,
2253 entities=entities, to_csv=to_csv, register=register,
2254 dropna=dropna)
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/iotfunctions/pipeline.py in _execute_data_sources(self, stages, df, start_ts, end_ts, entities, to_csv, register, dropna)
2169
2170 if is_data_source and merge_method == 'replace':
-> 2171 df = self._execute_stage(stage=s, df=df, start_ts=start_ts, end_ts=end_ts, entities=entities,
2172 register=register, to_csv=to_csv, dropna=dropna, abort_on_fail=True)
2173 msg = 'Replaced incoming dataframe with custom data source %s. ' % s.__class__.__name__
2169
2170 if is_data_source and merge_method == 'replace':
-> 2171 df = self._execute_stage(stage=s, df=df, start_ts=start_ts, end_ts=end_ts, entities=entities,
2172 register=register, to_csv=to_csv, dropna=dropna, abort_on_fail=True)
2173 msg = 'Replaced incoming dataframe with custom data source %s. ' % s.__class__.__name__
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/iotfunctions/pipeline.py in _execute_stage(self, stage, df, start_ts, end_ts, entities, register, to_csv, dropna, abort_on_fail)
2349 newdf = self.merge_scope_df(df, newdf, stage.category, stage._outputs)
2350 except BaseException as e:
-> 2351 self.entity_type.raise_error(exception=e, abort_on_fail=abort_on_fail, stage_name=name)
2352
2353 logger.debug('End of stage {{ %s }}, execution time = %s s' % (
2349 newdf = self.merge_scope_df(df, newdf, stage.category, stage._outputs)
2350 except BaseException as e:
-> 2351 self.entity_type.raise_error(exception=e, abort_on_fail=abort_on_fail, stage_name=name)
2352
2353 logger.debug('End of stage {{ %s }}, execution time = %s s' % (
/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/iotfunctions/metadata.py in raise_error(self, exception, msg, abort_on_fail, stage_name)
1844
1845 if abort_on_fail:
-> 1846 raise StageException(error message=msg, stage_name=stage_name, exception=exception)
1847 else:
1848 logger.warning(msg)
1844
1845 if abort_on_fail:
-> 1846 raise StageException(error message=msg, stage_name=stage_name, exception=exception)
1847 else:
1848 logger.warning(msg)
StageException: The function AssetLoader failed to execute.
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLPYA","label":"IBM Maximo Predict"},"ARM Category":[{"code":"a8m3p000000hAeVAAU","label":"Maximo Application Suite-\u003EMAS Applications-\u003EPredict"}],"ARM Case Number":"TS011416415","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Log InLog in to view more of this document
This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.
Was this topic helpful?
Document Information
Modified date:
07 December 2022
UID
ibm16845982