def execute(self, context): hook = MLEngineHook( gcp_conn_id=self._gcp_conn_id, delegate_to=self._delegate_to) if self._operation == 'create': return hook.create_model(project_id=self._project_id, model=self._model) elif self._operation == 'get': return hook.get_model(project_id=self._project_id, model_name=self._model['name']) else: raise ValueError('Unknown operation: {}'.format(self._operation))
def execute(self, context): hook = MLEngineHook(gcp_conn_id=self._gcp_conn_id, delegate_to=self._delegate_to) return hook.get_model(project_id=self._project_id, model_name=self._model_name)