kfp.Client class

class kfp.Client(host=None, client_id=None, namespace='kubeflow', other_client_id=None, other_client_secret=None, existing_token=None)[source]

Bases: object

API Client for KubeFlow Pipeline.

IN_CLUSTER_DNS_NAME = 'ml-pipeline.{}.svc.cluster.local:8888'
KUBE_PROXY_PATH = 'api/v1/namespaces/{}/services/ml-pipeline:http/proxy/'
LOCAL_KFP_CONTEXT = '/home/docs/.config/kfp/context.json'
create_experiment(name, description=None, namespace=None)[source]

Create a new experiment. :param name: the name of the experiment. :param description: description of the experiment. :param namespace: kubernetes namespace where the experiment should be created.

For single user deployment, leave it as None; For multi user, input a namespace where the user is authorized.
Returns:An Experiment object. Most important field is id.
create_recurring_run(experiment_id, job_name, description=None, start_time=None, end_time=None, interval_second=None, cron_expression=None, max_concurrency=1, no_catchup=None, params={}, pipeline_package_path=None, pipeline_id=None, version_id=None, enabled=True)[source]

Create a recurring run. :param experiment_id: The string id of an experiment. :param job_name: name of the job. :param description: An optional job description. :param start_time: The RFC3339 time string of the time when to start the job. :param end_time: The RFC3339 time string of the time when to end the job. :param interval_second: Integer indicating the seconds between two recurring runs in for a periodic schedule. :param cron_expression: A cron expression representing a set of times, using 5 space-separated fields, e.g. “0 0 9 ? * 2-6”. :param max_concurrency: Integer indicating how many jobs can be run in parallel. :param no_catchup: Whether the recurring run should catch up if behind schedule.

For example, if the recurring run is paused for a while and re-enabled afterwards. If no_catchup=False, the scheduler will catch up on (backfill) each missed interval. Otherwise, it only schedules the latest interval if more than one interval is ready to be scheduled. Usually, if your pipeline handles backfill internally, you should turn catchup off to avoid duplicate backfill. (default: {False})
Parameters:
  • pipeline_package_path – Local path of the pipeline package(the filename should end with one of the following .tar.gz, .tgz, .zip, .yaml, .yml).
  • params – A dictionary with key (string) as param name and value (string) as param value.
  • pipeline_id – The string ID of a pipeline.
  • version_id – The string ID of a pipeline version. If both pipeline_id and version_id are specified, pipeline_id will take precendence This will change in a future version, so it is recommended to use version_id by itself.
  • enabled – A bool indicating whether the recurring run is enabled or disabled.
Returns:

A Job object. Most important field is id.

create_run_from_pipeline_func(pipeline_func: Callable, arguments: Mapping[str, str], run_name=None, experiment_name=None, pipeline_conf: kfp.dsl._pipeline.PipelineConf = None, namespace=None)[source]

Runs pipeline on KFP-enabled Kubernetes cluster. This command compiles the pipeline function, creates or gets an experiment and submits the pipeline for execution.

Parameters:
  • pipeline_func – A function that describes a pipeline by calling components and composing them into execution graph.
  • arguments – Arguments to the pipeline function provided as a dict.
  • run_name – Optional. Name of the run to be shown in the UI.
  • experiment_name – Optional. Name of the experiment to add the run to.
  • namespace – kubernetes namespace where the pipeline runs are created. For single user deployment, leave it as None; For multi user, input a namespace where the user is authorized
create_run_from_pipeline_package(pipeline_file: str, arguments: Mapping[str, str], run_name=None, experiment_name=None, namespace=None)[source]

Runs pipeline on KFP-enabled Kubernetes cluster. This command compiles the pipeline function, creates or gets an experiment and submits the pipeline for execution.

Parameters:
  • pipeline_file – A compiled pipeline package file.
  • arguments – Arguments to the pipeline function provided as a dict.
  • run_name – Optional. Name of the run to be shown in the UI.
  • experiment_name – Optional. Name of the experiment to add the run to.
  • namespace – kubernetes namespace where the pipeline runs are created. For single user deployment, leave it as None; For multi user, input a namespace where the user is authorized
delete_pipeline(pipeline_id)[source]

Delete pipeline. :param id of the pipeline.:

Returns:Object. If the method is called asynchronously, returns the request thread.
Throws:
Exception if pipeline is not found.
get_experiment(experiment_id=None, experiment_name=None, namespace=None)[source]

Get details of an experiment Either experiment_id or experiment_name is required :param experiment_id: id of the experiment. (Optional) :param experiment_name: name of the experiment. (Optional) :param namespace: kubernetes namespace where the experiment was created.

For single user deployment, leave it as None; For multi user, input the namespace where the user is authorized.
Returns:A response object including details of a experiment.
Throws:
Exception if experiment is not found or None of the arguments is provided
get_pipeline(pipeline_id)[source]

Get pipeline details. :param id of the pipeline.:

Returns:A response object including details of a pipeline.
Throws:
Exception if pipeline is not found.
get_recurring_run(job_id)[source]

Get recurring_run details. :param id of the recurring_run.:

Returns:A response object including details of a recurring_run.
Throws:
Exception if recurring_run is not found.
get_run(run_id)[source]

Get run details. :param id of the run.:

Returns:A response object including details of a run.
Throws:
Exception if run is not found.
get_user_namespace()[source]

Get user namespace in context config. :returns: kubernetes namespace from the local context file or empty if it wasn’t set. :rtype: namespace

list_experiments(page_token='', page_size=10, sort_by='', namespace=None)[source]

List experiments. :param page_token: token for starting of the page. :param page_size: size of the page. :param sort_by: can be ‘[field_name]’, ‘[field_name] des’. For example, ‘name des’. :param namespace: kubernetes namespace where the experiment was created.

For single user deployment, leave it as None; For multi user, input a namespace where the user is authorized.
Returns:A response object including a list of experiments and next page token.
list_pipelines(page_token='', page_size=10, sort_by='')[source]

List pipelines. :param page_token: token for starting of the page. :param page_size: size of the page. :param sort_by: one of ‘field_name’, ‘field_name des’. For example, ‘name des’.

Returns:A response object including a list of pipelines and next page token.
list_recurring_runs(page_token='', page_size=10, sort_by='', experiment_id=None)[source]

List recurring runs. :param page_token: token for starting of the page. :param page_size: size of the page. :param sort_by: one of ‘field_name’, ‘field_name des’. For example, ‘name des’. :param experiment_id: experiment id to filter upon

Returns:A response object including a list of recurring_runs and next page token.
list_runs(page_token='', page_size=10, sort_by='', experiment_id=None, namespace=None)[source]

List runs. :param page_token: token for starting of the page. :param page_size: size of the page. :param sort_by: one of ‘field_name’, ‘field_name des’. For example, ‘name des’. :param experiment_id: experiment id to filter upon :param namespace: kubernetes namespace to filter upon.

For single user deployment, leave it as None; For multi user, input a namespace where the user is authorized.
Returns:A response object including a list of experiments and next page token.
run_pipeline(experiment_id, job_name, pipeline_package_path=None, params={}, pipeline_id=None, version_id=None)[source]

Run a specified pipeline.

Parameters:
  • experiment_id – The string id of an experiment.
  • job_name – name of the job.
  • pipeline_package_path – local path of the pipeline package(the filename should end with one of the following .tar.gz, .tgz, .zip, .yaml, .yml).
  • params – a dictionary with key (string) as param name and value (string) as as param value.
  • pipeline_id – the string ID of a pipeline.
  • version_id – the string ID of a pipeline version. If both pipeline_id and version_id are specified, version_id will take precendence. If only pipeline_id is specified, the default version of this pipeline is used to create the run.
Returns:

A run object. Most important field is id.

set_user_namespace(namespace)[source]
Set user namespace into local context setting file.
This function should only be used when Kubeflow Pipelines is in the multi-user mode.
Parameters:namespace – kubernetes namespace the user has access to.
upload_pipeline(pipeline_package_path: str = None, pipeline_name: str = None, description: str = None)[source]

Uploads the pipeline to the Kubeflow Pipelines cluster. :param pipeline_package_path: Local path to the pipeline package. :param pipeline_name: Optional. Name of the pipeline to be shown in the UI. :param description: Optional. Description of the pipeline to be shown in the UI.

Returns:Server response object containing pipleine id and other information.
wait_for_run_completion(run_id, timeout)[source]

Wait for a run to complete. :param run_id: run id, returned from run_pipeline. :param timeout: timeout in seconds.

Returns:Most important fields are run and pipeline_runtime
Return type:A run detail object

kfp.Client().runs

class kfp_server_api.api.run_service_api.RunServiceApi(api_client=None)[source]

Bases: object

NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

archive_run(id, **kwargs)[source]

Archive a run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.archive_run(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: object

If the method is called asynchronously, returns the request thread.
archive_run_with_http_info(id, **kwargs)[source]

Archive a run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.archive_run_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: object

If the method is called asynchronously, returns the request thread.
create_run(body, **kwargs)[source]

Create a new run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_run(body, async_req=True) >>> result = thread.get()

:param async_req bool :param ApiRun body: (required) :return: ApiRunDetail

If the method is called asynchronously, returns the request thread.
create_run_with_http_info(body, **kwargs)[source]

Create a new run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_run_with_http_info(body, async_req=True) >>> result = thread.get()

:param async_req bool :param ApiRun body: (required) :return: ApiRunDetail

If the method is called asynchronously, returns the request thread.
delete_run(id, **kwargs)[source]

Delete a run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_run(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: object

If the method is called asynchronously, returns the request thread.
delete_run_with_http_info(id, **kwargs)[source]

Delete a run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_run_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: object

If the method is called asynchronously, returns the request thread.
get_run(run_id, **kwargs)[source]

Find a specific run by ID. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_run(run_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str run_id: (required) :return: ApiRunDetail

If the method is called asynchronously, returns the request thread.
get_run_with_http_info(run_id, **kwargs)[source]

Find a specific run by ID. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_run_with_http_info(run_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str run_id: (required) :return: ApiRunDetail

If the method is called asynchronously, returns the request thread.
list_runs(**kwargs)[source]

Find all runs. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_runs(async_req=True) >>> result = thread.get()

:param async_req bool :param str page_token: :param int page_size: :param str sort_by: Can be format of “field_name”, “field_name asc” or “field_name des” (Example, “name asc” or “id des”). Ascending by default. :param str resource_reference_key_type: The type of the resource that referred to. :param str resource_reference_key_id: The ID of the resource that referred to. :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). :return: ApiListRunsResponse

If the method is called asynchronously, returns the request thread.
list_runs_with_http_info(**kwargs)[source]

Find all runs. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_runs_with_http_info(async_req=True) >>> result = thread.get()

:param async_req bool :param str page_token: :param int page_size: :param str sort_by: Can be format of “field_name”, “field_name asc” or “field_name des” (Example, “name asc” or “id des”). Ascending by default. :param str resource_reference_key_type: The type of the resource that referred to. :param str resource_reference_key_id: The ID of the resource that referred to. :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). :return: ApiListRunsResponse

If the method is called asynchronously, returns the request thread.
read_artifact(run_id, node_id, artifact_name, **kwargs)[source]

Find a run’s artifact data. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_artifact(run_id, node_id, artifact_name, async_req=True) >>> result = thread.get()

:param async_req bool :param str run_id: The ID of the run. (required) :param str node_id: The ID of the running node. (required) :param str artifact_name: The name of the artifact. (required) :return: ApiReadArtifactResponse

If the method is called asynchronously, returns the request thread.
read_artifact_with_http_info(run_id, node_id, artifact_name, **kwargs)[source]

Find a run’s artifact data. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_artifact_with_http_info(run_id, node_id, artifact_name, async_req=True) >>> result = thread.get()

:param async_req bool :param str run_id: The ID of the run. (required) :param str node_id: The ID of the running node. (required) :param str artifact_name: The name of the artifact. (required) :return: ApiReadArtifactResponse

If the method is called asynchronously, returns the request thread.
report_run_metrics(run_id, body, **kwargs)[source]

ReportRunMetrics reports metrics of a run. Each metric is reported in its own transaction, so this API accepts partial failures. Metric can be uniquely identified by (run_id, node_id, name). Duplicate reporting will be ignored by the API. First reporting wins. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.report_run_metrics(run_id, body, async_req=True) >>> result = thread.get()

:param async_req bool :param str run_id: Required. The parent run ID of the metric. (required) :param ApiReportRunMetricsRequest body: (required) :return: ApiReportRunMetricsResponse

If the method is called asynchronously, returns the request thread.
report_run_metrics_with_http_info(run_id, body, **kwargs)[source]

ReportRunMetrics reports metrics of a run. Each metric is reported in its own transaction, so this API accepts partial failures. Metric can be uniquely identified by (run_id, node_id, name). Duplicate reporting will be ignored by the API. First reporting wins. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.report_run_metrics_with_http_info(run_id, body, async_req=True) >>> result = thread.get()

:param async_req bool :param str run_id: Required. The parent run ID of the metric. (required) :param ApiReportRunMetricsRequest body: (required) :return: ApiReportRunMetricsResponse

If the method is called asynchronously, returns the request thread.
retry_run(run_id, **kwargs)[source]

Re-initiate a failed or terminated run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.retry_run(run_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str run_id: (required) :return: object

If the method is called asynchronously, returns the request thread.
retry_run_with_http_info(run_id, **kwargs)[source]

Re-initiate a failed or terminated run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.retry_run_with_http_info(run_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str run_id: (required) :return: object

If the method is called asynchronously, returns the request thread.
terminate_run(run_id, **kwargs)[source]

Terminate an active run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.terminate_run(run_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str run_id: (required) :return: object

If the method is called asynchronously, returns the request thread.
terminate_run_with_http_info(run_id, **kwargs)[source]

Terminate an active run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.terminate_run_with_http_info(run_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str run_id: (required) :return: object

If the method is called asynchronously, returns the request thread.
unarchive_run(id, **kwargs)[source]

Restore an archived run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unarchive_run(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: object

If the method is called asynchronously, returns the request thread.
unarchive_run_with_http_info(id, **kwargs)[source]

Restore an archived run. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unarchive_run_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: object

If the method is called asynchronously, returns the request thread.

kfp.Client().pipelines

class kfp_server_api.api.pipeline_service_api.PipelineServiceApi(api_client=None)[source]

Bases: object

NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

create_pipeline(body, **kwargs)[source]

Add a pipeline. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_pipeline(body, async_req=True) >>> result = thread.get()

:param async_req bool :param ApiPipeline body: (required) :return: ApiPipeline

If the method is called asynchronously, returns the request thread.
create_pipeline_version(body, **kwargs)[source]

create_pipeline_version # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_pipeline_version(body, async_req=True) >>> result = thread.get()

:param async_req bool :param ApiPipelineVersion body: ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. (required) :return: ApiPipelineVersion

If the method is called asynchronously, returns the request thread.
create_pipeline_version_with_http_info(body, **kwargs)[source]

create_pipeline_version # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_pipeline_version_with_http_info(body, async_req=True) >>> result = thread.get()

:param async_req bool :param ApiPipelineVersion body: ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. (required) :return: ApiPipelineVersion

If the method is called asynchronously, returns the request thread.
create_pipeline_with_http_info(body, **kwargs)[source]

Add a pipeline. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_pipeline_with_http_info(body, async_req=True) >>> result = thread.get()

:param async_req bool :param ApiPipeline body: (required) :return: ApiPipeline

If the method is called asynchronously, returns the request thread.
delete_pipeline(id, **kwargs)[source]

Delete a pipeline. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_pipeline(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: object

If the method is called asynchronously, returns the request thread.
delete_pipeline_version(version_id, **kwargs)[source]

delete_pipeline_version # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_pipeline_version(version_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str version_id: (required) :return: object

If the method is called asynchronously, returns the request thread.
delete_pipeline_version_with_http_info(version_id, **kwargs)[source]

delete_pipeline_version # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_pipeline_version_with_http_info(version_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str version_id: (required) :return: object

If the method is called asynchronously, returns the request thread.
delete_pipeline_with_http_info(id, **kwargs)[source]

Delete a pipeline. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_pipeline_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: object

If the method is called asynchronously, returns the request thread.
get_pipeline(id, **kwargs)[source]

Find a specific pipeline by ID. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_pipeline(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: ApiPipeline

If the method is called asynchronously, returns the request thread.
get_pipeline_version(version_id, **kwargs)[source]

get_pipeline_version # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_pipeline_version(version_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str version_id: (required) :return: ApiPipelineVersion

If the method is called asynchronously, returns the request thread.
get_pipeline_version_template(version_id, **kwargs)[source]

get_pipeline_version_template # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_pipeline_version_template(version_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str version_id: (required) :return: ApiGetTemplateResponse

If the method is called asynchronously, returns the request thread.
get_pipeline_version_template_with_http_info(version_id, **kwargs)[source]

get_pipeline_version_template # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_pipeline_version_template_with_http_info(version_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str version_id: (required) :return: ApiGetTemplateResponse

If the method is called asynchronously, returns the request thread.
get_pipeline_version_with_http_info(version_id, **kwargs)[source]

get_pipeline_version # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_pipeline_version_with_http_info(version_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str version_id: (required) :return: ApiPipelineVersion

If the method is called asynchronously, returns the request thread.
get_pipeline_with_http_info(id, **kwargs)[source]

Find a specific pipeline by ID. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_pipeline_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: ApiPipeline

If the method is called asynchronously, returns the request thread.
get_template(id, **kwargs)[source]

Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_template(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: ApiGetTemplateResponse

If the method is called asynchronously, returns the request thread.
get_template_with_http_info(id, **kwargs)[source]

Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_template_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: (required) :return: ApiGetTemplateResponse

If the method is called asynchronously, returns the request thread.
list_pipeline_versions(**kwargs)[source]

list_pipeline_versions # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_pipeline_versions(async_req=True) >>> result = thread.get()

:param async_req bool :param str resource_key_type: The type of the resource that referred to. :param str resource_key_id: The ID of the resource that referred to. :param int page_size: :param str page_token: :param str sort_by: Can be format of “field_name”, “field_name asc” or “field_name des” Ascending by default. :param str filter: A base-64 encoded, JSON-serialized Filter protocol buffer (see filter.proto). :return: ApiListPipelineVersionsResponse

If the method is called asynchronously, returns the request thread.
list_pipeline_versions_with_http_info(**kwargs)[source]

list_pipeline_versions # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_pipeline_versions_with_http_info(async_req=True) >>> result = thread.get()

:param async_req bool :param str resource_key_type: The type of the resource that referred to. :param str resource_key_id: The ID of the resource that referred to. :param int page_size: :param str page_token: :param str sort_by: Can be format of “field_name”, “field_name asc” or “field_name des” Ascending by default. :param str filter: A base-64 encoded, JSON-serialized Filter protocol buffer (see filter.proto). :return: ApiListPipelineVersionsResponse

If the method is called asynchronously, returns the request thread.
list_pipelines(**kwargs)[source]

Find all pipelines. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_pipelines(async_req=True) >>> result = thread.get()

:param async_req bool :param str page_token: :param int page_size: :param str sort_by: Can be format of “field_name”, “field_name asc” or “field_name des” Ascending by default. :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). :return: ApiListPipelinesResponse

If the method is called asynchronously, returns the request thread.
list_pipelines_with_http_info(**kwargs)[source]

Find all pipelines. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_pipelines_with_http_info(async_req=True) >>> result = thread.get()

:param async_req bool :param str page_token: :param int page_size: :param str sort_by: Can be format of “field_name”, “field_name asc” or “field_name des” Ascending by default. :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). :return: ApiListPipelinesResponse

If the method is called asynchronously, returns the request thread.

kfp.Client().experiments

class kfp_server_api.api.experiment_service_api.ExperimentServiceApi(api_client=None)[source]

Bases: object

NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

create_experiment(body, **kwargs)[source]

Create a new experiment. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_experiment(body, async_req=True) >>> result = thread.get()

:param async_req bool :param ApiExperiment body: The experiment to be created. (required) :return: ApiExperiment

If the method is called asynchronously, returns the request thread.
create_experiment_with_http_info(body, **kwargs)[source]

Create a new experiment. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_experiment_with_http_info(body, async_req=True) >>> result = thread.get()

:param async_req bool :param ApiExperiment body: The experiment to be created. (required) :return: ApiExperiment

If the method is called asynchronously, returns the request thread.
delete_experiment(id, **kwargs)[source]

Delete an experiment. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_experiment(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the experiment to be deleted. (required) :return: object

If the method is called asynchronously, returns the request thread.
delete_experiment_with_http_info(id, **kwargs)[source]

Delete an experiment. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_experiment_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the experiment to be deleted. (required) :return: object

If the method is called asynchronously, returns the request thread.
get_experiment(id, **kwargs)[source]

Find a specific experiment by ID. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_experiment(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the experiment to be retrieved. (required) :return: ApiExperiment

If the method is called asynchronously, returns the request thread.
get_experiment_with_http_info(id, **kwargs)[source]

Find a specific experiment by ID. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_experiment_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the experiment to be retrieved. (required) :return: ApiExperiment

If the method is called asynchronously, returns the request thread.
list_experiment(**kwargs)[source]

Find all experiments. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_experiment(async_req=True) >>> result = thread.get()

:param async_req bool :param str page_token: :param int page_size: :param str sort_by: Can be format of “field_name”, “field_name asc” or “field_name des” Ascending by default. :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). :param str resource_reference_key_type: The type of the resource that referred to. :param str resource_reference_key_id: The ID of the resource that referred to. :return: ApiListExperimentsResponse

If the method is called asynchronously, returns the request thread.
list_experiment_with_http_info(**kwargs)[source]

Find all experiments. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_experiment_with_http_info(async_req=True) >>> result = thread.get()

:param async_req bool :param str page_token: :param int page_size: :param str sort_by: Can be format of “field_name”, “field_name asc” or “field_name des” Ascending by default. :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). :param str resource_reference_key_type: The type of the resource that referred to. :param str resource_reference_key_id: The ID of the resource that referred to. :return: ApiListExperimentsResponse

If the method is called asynchronously, returns the request thread.

kfp.Client().jobs

class kfp_server_api.api.job_service_api.JobServiceApi(api_client=None)[source]

Bases: object

NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

create_job(body, **kwargs)[source]

Create a new job. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_job(body, async_req=True) >>> result = thread.get()

:param async_req bool :param ApiJob body: The job to be created (required) :return: ApiJob

If the method is called asynchronously, returns the request thread.
create_job_with_http_info(body, **kwargs)[source]

Create a new job. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_job_with_http_info(body, async_req=True) >>> result = thread.get()

:param async_req bool :param ApiJob body: The job to be created (required) :return: ApiJob

If the method is called asynchronously, returns the request thread.
delete_job(id, **kwargs)[source]

Delete a job. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_job(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the job to be deleted (required) :return: object

If the method is called asynchronously, returns the request thread.
delete_job_with_http_info(id, **kwargs)[source]

Delete a job. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_job_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the job to be deleted (required) :return: object

If the method is called asynchronously, returns the request thread.
disable_job(id, **kwargs)[source]

Stops a job and all its associated runs. The job is not deleted. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.disable_job(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the job to be disabled (required) :return: object

If the method is called asynchronously, returns the request thread.
disable_job_with_http_info(id, **kwargs)[source]

Stops a job and all its associated runs. The job is not deleted. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.disable_job_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the job to be disabled (required) :return: object

If the method is called asynchronously, returns the request thread.
enable_job(id, **kwargs)[source]

Restarts a job that was previously stopped. All runs associated with the job will continue. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.enable_job(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the job to be enabled (required) :return: object

If the method is called asynchronously, returns the request thread.
enable_job_with_http_info(id, **kwargs)[source]

Restarts a job that was previously stopped. All runs associated with the job will continue. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.enable_job_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the job to be enabled (required) :return: object

If the method is called asynchronously, returns the request thread.
get_job(id, **kwargs)[source]

Find a specific job by ID. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_job(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the job to be retrieved (required) :return: ApiJob

If the method is called asynchronously, returns the request thread.
get_job_with_http_info(id, **kwargs)[source]

Find a specific job by ID. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_job_with_http_info(id, async_req=True) >>> result = thread.get()

:param async_req bool :param str id: The ID of the job to be retrieved (required) :return: ApiJob

If the method is called asynchronously, returns the request thread.
list_jobs(**kwargs)[source]

Find all jobs. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_jobs(async_req=True) >>> result = thread.get()

:param async_req bool :param str page_token: :param int page_size: :param str sort_by: Can be format of “field_name”, “field_name asc” or “field_name des”. Ascending by default. :param str resource_reference_key_type: The type of the resource that referred to. :param str resource_reference_key_id: The ID of the resource that referred to. :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). :return: ApiListJobsResponse

If the method is called asynchronously, returns the request thread.
list_jobs_with_http_info(**kwargs)[source]

Find all jobs. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_jobs_with_http_info(async_req=True) >>> result = thread.get()

:param async_req bool :param str page_token: :param int page_size: :param str sort_by: Can be format of “field_name”, “field_name asc” or “field_name des”. Ascending by default. :param str resource_reference_key_type: The type of the resource that referred to. :param str resource_reference_key_id: The ID of the resource that referred to. :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). :return: ApiListJobsResponse

If the method is called asynchronously, returns the request thread.

kfp.Client().pipeline_uploads

class kfp_server_api.api.pipeline_upload_service_api.PipelineUploadServiceApi(api_client=None)[source]

Bases: object

NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

upload_pipeline(uploadfile, **kwargs)[source]

upload_pipeline # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.upload_pipeline(uploadfile, async_req=True) >>> result = thread.get()

:param async_req bool :param file uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) :param str name: :return: ApiPipeline

If the method is called asynchronously, returns the request thread.
upload_pipeline_version(uploadfile, **kwargs)[source]

upload_pipeline_version # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.upload_pipeline_version(uploadfile, async_req=True) >>> result = thread.get()

:param async_req bool :param file uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) :param str name: :param str pipelineid: :return: ApiPipelineVersion

If the method is called asynchronously, returns the request thread.
upload_pipeline_version_with_http_info(uploadfile, **kwargs)[source]

upload_pipeline_version # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.upload_pipeline_version_with_http_info(uploadfile, async_req=True) >>> result = thread.get()

:param async_req bool :param file uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) :param str name: :param str pipelineid: :return: ApiPipelineVersion

If the method is called asynchronously, returns the request thread.
upload_pipeline_with_http_info(uploadfile, **kwargs)[source]

upload_pipeline # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.upload_pipeline_with_http_info(uploadfile, async_req=True) >>> result = thread.get()

:param async_req bool :param file uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) :param str name: :return: ApiPipeline

If the method is called asynchronously, returns the request thread.