deeplearninc / auger-ai

Auger python API and auger cli
MIT License
0 stars 1 forks source link

model predict command lacks of pipeline ID #16

Open IgorFlint opened 5 years ago

IgorFlint commented 5 years ago

with model 87C81FE615DE46D deployed successfully, I've got: $ augerai model predict -m 87C81FE615DE46D iris_data_test.csv

Traceback (most recent call last):
  File "/home/flint/projects/deeplearninc/auger-ai/auger/cli/utils/decorators.py", line 13, in wrapper
    return decorated(self, *args, **kwargs)
  File "/home/flint/projects/deeplearninc/auger-ai/auger/cli/utils/decorators.py", line 31, in wrapper
    return decorated(self, *args, **kwargs)
  File "/home/flint/projects/deeplearninc/auger-ai/auger/cli/utils/decorators.py", line 56, in wrapper
    return decorated(self, project, *args, **kwargs)
  File "/home/flint/projects/deeplearninc/auger-ai/auger/cli/commands/cmd_model.py", line 24, in predict
    Model(self.ctx, project).predict(filename, model_id, threshold, locally)
  File "/home/flint/projects/deeplearninc/auger-ai/auger/api/model.py", line 17, in predict
    ModelPredict(self.ctx).execute(filename, model_id, threshold, locally)
  File "/home/flint/projects/deeplearninc/auger-ai/auger/api/mparts/predict.py", line 27, in execute
    predicted = self._predict_on_cloud(filename, model_id, threshold)
  File "/home/flint/projects/deeplearninc/auger-ai/auger/api/mparts/predict.py", line 37, in _predict_on_cloud
    df.values.tolist(), df.columns.get_values().tolist(), threshold)
  File "/home/flint/projects/deeplearninc/auger-ai/auger/api/cloud/pipeline.py", line 21, in predict
    if self.properties().get('status') != 'ready':
  File "/home/flint/projects/deeplearninc/auger-ai/auger/api/cloud/base.py", line 32, in properties
    'get_%s' % self.api_request_path, {'id': self.object_id})
  File "/home/flint/projects/deeplearninc/auger-ai/auger/api/cloud/rest_api.py", line 41, in call
    result = self.call_ex(method, params)
  File "/home/flint/projects/deeplearninc/auger-ai/auger/api/cloud/rest_api.py", line 32, in call_ex
    result = getattr(self.hub_client, method)(oid, **params)
  File "/home/flint/projects/deeplearninc/hub-api-client/auger/hub_api_client/hub_api_client.py", line 398, in show
    return self.make_and_handle_request('get', '{path}/{id}'.format(path=path, id=id))
  File "/home/flint/projects/deeplearninc/hub-api-client/auger/hub_api_client/hub_api_client.py", line 290, in make_and_handle_request
    return self.handle_response(res, plain_text=plain_text)
  File "/home/flint/projects/deeplearninc/hub-api-client/auger/hub_api_client/hub_api_client.py", line 255, in handle_response
    raise self.FatalApiError(self.format_response(res), meta)
auger.hub_api_client.hub_api_client.HubApiClient.FatalApiError: ('status: 404, body: {"meta":{"status":404,"errors":[{"message":"There is no such Pipeline","error_type":"not_found"}]}}', {'errors': [{'error_type': 'not_found', 'message': 'There is no such Pipeline'}], 'status': 404})
IgorFlint commented 5 years ago

Research showed that we deploy a model with augerai model deploy command, and it return pipeline_id which we do not store anywhere in our config (unlike of experiment session id, for example). Nor we tell user to use this pipeline id.

So I suggest to keep tracking of deployed model id for this case.

vlad-dplrn commented 5 years ago

remote deploy/predict is not supported by hub so far