def delete_pipeline(id):  # noqa: E501
    """delete_pipeline

    :param id: 
    :type id: str

    :rtype: None
    """

    if KFP_HOST == "UNAVAILABLE":
        # TODO delete pipeline_versions first
        delete_data(ApiPipeline, id)
        if id == "*":
            delete_objects(bucket_name="mlpipeline", prefix=f"pipelines/")
        else:
            delete_object(bucket_name="mlpipeline", prefix="pipelines", file_name=f"{id}")
    else:
        # wildcard '*' deletes (and recreates) entire table, not desired for pipelines table, KFP API does not accept "*"
        if id != "*":
            delete_kfp_pipeline(id)

    delete_data(ApiPipelineExtension, id)

    # wildcard '*' deletes (and recreates) entire table, forced schema migration for pipeline_extensions table
    if id == "*":
        delete_data(ApiPipelineExtended, id)

    return None, 200
def delete_component(id):  # noqa: E501
    """delete_component

    :param id:
    :type id: str

    :rtype: None
    """
    delete_data(ApiComponent, id)

    delete_objects(bucket_name="mlpipeline", prefix=f"components/{id}/")

    return f"Component {id} was deleted", 200
コード例 #3
0
def delete_notebook(id):  # noqa: E501
    """delete_notebook

    :param id: 
    :type id: str

    :rtype: None
    """
    delete_data(ApiNotebook, id)

    delete_objects(bucket_name="mlpipeline", prefix=f"notebooks/{id}/")

    return f"Notebook {id} was deleted", 200
コード例 #4
0
def delete_dataset(id):  # noqa: E501
    """delete_dataset

    :param id:
    :type id: str

    :rtype: None
    """
    delete_data(ApiDataset, id)

    delete_objects(bucket_name="mlpipeline", prefix=f"datasets/{id}/")

    return f"Dataset {id} was deleted", 200
コード例 #5
0
def delete_model(id):  # noqa: E501
    """delete_model

    :param id: 
    :type id: str

    :rtype: None
    """
    delete_data(ApiModel, id)

    delete_objects(bucket_name="mlpipeline", prefix=f"models/{id}/")

    return f"Model {id} was deleted", 200