in utils/lookout_equipment_utils.py [0:0]
def delete(self):
"""
Delete the current model
RETURNS
=======
delete_model_response: string
The delete model API response in JSON format
"""
try:
delete_model_response = self.client.delete_model(
ModelName=self.model_name
)
return delete_model_response
except Exception as e:
error_code = e.response['Error']['Code']
# If the dataset is used by existing models and we asked a
# forced delete, we also delete the associated models before
# trying again the dataset deletion:
if (error_code == 'ConflictException'):
print(('Model is currently being used (a training might be in '
'progress. Wait for the process to be completed and '
'retry.'))