コード例 #1
0
    def delete_workflow_by_id(self, workflow_id: int) -> Status:
        """
        Delete the workflow by specific id

        :param workflow_id: the uuid of workflow
        """
        request = metadata_service_pb2.IdRequest(id=workflow_id)
        response = self.metadata_store_stub.deleteWorkflowById(request)
        return _unwrap_delete_response(response)
コード例 #2
0
    def delete_project_by_name(self, project_name) -> Status:
        """
        Delete the registered project by project name .

        :param project_name: the project name
        :return: Status.OK if the project is successfully deleted, Status.ERROR if the project does not exist otherwise.
        """
        request = metadata_service_pb2.NameRequest(name=project_name)
        response = self.metadata_store_stub.deleteProjectByName(request)
        return _unwrap_delete_response(response)
コード例 #3
0
    def delete_project_by_id(self, project_id) -> Status:
        """
        Delete the registered project by project id .

        :param project_id: the project id
        :return: Status.OK if the project is successfully deleted, Status.ERROR if the project does not exist otherwise.
        """
        request = metadata_service_pb2.IdRequest(id=project_id)
        response = self.metadata_store_stub.deleteProjectById(request)
        return _unwrap_delete_response(response)
コード例 #4
0
    def delete_model_relation_by_name(self, model_name) -> Status:
        """
        Delete the registered model by model name .

        :param model_name: the model name
        :return: Status.OK if the model is successfully deleted, Status.ERROR if the model does not exist otherwise.
        """
        request = metadata_service_pb2.NameRequest(name=model_name)
        response = self.metadata_store_stub.deleteModelRelationByName(request)
        return _unwrap_delete_response(response)
コード例 #5
0
    def delete_dataset_by_id(self, dataset_id):
        """
        Delete the registered dataset by dataset id .

        :param dataset_id: the dataset id
        :return: Status.OK if the dataset is successfully deleted, Status.ERROR if the dataset does not exist otherwise.
        """
        request = metadata_service_pb2.IdRequest(id=dataset_id)
        response = self.metadata_store_stub.deleteDatasetByName(request)
        return _unwrap_delete_response(response)
コード例 #6
0
    def delete_model_by_id(self, model_id) -> Status:
        """
        delete registered model by model id.

        :param model_id: Id of registered model
        :return: Status.OK if registered model is successfully deleted,
                 Status.ERROR if registered model does not exist otherwise.
        """
        request = metadata_service_pb2.IdRequest(id=model_id)
        response = self.metadata_store_stub.deleteModelById(request)
        return _unwrap_delete_response(response)
コード例 #7
0
    def delete_workflow_by_name(self, project_name: Text,
                                workflow_name: Text) -> Status:
        """
        Delete the workflow by specific project and workflow name

        :param project_name: the name of project which contains the workflow
        :param workflow_name: the workflow name
        """
        request = metadata_service_pb2.WorkflowNameRequest(
            workflow_name=workflow_name, project_name=project_name)
        response = self.metadata_store_stub.deleteWorkflowByName(request)
        return _unwrap_delete_response(response)
コード例 #8
0
    def delete_model_version_by_version(self, version, model_id) -> Status:
        """
        Delete registered model version by model version name .

        :param version: the model version name
        :param model_id: the model id corresponded to the model version
        :return: Status.OK if the model version is successfully deleted,
                 Status.ERROR if the model version does not exist otherwise.
        """
        request = metadata_service_pb2.ModelVersionNameRequest(
            name=version, model_id=model_id)
        response = self.metadata_store_stub.deleteModelVersionByVersion(
            request)
        return _unwrap_delete_response(response)