index
int64 0
0
| repo_id
stringlengths 21
232
| file_path
stringlengths 34
259
| content
stringlengths 1
14.1M
| __index_level_0__
int64 0
10k
|
---|---|---|---|---|
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/visualization/configuration.ts | // tslint:disable
/**
* backend/api/v2beta1/visualization.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => string);
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => string);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
}
}
| 100 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/visualization | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/visualization/.swagger-codegen/VERSION | 2.4.7 | 101 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/filter/api.ts | /// <reference path="./custom.d.ts" />
// tslint:disable
/**
* backend/api/v2beta1/filter.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import * as url from 'url';
import * as portableFetch from 'portable-fetch';
import { Configuration } from './configuration';
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};
/**
*
* @export
* @interface FetchAPI
*/
export interface FetchAPI {
(url: string, init?: any): Promise<Response>;
}
/**
*
* @export
* @interface FetchArgs
*/
export interface FetchArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration;
constructor(
configuration?: Configuration,
protected basePath: string = BASE_PATH,
protected fetch: FetchAPI = portableFetch,
) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: 'RequiredError';
constructor(public field: string, msg?: string) {
super(msg);
}
}
/**
* List of integers.
* @export
* @interface PredicateIntValues
*/
export interface PredicateIntValues {
/**
*
* @type {Array<number>}
* @memberof PredicateIntValues
*/
values?: Array<number>;
}
/**
* List of long integers.
* @export
* @interface PredicateLongValues
*/
export interface PredicateLongValues {
/**
*
* @type {Array<string>}
* @memberof PredicateLongValues
*/
values?: Array<string>;
}
/**
* List of strings.
* @export
* @interface PredicateStringValues
*/
export interface PredicateStringValues {
/**
*
* @type {Array<string>}
* @memberof PredicateStringValues
*/
values?: Array<string>;
}
/**
* Filter is used to filter resources returned from a ListXXX request. Example filters: 1) Filter runs with status = 'Running' filter { predicate { key: \"status\" operation: EQUALS string_value: \"Running\" } } 2) Filter runs that succeeded since Dec 1, 2018 filter { predicate { key: \"status\" operation: EQUALS string_value: \"Succeeded\" } predicate { key: \"created_at\" operation: GREATER_THAN timestamp_value { seconds: 1543651200 } } } 3) Filter runs with one of labels 'label_1' or 'label_2' filter { predicate { key: \"label\" operation: IN string_values { value: 'label_1' value: 'label_2' } } }
* @export
* @interface V2beta1Filter
*/
export interface V2beta1Filter {
/**
* All predicates are AND-ed when this filter is applied.
* @type {Array<V2beta1Predicate>}
* @memberof V2beta1Filter
*/
predicates?: Array<V2beta1Predicate>;
}
/**
* Predicate captures individual conditions that must be true for a resource being filtered.
* @export
* @interface V2beta1Predicate
*/
export interface V2beta1Predicate {
/**
*
* @type {V2beta1PredicateOperation}
* @memberof V2beta1Predicate
*/
operation?: V2beta1PredicateOperation;
/**
* Key for the operation (first argument).
* @type {string}
* @memberof V2beta1Predicate
*/
key?: string;
/**
* Integer.
* @type {number}
* @memberof V2beta1Predicate
*/
int_value?: number;
/**
* Long integer.
* @type {string}
* @memberof V2beta1Predicate
*/
long_value?: string;
/**
* String.
* @type {string}
* @memberof V2beta1Predicate
*/
string_value?: string;
/**
* Timestamp values will be converted to Unix time (seconds since the epoch) prior to being used in a filtering operation.
* @type {Date}
* @memberof V2beta1Predicate
*/
timestamp_value?: Date;
/**
* Array values below are only meant to be used by the IN operator.
* @type {PredicateIntValues}
* @memberof V2beta1Predicate
*/
int_values?: PredicateIntValues;
/**
* List of long integers.
* @type {PredicateLongValues}
* @memberof V2beta1Predicate
*/
long_values?: PredicateLongValues;
/**
* List of strings.
* @type {PredicateStringValues}
* @memberof V2beta1Predicate
*/
string_values?: PredicateStringValues;
}
/**
* Operation is the operation to apply. - OPERATION_UNSPECIFIED: Default operation. This operation is not used. - EQUALS: Operation on scalar values. Only applies to one of |int_value|, |long_value|, |string_value| or |timestamp_value|. - NOT_EQUALS: Negated EQUALS. - GREATER_THAN: Greater than operation. - GREATER_THAN_EQUALS: Greater than or equals operation. - LESS_THAN: Less than operation. - LESS_THAN_EQUALS: Less than or equals operation - IN: Checks if the value is a member of a given array, which should be one of |int_values|, |long_values| or |string_values|. - IS_SUBSTRING: Checks if the value contains |string_value| as a substring match. Only applies to |string_value|.
* @export
* @enum {string}
*/
export enum V2beta1PredicateOperation {
OPERATIONUNSPECIFIED = <any>'OPERATION_UNSPECIFIED',
EQUALS = <any>'EQUALS',
NOTEQUALS = <any>'NOT_EQUALS',
GREATERTHAN = <any>'GREATER_THAN',
GREATERTHANEQUALS = <any>'GREATER_THAN_EQUALS',
LESSTHAN = <any>'LESS_THAN',
LESSTHANEQUALS = <any>'LESS_THAN_EQUALS',
IN = <any>'IN',
ISSUBSTRING = <any>'IS_SUBSTRING',
}
| 102 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/filter/.swagger-codegen-ignore | # Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
| 103 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/filter/git_push.sh | #!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
git_user_id=$1
git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'
| 104 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/filter/index.ts | // tslint:disable
/**
* backend/api/v2beta1/filter.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export * from './api';
export * from './configuration';
| 105 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/filter/custom.d.ts | declare module 'portable-fetch';
declare module 'url';
| 106 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/filter/configuration.ts | // tslint:disable
/**
* backend/api/v2beta1/filter.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => string);
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => string);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
}
}
| 107 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/filter | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/filter/.swagger-codegen/VERSION | 2.4.7 | 108 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/recurringrun/api.ts | /// <reference path="./custom.d.ts" />
// tslint:disable
/**
* backend/api/v2beta1/recurring_run.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import * as url from 'url';
import * as portableFetch from 'portable-fetch';
import { Configuration } from './configuration';
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};
/**
*
* @export
* @interface FetchAPI
*/
export interface FetchAPI {
(url: string, init?: any): Promise<Response>;
}
/**
*
* @export
* @interface FetchArgs
*/
export interface FetchArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration;
constructor(
configuration?: Configuration,
protected basePath: string = BASE_PATH,
protected fetch: FetchAPI = portableFetch,
) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: 'RequiredError';
constructor(public field: string, msg?: string) {
super(msg);
}
}
/**
* The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
* @export
* @interface GooglerpcStatus
*/
export interface GooglerpcStatus {
/**
* The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
* @type {number}
* @memberof GooglerpcStatus
*/
code?: number;
/**
* A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
* @type {string}
* @memberof GooglerpcStatus
*/
message?: string;
/**
* A list of messages that carry the error details. There is a common set of message types for APIs to use.
* @type {Array<ProtobufAny>}
* @memberof GooglerpcStatus
*/
details?: Array<ProtobufAny>;
}
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
* @export
* @interface ProtobufAny
*/
export interface ProtobufAny {
/**
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
* @type {string}
* @memberof ProtobufAny
*/
type_url?: string;
/**
* Must be a valid serialized protocol buffer of the above specified type.
* @type {string}
* @memberof ProtobufAny
*/
value?: string;
}
/**
* `NullValue` is a singleton enumeration to represent the null value for the `Value` type union. The JSON representation for `NullValue` is JSON `null`. - NULL_VALUE: Null value.
* @export
* @enum {string}
*/
export enum ProtobufNullValue {
NULLVALUE = <any>'NULL_VALUE',
}
/**
* Required input. User setting to enable or disable the recurring run. Only used for creation of recurring runs. Later updates use enable/disable API. - DISABLE: The recurring run won't schedule any run if disabled.
* @export
* @enum {string}
*/
export enum RecurringRunMode {
MODEUNSPECIFIED = <any>'MODE_UNSPECIFIED',
ENABLE = <any>'ENABLE',
DISABLE = <any>'DISABLE',
}
/**
* CronSchedule allow scheduling the recurring run with unix-like cron.
* @export
* @interface V2beta1CronSchedule
*/
export interface V2beta1CronSchedule {
/**
* The start time of the cron job.
* @type {Date}
* @memberof V2beta1CronSchedule
*/
start_time?: Date;
/**
* The end time of the cron job.
* @type {Date}
* @memberof V2beta1CronSchedule
*/
end_time?: Date;
/**
*
* @type {string}
* @memberof V2beta1CronSchedule
*/
cron?: string;
}
/**
*
* @export
* @interface V2beta1ListRecurringRunsResponse
*/
export interface V2beta1ListRecurringRunsResponse {
/**
* A list of recurring runs returned.
* @type {Array<V2beta1RecurringRun>}
* @memberof V2beta1ListRecurringRunsResponse
*/
recurringRuns?: Array<V2beta1RecurringRun>;
/**
* The total number of recurring runs for the given query.
* @type {number}
* @memberof V2beta1ListRecurringRunsResponse
*/
total_size?: number;
/**
* The token to list the next page of recurring runs.
* @type {string}
* @memberof V2beta1ListRecurringRunsResponse
*/
next_page_token?: string;
}
/**
* PeriodicSchedule allow scheduling the recurring run periodically with certain interval.
* @export
* @interface V2beta1PeriodicSchedule
*/
export interface V2beta1PeriodicSchedule {
/**
* The start time of the periodic recurring run.
* @type {Date}
* @memberof V2beta1PeriodicSchedule
*/
start_time?: Date;
/**
* The end time of the periodic recurring run.
* @type {Date}
* @memberof V2beta1PeriodicSchedule
*/
end_time?: Date;
/**
* The time interval between the starting time of consecutive recurring runs.
* @type {string}
* @memberof V2beta1PeriodicSchedule
*/
interval_second?: string;
}
/**
* Reference to an existing pipeline version.
* @export
* @interface V2beta1PipelineVersionReference
*/
export interface V2beta1PipelineVersionReference {
/**
* Input. Required. Unique ID of the parent pipeline.
* @type {string}
* @memberof V2beta1PipelineVersionReference
*/
pipeline_id?: string;
/**
* Input. Required. Unique ID of an existing pipeline version.
* @type {string}
* @memberof V2beta1PipelineVersionReference
*/
pipeline_version_id?: string;
}
/**
*
* @export
* @interface V2beta1RecurringRun
*/
export interface V2beta1RecurringRun {
/**
* Output. Unique run ID generated by API server.
* @type {string}
* @memberof V2beta1RecurringRun
*/
recurring_run_id?: string;
/**
* Required input field. Recurring run name provided by user. Not unique.
* @type {string}
* @memberof V2beta1RecurringRun
*/
display_name?: string;
/**
* Optional input field. Describes the purpose of the recurring run.
* @type {string}
* @memberof V2beta1RecurringRun
*/
description?: string;
/**
* The ID of the pipeline version used for creating runs.
* @type {string}
* @memberof V2beta1RecurringRun
*/
pipeline_version_id?: string;
/**
* The pipeline spec.
* @type {any}
* @memberof V2beta1RecurringRun
*/
pipeline_spec?: any;
/**
* Reference to a pipeline version containing pipeline_id and pipeline_version_id.
* @type {V2beta1PipelineVersionReference}
* @memberof V2beta1RecurringRun
*/
pipeline_version_reference?: V2beta1PipelineVersionReference;
/**
* Runtime config of the pipeline.
* @type {V2beta1RuntimeConfig}
* @memberof V2beta1RecurringRun
*/
runtime_config?: V2beta1RuntimeConfig;
/**
* Optional input field. Specifies which Kubernetes service account this recurring run uses.
* @type {string}
* @memberof V2beta1RecurringRun
*/
service_account?: string;
/**
* Required input field. Specifies how many runs can be executed concurrently. Range [1-10].
* @type {string}
* @memberof V2beta1RecurringRun
*/
max_concurrency?: string;
/**
* Required input field. Specifies how a run is triggered. Support cron mode or periodic mode.
* @type {V2beta1Trigger}
* @memberof V2beta1RecurringRun
*/
trigger?: V2beta1Trigger;
/**
*
* @type {RecurringRunMode}
* @memberof V2beta1RecurringRun
*/
mode?: RecurringRunMode;
/**
* Output. The time this recurring run was created.
* @type {Date}
* @memberof V2beta1RecurringRun
*/
created_at?: Date;
/**
* Output. The last time this recurring run was updated.
* @type {Date}
* @memberof V2beta1RecurringRun
*/
updated_at?: Date;
/**
*
* @type {V2beta1RecurringRunStatus}
* @memberof V2beta1RecurringRun
*/
status?: V2beta1RecurringRunStatus;
/**
* In case any error happens retrieving a recurring run field, only recurring run ID and the error message is returned. Client has the flexibility of choosing how to handle the error. This is especially useful during listing call.
* @type {GooglerpcStatus}
* @memberof V2beta1RecurringRun
*/
error?: GooglerpcStatus;
/**
* Optional input field. Whether the recurring run should catch up if behind schedule. If true, the recurring run will only schedule the latest interval if behind schedule. If false, the recurring run will catch up on each past interval.
* @type {boolean}
* @memberof V2beta1RecurringRun
*/
no_catchup?: boolean;
/**
* TODO (gkclat): consider removing this field if it can be obtained from the parent experiment. Output only. Namespace this recurring run belongs to. Derived from the parent experiment.
* @type {string}
* @memberof V2beta1RecurringRun
*/
namespace?: string;
/**
* ID of the parent experiment this recurring run belongs to.
* @type {string}
* @memberof V2beta1RecurringRun
*/
experiment_id?: string;
}
/**
* Output. The status of the recurring run.
* @export
* @enum {string}
*/
export enum V2beta1RecurringRunStatus {
STATUSUNSPECIFIED = <any>'STATUS_UNSPECIFIED',
ENABLED = <any>'ENABLED',
DISABLED = <any>'DISABLED',
}
/**
* The runtime config.
* @export
* @interface V2beta1RuntimeConfig
*/
export interface V2beta1RuntimeConfig {
/**
* The runtime parameters of the Pipeline. The parameters will be used to replace the placeholders at runtime.
* @type {{ [key: string]: any; }}
* @memberof V2beta1RuntimeConfig
*/
parameters?: { [key: string]: any };
/**
*
* @type {string}
* @memberof V2beta1RuntimeConfig
*/
pipeline_root?: string;
}
/**
* Trigger defines what starts a pipeline run.
* @export
* @interface V2beta1Trigger
*/
export interface V2beta1Trigger {
/**
*
* @type {V2beta1CronSchedule}
* @memberof V2beta1Trigger
*/
cron_schedule?: V2beta1CronSchedule;
/**
*
* @type {V2beta1PeriodicSchedule}
* @memberof V2beta1Trigger
*/
periodic_schedule?: V2beta1PeriodicSchedule;
}
/**
* RecurringRunServiceApi - fetch parameter creator
* @export
*/
export const RecurringRunServiceApiFetchParamCreator = function(configuration?: Configuration) {
return {
/**
*
* @summary Creates a new recurring run in an experiment, given the experiment ID.
* @param {V2beta1RecurringRun} body The recurring run to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createRecurringRun(body: V2beta1RecurringRun, options: any = {}): FetchArgs {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError(
'body',
'Required parameter body was null or undefined when calling createRecurringRun.',
);
}
const localVarPath = `/apis/v2beta1/recurringruns`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization =
<any>'V2beta1RecurringRun' !== 'string' ||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Deletes a recurring run.
* @param {string} recurring_run_id The ID of the recurring run to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRecurringRun(recurring_run_id: string, options: any = {}): FetchArgs {
// verify required parameter 'recurring_run_id' is not null or undefined
if (recurring_run_id === null || recurring_run_id === undefined) {
throw new RequiredError(
'recurring_run_id',
'Required parameter recurring_run_id was null or undefined when calling deleteRecurringRun.',
);
}
const localVarPath = `/apis/v2beta1/recurringruns/{recurring_run_id}`.replace(
`{${'recurring_run_id'}}`,
encodeURIComponent(String(recurring_run_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Stops a recurring run and all its associated runs. The recurring run is not deleted.
* @param {string} recurring_run_id The ID of the recurring runs to be disabled.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
disableRecurringRun(recurring_run_id: string, options: any = {}): FetchArgs {
// verify required parameter 'recurring_run_id' is not null or undefined
if (recurring_run_id === null || recurring_run_id === undefined) {
throw new RequiredError(
'recurring_run_id',
'Required parameter recurring_run_id was null or undefined when calling disableRecurringRun.',
);
}
const localVarPath = `/apis/v2beta1/recurringruns/{recurring_run_id}:disable`.replace(
`{${'recurring_run_id'}}`,
encodeURIComponent(String(recurring_run_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Restarts a recurring run that was previously stopped. All runs associated with the recurring run will continue.
* @param {string} recurring_run_id The ID of the recurring runs to be enabled.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
enableRecurringRun(recurring_run_id: string, options: any = {}): FetchArgs {
// verify required parameter 'recurring_run_id' is not null or undefined
if (recurring_run_id === null || recurring_run_id === undefined) {
throw new RequiredError(
'recurring_run_id',
'Required parameter recurring_run_id was null or undefined when calling enableRecurringRun.',
);
}
const localVarPath = `/apis/v2beta1/recurringruns/{recurring_run_id}:enable`.replace(
`{${'recurring_run_id'}}`,
encodeURIComponent(String(recurring_run_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds a specific recurring run by ID.
* @param {string} recurring_run_id The ID of the recurring run to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRecurringRun(recurring_run_id: string, options: any = {}): FetchArgs {
// verify required parameter 'recurring_run_id' is not null or undefined
if (recurring_run_id === null || recurring_run_id === undefined) {
throw new RequiredError(
'recurring_run_id',
'Required parameter recurring_run_id was null or undefined when calling getRecurringRun.',
);
}
const localVarPath = `/apis/v2beta1/recurringruns/{recurring_run_id}`.replace(
`{${'recurring_run_id'}}`,
encodeURIComponent(String(recurring_run_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds all recurring runs given experiment and namespace. If experiment ID is not specified, find all recurring runs across all experiments.
* @param {string} [page_token] A page token to request the next page of results. The token is acquired from the nextPageToken field of the response from the previous ListRecurringRuns call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of recurring runs to be listed per page. If there are more recurring runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be formatted as \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [namespace] Optional input. The namespace the recurring runs belong to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {string} [experiment_id] The ID of the experiment to be retrieved. If empty, list recurring runs across all experiments.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRecurringRuns(
page_token?: string,
page_size?: number,
sort_by?: string,
namespace?: string,
filter?: string,
experiment_id?: string,
options: any = {},
): FetchArgs {
const localVarPath = `/apis/v2beta1/recurringruns`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (page_token !== undefined) {
localVarQueryParameter['page_token'] = page_token;
}
if (page_size !== undefined) {
localVarQueryParameter['page_size'] = page_size;
}
if (sort_by !== undefined) {
localVarQueryParameter['sort_by'] = sort_by;
}
if (namespace !== undefined) {
localVarQueryParameter['namespace'] = namespace;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (experiment_id !== undefined) {
localVarQueryParameter['experiment_id'] = experiment_id;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* RecurringRunServiceApi - functional programming interface
* @export
*/
export const RecurringRunServiceApiFp = function(configuration?: Configuration) {
return {
/**
*
* @summary Creates a new recurring run in an experiment, given the experiment ID.
* @param {V2beta1RecurringRun} body The recurring run to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createRecurringRun(
body: V2beta1RecurringRun,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1RecurringRun> {
const localVarFetchArgs = RecurringRunServiceApiFetchParamCreator(
configuration,
).createRecurringRun(body, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Deletes a recurring run.
* @param {string} recurring_run_id The ID of the recurring run to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRecurringRun(
recurring_run_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = RecurringRunServiceApiFetchParamCreator(
configuration,
).deleteRecurringRun(recurring_run_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Stops a recurring run and all its associated runs. The recurring run is not deleted.
* @param {string} recurring_run_id The ID of the recurring runs to be disabled.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
disableRecurringRun(
recurring_run_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = RecurringRunServiceApiFetchParamCreator(
configuration,
).disableRecurringRun(recurring_run_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Restarts a recurring run that was previously stopped. All runs associated with the recurring run will continue.
* @param {string} recurring_run_id The ID of the recurring runs to be enabled.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
enableRecurringRun(
recurring_run_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = RecurringRunServiceApiFetchParamCreator(
configuration,
).enableRecurringRun(recurring_run_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds a specific recurring run by ID.
* @param {string} recurring_run_id The ID of the recurring run to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRecurringRun(
recurring_run_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1RecurringRun> {
const localVarFetchArgs = RecurringRunServiceApiFetchParamCreator(
configuration,
).getRecurringRun(recurring_run_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds all recurring runs given experiment and namespace. If experiment ID is not specified, find all recurring runs across all experiments.
* @param {string} [page_token] A page token to request the next page of results. The token is acquired from the nextPageToken field of the response from the previous ListRecurringRuns call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of recurring runs to be listed per page. If there are more recurring runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be formatted as \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [namespace] Optional input. The namespace the recurring runs belong to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {string} [experiment_id] The ID of the experiment to be retrieved. If empty, list recurring runs across all experiments.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRecurringRuns(
page_token?: string,
page_size?: number,
sort_by?: string,
namespace?: string,
filter?: string,
experiment_id?: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1ListRecurringRunsResponse> {
const localVarFetchArgs = RecurringRunServiceApiFetchParamCreator(
configuration,
).listRecurringRuns(
page_token,
page_size,
sort_by,
namespace,
filter,
experiment_id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
};
};
/**
* RecurringRunServiceApi - factory interface
* @export
*/
export const RecurringRunServiceApiFactory = function(
configuration?: Configuration,
fetch?: FetchAPI,
basePath?: string,
) {
return {
/**
*
* @summary Creates a new recurring run in an experiment, given the experiment ID.
* @param {V2beta1RecurringRun} body The recurring run to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createRecurringRun(body: V2beta1RecurringRun, options?: any) {
return RecurringRunServiceApiFp(configuration).createRecurringRun(body, options)(
fetch,
basePath,
);
},
/**
*
* @summary Deletes a recurring run.
* @param {string} recurring_run_id The ID of the recurring run to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRecurringRun(recurring_run_id: string, options?: any) {
return RecurringRunServiceApiFp(configuration).deleteRecurringRun(recurring_run_id, options)(
fetch,
basePath,
);
},
/**
*
* @summary Stops a recurring run and all its associated runs. The recurring run is not deleted.
* @param {string} recurring_run_id The ID of the recurring runs to be disabled.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
disableRecurringRun(recurring_run_id: string, options?: any) {
return RecurringRunServiceApiFp(configuration).disableRecurringRun(recurring_run_id, options)(
fetch,
basePath,
);
},
/**
*
* @summary Restarts a recurring run that was previously stopped. All runs associated with the recurring run will continue.
* @param {string} recurring_run_id The ID of the recurring runs to be enabled.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
enableRecurringRun(recurring_run_id: string, options?: any) {
return RecurringRunServiceApiFp(configuration).enableRecurringRun(recurring_run_id, options)(
fetch,
basePath,
);
},
/**
*
* @summary Finds a specific recurring run by ID.
* @param {string} recurring_run_id The ID of the recurring run to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRecurringRun(recurring_run_id: string, options?: any) {
return RecurringRunServiceApiFp(configuration).getRecurringRun(recurring_run_id, options)(
fetch,
basePath,
);
},
/**
*
* @summary Finds all recurring runs given experiment and namespace. If experiment ID is not specified, find all recurring runs across all experiments.
* @param {string} [page_token] A page token to request the next page of results. The token is acquired from the nextPageToken field of the response from the previous ListRecurringRuns call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of recurring runs to be listed per page. If there are more recurring runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be formatted as \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [namespace] Optional input. The namespace the recurring runs belong to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {string} [experiment_id] The ID of the experiment to be retrieved. If empty, list recurring runs across all experiments.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRecurringRuns(
page_token?: string,
page_size?: number,
sort_by?: string,
namespace?: string,
filter?: string,
experiment_id?: string,
options?: any,
) {
return RecurringRunServiceApiFp(configuration).listRecurringRuns(
page_token,
page_size,
sort_by,
namespace,
filter,
experiment_id,
options,
)(fetch, basePath);
},
};
};
/**
* RecurringRunServiceApi - object-oriented interface
* @export
* @class RecurringRunServiceApi
* @extends {BaseAPI}
*/
export class RecurringRunServiceApi extends BaseAPI {
/**
*
* @summary Creates a new recurring run in an experiment, given the experiment ID.
* @param {V2beta1RecurringRun} body The recurring run to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RecurringRunServiceApi
*/
public createRecurringRun(body: V2beta1RecurringRun, options?: any) {
return RecurringRunServiceApiFp(this.configuration).createRecurringRun(body, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Deletes a recurring run.
* @param {string} recurring_run_id The ID of the recurring run to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RecurringRunServiceApi
*/
public deleteRecurringRun(recurring_run_id: string, options?: any) {
return RecurringRunServiceApiFp(this.configuration).deleteRecurringRun(
recurring_run_id,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Stops a recurring run and all its associated runs. The recurring run is not deleted.
* @param {string} recurring_run_id The ID of the recurring runs to be disabled.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RecurringRunServiceApi
*/
public disableRecurringRun(recurring_run_id: string, options?: any) {
return RecurringRunServiceApiFp(this.configuration).disableRecurringRun(
recurring_run_id,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Restarts a recurring run that was previously stopped. All runs associated with the recurring run will continue.
* @param {string} recurring_run_id The ID of the recurring runs to be enabled.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RecurringRunServiceApi
*/
public enableRecurringRun(recurring_run_id: string, options?: any) {
return RecurringRunServiceApiFp(this.configuration).enableRecurringRun(
recurring_run_id,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Finds a specific recurring run by ID.
* @param {string} recurring_run_id The ID of the recurring run to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RecurringRunServiceApi
*/
public getRecurringRun(recurring_run_id: string, options?: any) {
return RecurringRunServiceApiFp(this.configuration).getRecurringRun(recurring_run_id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Finds all recurring runs given experiment and namespace. If experiment ID is not specified, find all recurring runs across all experiments.
* @param {string} [page_token] A page token to request the next page of results. The token is acquired from the nextPageToken field of the response from the previous ListRecurringRuns call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of recurring runs to be listed per page. If there are more recurring runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be formatted as \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [namespace] Optional input. The namespace the recurring runs belong to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {string} [experiment_id] The ID of the experiment to be retrieved. If empty, list recurring runs across all experiments.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RecurringRunServiceApi
*/
public listRecurringRuns(
page_token?: string,
page_size?: number,
sort_by?: string,
namespace?: string,
filter?: string,
experiment_id?: string,
options?: any,
) {
return RecurringRunServiceApiFp(this.configuration).listRecurringRuns(
page_token,
page_size,
sort_by,
namespace,
filter,
experiment_id,
options,
)(this.fetch, this.basePath);
}
}
| 109 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/recurringrun/.swagger-codegen-ignore | # Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
| 110 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/recurringrun/git_push.sh | #!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
git_user_id=$1
git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'
| 111 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/recurringrun/index.ts | // tslint:disable
/**
* backend/api/v2beta1/recurring_run.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export * from './api';
export * from './configuration';
| 112 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/recurringrun/custom.d.ts | declare module 'portable-fetch';
declare module 'url';
| 113 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/recurringrun/configuration.ts | // tslint:disable
/**
* backend/api/v2beta1/recurring_run.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => string);
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => string);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
}
}
| 114 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/recurringrun | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/recurringrun/.swagger-codegen/VERSION | 2.4.7 | 115 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/experiment/api.ts | /// <reference path="./custom.d.ts" />
// tslint:disable
/**
* backend/api/v2beta1/experiment.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import * as url from 'url';
import * as portableFetch from 'portable-fetch';
import { Configuration } from './configuration';
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};
/**
*
* @export
* @interface FetchAPI
*/
export interface FetchAPI {
(url: string, init?: any): Promise<Response>;
}
/**
*
* @export
* @interface FetchArgs
*/
export interface FetchArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration;
constructor(
configuration?: Configuration,
protected basePath: string = BASE_PATH,
protected fetch: FetchAPI = portableFetch,
) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: 'RequiredError';
constructor(public field: string, msg?: string) {
super(msg);
}
}
/**
*
* @export
* @interface V2beta1Experiment
*/
export interface V2beta1Experiment {
/**
* Output. Unique experiment ID. Generated by API server.
* @type {string}
* @memberof V2beta1Experiment
*/
experiment_id?: string;
/**
* Required input field. Unique experiment name provided by user.
* @type {string}
* @memberof V2beta1Experiment
*/
display_name?: string;
/**
* Optional input field. Describes the purpose of the experiment.
* @type {string}
* @memberof V2beta1Experiment
*/
description?: string;
/**
* Output. The time that the experiment was created.
* @type {Date}
* @memberof V2beta1Experiment
*/
created_at?: Date;
/**
* Optional input field. Specify the namespace this experiment belongs to.
* @type {string}
* @memberof V2beta1Experiment
*/
namespace?: string;
/**
* Output. Specifies whether this experiment is in archived or available state.
* @type {V2beta1ExperimentStorageState}
* @memberof V2beta1Experiment
*/
storage_state?: V2beta1ExperimentStorageState;
}
/**
* Describes whether an entity is available or archived. - STORAGE_STATE_UNSPECIFIED: Default state. This state in not used - AVAILABLE: Entity is available. - ARCHIVED: Entity is archived.
* @export
* @enum {string}
*/
export enum V2beta1ExperimentStorageState {
STORAGESTATEUNSPECIFIED = <any>'STORAGE_STATE_UNSPECIFIED',
AVAILABLE = <any>'AVAILABLE',
ARCHIVED = <any>'ARCHIVED',
}
/**
*
* @export
* @interface V2beta1ListExperimentsResponse
*/
export interface V2beta1ListExperimentsResponse {
/**
* A list of experiments returned.
* @type {Array<V2beta1Experiment>}
* @memberof V2beta1ListExperimentsResponse
*/
experiments?: Array<V2beta1Experiment>;
/**
* The number of experiments for the given query.
* @type {number}
* @memberof V2beta1ListExperimentsResponse
*/
total_size?: number;
/**
* The token to list the next page of experiments.
* @type {string}
* @memberof V2beta1ListExperimentsResponse
*/
next_page_token?: string;
}
/**
* ExperimentServiceApi - fetch parameter creator
* @export
*/
export const ExperimentServiceApiFetchParamCreator = function(configuration?: Configuration) {
return {
/**
*
* @summary Archives an experiment and the experiment's runs and recurring runs.
* @param {string} experiment_id The ID of the experiment to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveExperiment(experiment_id: string, options: any = {}): FetchArgs {
// verify required parameter 'experiment_id' is not null or undefined
if (experiment_id === null || experiment_id === undefined) {
throw new RequiredError(
'experiment_id',
'Required parameter experiment_id was null or undefined when calling archiveExperiment.',
);
}
const localVarPath = `/apis/v2beta1/experiments/{experiment_id}:archive`.replace(
`{${'experiment_id'}}`,
encodeURIComponent(String(experiment_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Creates a new experiment.
* @param {V2beta1Experiment} body The experiment to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createExperiment(body: V2beta1Experiment, options: any = {}): FetchArgs {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError(
'body',
'Required parameter body was null or undefined when calling createExperiment.',
);
}
const localVarPath = `/apis/v2beta1/experiments`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization =
<any>'V2beta1Experiment' !== 'string' ||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Deletes an experiment without deleting the experiment's runs and recurring runs. To avoid unexpected behaviors, delete an experiment's runs and recurring runs before deleting the experiment.
* @param {string} experiment_id The ID of the experiment to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExperiment(experiment_id: string, options: any = {}): FetchArgs {
// verify required parameter 'experiment_id' is not null or undefined
if (experiment_id === null || experiment_id === undefined) {
throw new RequiredError(
'experiment_id',
'Required parameter experiment_id was null or undefined when calling deleteExperiment.',
);
}
const localVarPath = `/apis/v2beta1/experiments/{experiment_id}`.replace(
`{${'experiment_id'}}`,
encodeURIComponent(String(experiment_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds a specific experiment by ID.
* @param {string} experiment_id The ID of the experiment to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExperiment(experiment_id: string, options: any = {}): FetchArgs {
// verify required parameter 'experiment_id' is not null or undefined
if (experiment_id === null || experiment_id === undefined) {
throw new RequiredError(
'experiment_id',
'Required parameter experiment_id was null or undefined when calling getExperiment.',
);
}
const localVarPath = `/apis/v2beta1/experiments/{experiment_id}`.replace(
`{${'experiment_id'}}`,
encodeURIComponent(String(experiment_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiments call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)).
* @param {string} [namespace] Which namespace to filter the experiments on.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listExperiments(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
namespace?: string,
options: any = {},
): FetchArgs {
const localVarPath = `/apis/v2beta1/experiments`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (page_token !== undefined) {
localVarQueryParameter['page_token'] = page_token;
}
if (page_size !== undefined) {
localVarQueryParameter['page_size'] = page_size;
}
if (sort_by !== undefined) {
localVarQueryParameter['sort_by'] = sort_by;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (namespace !== undefined) {
localVarQueryParameter['namespace'] = namespace;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Restores an archived experiment. The experiment's archived runs and recurring runs will stay archived.
* @param {string} experiment_id The ID of the experiment to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
unarchiveExperiment(experiment_id: string, options: any = {}): FetchArgs {
// verify required parameter 'experiment_id' is not null or undefined
if (experiment_id === null || experiment_id === undefined) {
throw new RequiredError(
'experiment_id',
'Required parameter experiment_id was null or undefined when calling unarchiveExperiment.',
);
}
const localVarPath = `/apis/v2beta1/experiments/{experiment_id}:unarchive`.replace(
`{${'experiment_id'}}`,
encodeURIComponent(String(experiment_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* ExperimentServiceApi - functional programming interface
* @export
*/
export const ExperimentServiceApiFp = function(configuration?: Configuration) {
return {
/**
*
* @summary Archives an experiment and the experiment's runs and recurring runs.
* @param {string} experiment_id The ID of the experiment to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveExperiment(
experiment_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
configuration,
).archiveExperiment(experiment_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Creates a new experiment.
* @param {V2beta1Experiment} body The experiment to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createExperiment(
body: V2beta1Experiment,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1Experiment> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
configuration,
).createExperiment(body, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Deletes an experiment without deleting the experiment's runs and recurring runs. To avoid unexpected behaviors, delete an experiment's runs and recurring runs before deleting the experiment.
* @param {string} experiment_id The ID of the experiment to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExperiment(
experiment_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
configuration,
).deleteExperiment(experiment_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds a specific experiment by ID.
* @param {string} experiment_id The ID of the experiment to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExperiment(
experiment_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1Experiment> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(configuration).getExperiment(
experiment_id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiments call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)).
* @param {string} [namespace] Which namespace to filter the experiments on.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listExperiments(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
namespace?: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1ListExperimentsResponse> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
configuration,
).listExperiments(page_token, page_size, sort_by, filter, namespace, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Restores an archived experiment. The experiment's archived runs and recurring runs will stay archived.
* @param {string} experiment_id The ID of the experiment to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
unarchiveExperiment(
experiment_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
configuration,
).unarchiveExperiment(experiment_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
};
};
/**
* ExperimentServiceApi - factory interface
* @export
*/
export const ExperimentServiceApiFactory = function(
configuration?: Configuration,
fetch?: FetchAPI,
basePath?: string,
) {
return {
/**
*
* @summary Archives an experiment and the experiment's runs and recurring runs.
* @param {string} experiment_id The ID of the experiment to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveExperiment(experiment_id: string, options?: any) {
return ExperimentServiceApiFp(configuration).archiveExperiment(experiment_id, options)(
fetch,
basePath,
);
},
/**
*
* @summary Creates a new experiment.
* @param {V2beta1Experiment} body The experiment to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createExperiment(body: V2beta1Experiment, options?: any) {
return ExperimentServiceApiFp(configuration).createExperiment(body, options)(fetch, basePath);
},
/**
*
* @summary Deletes an experiment without deleting the experiment's runs and recurring runs. To avoid unexpected behaviors, delete an experiment's runs and recurring runs before deleting the experiment.
* @param {string} experiment_id The ID of the experiment to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExperiment(experiment_id: string, options?: any) {
return ExperimentServiceApiFp(configuration).deleteExperiment(experiment_id, options)(
fetch,
basePath,
);
},
/**
*
* @summary Finds a specific experiment by ID.
* @param {string} experiment_id The ID of the experiment to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExperiment(experiment_id: string, options?: any) {
return ExperimentServiceApiFp(configuration).getExperiment(experiment_id, options)(
fetch,
basePath,
);
},
/**
*
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiments call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)).
* @param {string} [namespace] Which namespace to filter the experiments on.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listExperiments(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
namespace?: string,
options?: any,
) {
return ExperimentServiceApiFp(configuration).listExperiments(
page_token,
page_size,
sort_by,
filter,
namespace,
options,
)(fetch, basePath);
},
/**
*
* @summary Restores an archived experiment. The experiment's archived runs and recurring runs will stay archived.
* @param {string} experiment_id The ID of the experiment to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
unarchiveExperiment(experiment_id: string, options?: any) {
return ExperimentServiceApiFp(configuration).unarchiveExperiment(experiment_id, options)(
fetch,
basePath,
);
},
};
};
/**
* ExperimentServiceApi - object-oriented interface
* @export
* @class ExperimentServiceApi
* @extends {BaseAPI}
*/
export class ExperimentServiceApi extends BaseAPI {
/**
*
* @summary Archives an experiment and the experiment's runs and recurring runs.
* @param {string} experiment_id The ID of the experiment to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public archiveExperiment(experiment_id: string, options?: any) {
return ExperimentServiceApiFp(this.configuration).archiveExperiment(experiment_id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Creates a new experiment.
* @param {V2beta1Experiment} body The experiment to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public createExperiment(body: V2beta1Experiment, options?: any) {
return ExperimentServiceApiFp(this.configuration).createExperiment(body, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Deletes an experiment without deleting the experiment's runs and recurring runs. To avoid unexpected behaviors, delete an experiment's runs and recurring runs before deleting the experiment.
* @param {string} experiment_id The ID of the experiment to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public deleteExperiment(experiment_id: string, options?: any) {
return ExperimentServiceApiFp(this.configuration).deleteExperiment(experiment_id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Finds a specific experiment by ID.
* @param {string} experiment_id The ID of the experiment to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public getExperiment(experiment_id: string, options?: any) {
return ExperimentServiceApiFp(this.configuration).getExperiment(experiment_id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiments call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)).
* @param {string} [namespace] Which namespace to filter the experiments on.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public listExperiments(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
namespace?: string,
options?: any,
) {
return ExperimentServiceApiFp(this.configuration).listExperiments(
page_token,
page_size,
sort_by,
filter,
namespace,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Restores an archived experiment. The experiment's archived runs and recurring runs will stay archived.
* @param {string} experiment_id The ID of the experiment to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public unarchiveExperiment(experiment_id: string, options?: any) {
return ExperimentServiceApiFp(this.configuration).unarchiveExperiment(experiment_id, options)(
this.fetch,
this.basePath,
);
}
}
| 116 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/experiment/.swagger-codegen-ignore | # Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
| 117 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/experiment/git_push.sh | #!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
git_user_id=$1
git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'
| 118 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/experiment/index.ts | // tslint:disable
/**
* backend/api/v2beta1/experiment.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export * from './api';
export * from './configuration';
| 119 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/experiment/custom.d.ts | declare module 'portable-fetch';
declare module 'url';
| 120 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/experiment/configuration.ts | // tslint:disable
/**
* backend/api/v2beta1/experiment.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => string);
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => string);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
}
}
| 121 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/experiment | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/experiment/.swagger-codegen/VERSION | 2.4.7 | 122 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/pipeline/api.ts | /// <reference path="./custom.d.ts" />
// tslint:disable
/**
* backend/api/v2beta1/pipeline.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import * as url from 'url';
import * as portableFetch from 'portable-fetch';
import { Configuration } from './configuration';
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};
/**
*
* @export
* @interface FetchAPI
*/
export interface FetchAPI {
(url: string, init?: any): Promise<Response>;
}
/**
*
* @export
* @interface FetchArgs
*/
export interface FetchArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration;
constructor(
configuration?: Configuration,
protected basePath: string = BASE_PATH,
protected fetch: FetchAPI = portableFetch,
) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: 'RequiredError';
constructor(public field: string, msg?: string) {
super(msg);
}
}
/**
* The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
* @export
* @interface GooglerpcStatus
*/
export interface GooglerpcStatus {
/**
* The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
* @type {number}
* @memberof GooglerpcStatus
*/
code?: number;
/**
* A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
* @type {string}
* @memberof GooglerpcStatus
*/
message?: string;
/**
* A list of messages that carry the error details. There is a common set of message types for APIs to use.
* @type {Array<ProtobufAny>}
* @memberof GooglerpcStatus
*/
details?: Array<ProtobufAny>;
}
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
* @export
* @interface ProtobufAny
*/
export interface ProtobufAny {
/**
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
* @type {string}
* @memberof ProtobufAny
*/
type_url?: string;
/**
* Must be a valid serialized protocol buffer of the above specified type.
* @type {string}
* @memberof ProtobufAny
*/
value?: string;
}
/**
* `NullValue` is a singleton enumeration to represent the null value for the `Value` type union. The JSON representation for `NullValue` is JSON `null`. - NULL_VALUE: Null value.
* @export
* @enum {string}
*/
export enum ProtobufNullValue {
NULLVALUE = <any>'NULL_VALUE',
}
/**
*
* @export
* @interface V2beta1ListPipelineVersionsResponse
*/
export interface V2beta1ListPipelineVersionsResponse {
/**
* Returned pipeline versions.
* @type {Array<V2beta1PipelineVersion>}
* @memberof V2beta1ListPipelineVersionsResponse
*/
pipeline_versions?: Array<V2beta1PipelineVersion>;
/**
* The token to list the next page of pipeline versions.
* @type {string}
* @memberof V2beta1ListPipelineVersionsResponse
*/
next_page_token?: string;
/**
* The total number of pipeline versions for the given query.
* @type {number}
* @memberof V2beta1ListPipelineVersionsResponse
*/
total_size?: number;
}
/**
*
* @export
* @interface V2beta1ListPipelinesResponse
*/
export interface V2beta1ListPipelinesResponse {
/**
* Returned pipelines.
* @type {Array<V2beta1Pipeline>}
* @memberof V2beta1ListPipelinesResponse
*/
pipelines?: Array<V2beta1Pipeline>;
/**
* The total number of pipelines for the given query.
* @type {number}
* @memberof V2beta1ListPipelinesResponse
*/
total_size?: number;
/**
* The token to list the next page of pipelines. This token can be used on the next ListPipelinesRequest.
* @type {string}
* @memberof V2beta1ListPipelinesResponse
*/
next_page_token?: string;
}
/**
*
* @export
* @interface V2beta1Pipeline
*/
export interface V2beta1Pipeline {
/**
* Output. Unique pipeline ID. Generated by API server.
* @type {string}
* @memberof V2beta1Pipeline
*/
pipeline_id?: string;
/**
* Required input field. Pipeline name provided by user.
* @type {string}
* @memberof V2beta1Pipeline
*/
display_name?: string;
/**
* Optional input field. A short description of the pipeline.
* @type {string}
* @memberof V2beta1Pipeline
*/
description?: string;
/**
* Output. Creation time of the pipeline.
* @type {Date}
* @memberof V2beta1Pipeline
*/
created_at?: Date;
/**
* Input. A namespace this pipeline belongs to. Causes error if user is not authorized to access the specified namespace. If not specified in CreatePipeline, default namespace is used.
* @type {string}
* @memberof V2beta1Pipeline
*/
namespace?: string;
/**
* In case any error happens retrieving a pipeline field, only pipeline ID, and the error message is returned. Client has the flexibility of choosing how to handle the error. This is especially useful during listing call.
* @type {GooglerpcStatus}
* @memberof V2beta1Pipeline
*/
error?: GooglerpcStatus;
}
/**
*
* @export
* @interface V2beta1PipelineVersion
*/
export interface V2beta1PipelineVersion {
/**
* Required input field. Unique ID of the parent pipeline.
* @type {string}
* @memberof V2beta1PipelineVersion
*/
pipeline_id?: string;
/**
* Output. Unique pipeline version ID. Generated by API server.
* @type {string}
* @memberof V2beta1PipelineVersion
*/
pipeline_version_id?: string;
/**
* Required input field. Pipeline version name provided by user.
* @type {string}
* @memberof V2beta1PipelineVersion
*/
display_name?: string;
/**
* Optional input field. Short description of the pipeline version.
* @type {string}
* @memberof V2beta1PipelineVersion
*/
description?: string;
/**
* Output. Creation time of the pipeline version.
* @type {Date}
* @memberof V2beta1PipelineVersion
*/
created_at?: Date;
/**
* Input. Required. The URL to the source of the pipeline version. This is required when creating the pipeine version through CreatePipelineVersion API.
* @type {V2beta1Url}
* @memberof V2beta1PipelineVersion
*/
package_url?: V2beta1Url;
/**
* Input. Optional. The URL to the code source of the pipeline version. The code is usually the Python definition of the pipeline and potentially related the component definitions. This allows users to trace back to how the pipeline YAML was created.
* @type {string}
* @memberof V2beta1PipelineVersion
*/
code_source_url?: string;
/**
* Output. The pipeline spec for the pipeline version.
* @type {any}
* @memberof V2beta1PipelineVersion
*/
pipeline_spec?: any;
/**
* In case any error happens retrieving a pipeline version field, only pipeline ID, pipeline version ID, and the error message are returned. Client has the flexibility of choosing how to handle the error. This is especially useful during List() calls.
* @type {GooglerpcStatus}
* @memberof V2beta1PipelineVersion
*/
error?: GooglerpcStatus;
}
/**
*
* @export
* @interface V2beta1Url
*/
export interface V2beta1Url {
/**
* URL of the pipeline version definition.
* @type {string}
* @memberof V2beta1Url
*/
pipeline_url?: string;
}
/**
* PipelineServiceApi - fetch parameter creator
* @export
*/
export const PipelineServiceApiFetchParamCreator = function(configuration?: Configuration) {
return {
/**
*
* @summary Creates a pipeline.
* @param {V2beta1Pipeline} body Required input. Pipeline that needs to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipeline(body: V2beta1Pipeline, options: any = {}): FetchArgs {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError(
'body',
'Required parameter body was null or undefined when calling createPipeline.',
);
}
const localVarPath = `/apis/v2beta1/pipelines`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization =
<any>'V2beta1Pipeline' !== 'string' ||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Adds a pipeline version to the specified pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {V2beta1PipelineVersion} body Required input. Pipeline version ID to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipelineVersion(
pipeline_id: string,
body: V2beta1PipelineVersion,
options: any = {},
): FetchArgs {
// verify required parameter 'pipeline_id' is not null or undefined
if (pipeline_id === null || pipeline_id === undefined) {
throw new RequiredError(
'pipeline_id',
'Required parameter pipeline_id was null or undefined when calling createPipelineVersion.',
);
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError(
'body',
'Required parameter body was null or undefined when calling createPipelineVersion.',
);
}
const localVarPath = `/apis/v2beta1/pipelines/{pipeline_id}/versions`.replace(
`{${'pipeline_id'}}`,
encodeURIComponent(String(pipeline_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization =
<any>'V2beta1PipelineVersion' !== 'string' ||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Deletes an empty pipeline by ID. Returns error if the pipeline has pipeline versions.
* @param {string} pipeline_id Required input. ID of the pipeline to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipeline(pipeline_id: string, options: any = {}): FetchArgs {
// verify required parameter 'pipeline_id' is not null or undefined
if (pipeline_id === null || pipeline_id === undefined) {
throw new RequiredError(
'pipeline_id',
'Required parameter pipeline_id was null or undefined when calling deletePipeline.',
);
}
const localVarPath = `/apis/v2beta1/pipelines/{pipeline_id}`.replace(
`{${'pipeline_id'}}`,
encodeURIComponent(String(pipeline_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Deletes a specific pipeline version by pipeline version ID and pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} pipeline_version_id Required input. The ID of the pipeline version to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipelineVersion(
pipeline_id: string,
pipeline_version_id: string,
options: any = {},
): FetchArgs {
// verify required parameter 'pipeline_id' is not null or undefined
if (pipeline_id === null || pipeline_id === undefined) {
throw new RequiredError(
'pipeline_id',
'Required parameter pipeline_id was null or undefined when calling deletePipelineVersion.',
);
}
// verify required parameter 'pipeline_version_id' is not null or undefined
if (pipeline_version_id === null || pipeline_version_id === undefined) {
throw new RequiredError(
'pipeline_version_id',
'Required parameter pipeline_version_id was null or undefined when calling deletePipelineVersion.',
);
}
const localVarPath = `/apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}`
.replace(`{${'pipeline_id'}}`, encodeURIComponent(String(pipeline_id)))
.replace(`{${'pipeline_version_id'}}`, encodeURIComponent(String(pipeline_version_id)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds a specific pipeline by ID.
* @param {string} pipeline_id Required input. The ID of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipeline(pipeline_id: string, options: any = {}): FetchArgs {
// verify required parameter 'pipeline_id' is not null or undefined
if (pipeline_id === null || pipeline_id === undefined) {
throw new RequiredError(
'pipeline_id',
'Required parameter pipeline_id was null or undefined when calling getPipeline.',
);
}
const localVarPath = `/apis/v2beta1/pipelines/{pipeline_id}`.replace(
`{${'pipeline_id'}}`,
encodeURIComponent(String(pipeline_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds a specific pipeline by name and namespace.
* @param {string} name Required input. Name of the pipeline to be retrieved.
* @param {string} [namespace] Optional input. Namespace of the pipeline. It could be empty if default namespaces needs to be used or if multi-user support is turned off.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineByName(name: string, namespace?: string, options: any = {}): FetchArgs {
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new RequiredError(
'name',
'Required parameter name was null or undefined when calling getPipelineByName.',
);
}
const localVarPath = `/apis/v2beta1/pipelines/names/{name}`.replace(
`{${'name'}}`,
encodeURIComponent(String(name)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
if (namespace !== undefined) {
localVarQueryParameter['namespace'] = namespace;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Gets a pipeline version by pipeline version ID and pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} pipeline_version_id Required input. ID of the pipeline version to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineVersion(
pipeline_id: string,
pipeline_version_id: string,
options: any = {},
): FetchArgs {
// verify required parameter 'pipeline_id' is not null or undefined
if (pipeline_id === null || pipeline_id === undefined) {
throw new RequiredError(
'pipeline_id',
'Required parameter pipeline_id was null or undefined when calling getPipelineVersion.',
);
}
// verify required parameter 'pipeline_version_id' is not null or undefined
if (pipeline_version_id === null || pipeline_version_id === undefined) {
throw new RequiredError(
'pipeline_version_id',
'Required parameter pipeline_version_id was null or undefined when calling getPipelineVersion.',
);
}
const localVarPath = `/apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}`
.replace(`{${'pipeline_id'}}`, encodeURIComponent(String(pipeline_id)))
.replace(`{${'pipeline_version_id'}}`, encodeURIComponent(String(pipeline_version_id)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Lists all pipeline versions of a given pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} [page_token] A page token to request the results page.
* @param {number} [page_size] The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Sorting order in form of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelineVersions(
pipeline_id: string,
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
options: any = {},
): FetchArgs {
// verify required parameter 'pipeline_id' is not null or undefined
if (pipeline_id === null || pipeline_id === undefined) {
throw new RequiredError(
'pipeline_id',
'Required parameter pipeline_id was null or undefined when calling listPipelineVersions.',
);
}
const localVarPath = `/apis/v2beta1/pipelines/{pipeline_id}/versions`.replace(
`{${'pipeline_id'}}`,
encodeURIComponent(String(pipeline_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
if (page_token !== undefined) {
localVarQueryParameter['page_token'] = page_token;
}
if (page_size !== undefined) {
localVarQueryParameter['page_size'] = page_size;
}
if (sort_by !== undefined) {
localVarQueryParameter['sort_by'] = sort_by;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds all pipelines within a namespace.
* @param {string} [namespace] Optional input. Namespace for the pipelines.
* @param {string} [page_token] A page token to request the results page.
* @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Sorting order in form of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelines(
namespace?: string,
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
options: any = {},
): FetchArgs {
const localVarPath = `/apis/v2beta1/pipelines`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
if (namespace !== undefined) {
localVarQueryParameter['namespace'] = namespace;
}
if (page_token !== undefined) {
localVarQueryParameter['page_token'] = page_token;
}
if (page_size !== undefined) {
localVarQueryParameter['page_size'] = page_size;
}
if (sort_by !== undefined) {
localVarQueryParameter['sort_by'] = sort_by;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* PipelineServiceApi - functional programming interface
* @export
*/
export const PipelineServiceApiFp = function(configuration?: Configuration) {
return {
/**
*
* @summary Creates a pipeline.
* @param {V2beta1Pipeline} body Required input. Pipeline that needs to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipeline(
body: V2beta1Pipeline,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1Pipeline> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(configuration).createPipeline(
body,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Adds a pipeline version to the specified pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {V2beta1PipelineVersion} body Required input. Pipeline version ID to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipelineVersion(
pipeline_id: string,
body: V2beta1PipelineVersion,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1PipelineVersion> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).createPipelineVersion(pipeline_id, body, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Deletes an empty pipeline by ID. Returns error if the pipeline has pipeline versions.
* @param {string} pipeline_id Required input. ID of the pipeline to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipeline(
pipeline_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(configuration).deletePipeline(
pipeline_id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Deletes a specific pipeline version by pipeline version ID and pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} pipeline_version_id Required input. The ID of the pipeline version to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipelineVersion(
pipeline_id: string,
pipeline_version_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).deletePipelineVersion(pipeline_id, pipeline_version_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds a specific pipeline by ID.
* @param {string} pipeline_id Required input. The ID of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipeline(
pipeline_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1Pipeline> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(configuration).getPipeline(
pipeline_id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds a specific pipeline by name and namespace.
* @param {string} name Required input. Name of the pipeline to be retrieved.
* @param {string} [namespace] Optional input. Namespace of the pipeline. It could be empty if default namespaces needs to be used or if multi-user support is turned off.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineByName(
name: string,
namespace?: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1Pipeline> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).getPipelineByName(name, namespace, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Gets a pipeline version by pipeline version ID and pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} pipeline_version_id Required input. ID of the pipeline version to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineVersion(
pipeline_id: string,
pipeline_version_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1PipelineVersion> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).getPipelineVersion(pipeline_id, pipeline_version_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Lists all pipeline versions of a given pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} [page_token] A page token to request the results page.
* @param {number} [page_size] The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Sorting order in form of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelineVersions(
pipeline_id: string,
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1ListPipelineVersionsResponse> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).listPipelineVersions(pipeline_id, page_token, page_size, sort_by, filter, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds all pipelines within a namespace.
* @param {string} [namespace] Optional input. Namespace for the pipelines.
* @param {string} [page_token] A page token to request the results page.
* @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Sorting order in form of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelines(
namespace?: string,
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<V2beta1ListPipelinesResponse> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(configuration).listPipelines(
namespace,
page_token,
page_size,
sort_by,
filter,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
};
};
/**
* PipelineServiceApi - factory interface
* @export
*/
export const PipelineServiceApiFactory = function(
configuration?: Configuration,
fetch?: FetchAPI,
basePath?: string,
) {
return {
/**
*
* @summary Creates a pipeline.
* @param {V2beta1Pipeline} body Required input. Pipeline that needs to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipeline(body: V2beta1Pipeline, options?: any) {
return PipelineServiceApiFp(configuration).createPipeline(body, options)(fetch, basePath);
},
/**
*
* @summary Adds a pipeline version to the specified pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {V2beta1PipelineVersion} body Required input. Pipeline version ID to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipelineVersion(pipeline_id: string, body: V2beta1PipelineVersion, options?: any) {
return PipelineServiceApiFp(configuration).createPipelineVersion(
pipeline_id,
body,
options,
)(fetch, basePath);
},
/**
*
* @summary Deletes an empty pipeline by ID. Returns error if the pipeline has pipeline versions.
* @param {string} pipeline_id Required input. ID of the pipeline to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipeline(pipeline_id: string, options?: any) {
return PipelineServiceApiFp(configuration).deletePipeline(pipeline_id, options)(
fetch,
basePath,
);
},
/**
*
* @summary Deletes a specific pipeline version by pipeline version ID and pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} pipeline_version_id Required input. The ID of the pipeline version to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipelineVersion(pipeline_id: string, pipeline_version_id: string, options?: any) {
return PipelineServiceApiFp(configuration).deletePipelineVersion(
pipeline_id,
pipeline_version_id,
options,
)(fetch, basePath);
},
/**
*
* @summary Finds a specific pipeline by ID.
* @param {string} pipeline_id Required input. The ID of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipeline(pipeline_id: string, options?: any) {
return PipelineServiceApiFp(configuration).getPipeline(pipeline_id, options)(fetch, basePath);
},
/**
*
* @summary Finds a specific pipeline by name and namespace.
* @param {string} name Required input. Name of the pipeline to be retrieved.
* @param {string} [namespace] Optional input. Namespace of the pipeline. It could be empty if default namespaces needs to be used or if multi-user support is turned off.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineByName(name: string, namespace?: string, options?: any) {
return PipelineServiceApiFp(configuration).getPipelineByName(
name,
namespace,
options,
)(fetch, basePath);
},
/**
*
* @summary Gets a pipeline version by pipeline version ID and pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} pipeline_version_id Required input. ID of the pipeline version to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineVersion(pipeline_id: string, pipeline_version_id: string, options?: any) {
return PipelineServiceApiFp(configuration).getPipelineVersion(
pipeline_id,
pipeline_version_id,
options,
)(fetch, basePath);
},
/**
*
* @summary Lists all pipeline versions of a given pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} [page_token] A page token to request the results page.
* @param {number} [page_size] The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Sorting order in form of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelineVersions(
pipeline_id: string,
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
options?: any,
) {
return PipelineServiceApiFp(configuration).listPipelineVersions(
pipeline_id,
page_token,
page_size,
sort_by,
filter,
options,
)(fetch, basePath);
},
/**
*
* @summary Finds all pipelines within a namespace.
* @param {string} [namespace] Optional input. Namespace for the pipelines.
* @param {string} [page_token] A page token to request the results page.
* @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Sorting order in form of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelines(
namespace?: string,
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
options?: any,
) {
return PipelineServiceApiFp(configuration).listPipelines(
namespace,
page_token,
page_size,
sort_by,
filter,
options,
)(fetch, basePath);
},
};
};
/**
* PipelineServiceApi - object-oriented interface
* @export
* @class PipelineServiceApi
* @extends {BaseAPI}
*/
export class PipelineServiceApi extends BaseAPI {
/**
*
* @summary Creates a pipeline.
* @param {V2beta1Pipeline} body Required input. Pipeline that needs to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public createPipeline(body: V2beta1Pipeline, options?: any) {
return PipelineServiceApiFp(this.configuration).createPipeline(body, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Adds a pipeline version to the specified pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {V2beta1PipelineVersion} body Required input. Pipeline version ID to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public createPipelineVersion(pipeline_id: string, body: V2beta1PipelineVersion, options?: any) {
return PipelineServiceApiFp(this.configuration).createPipelineVersion(
pipeline_id,
body,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Deletes an empty pipeline by ID. Returns error if the pipeline has pipeline versions.
* @param {string} pipeline_id Required input. ID of the pipeline to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public deletePipeline(pipeline_id: string, options?: any) {
return PipelineServiceApiFp(this.configuration).deletePipeline(pipeline_id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Deletes a specific pipeline version by pipeline version ID and pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} pipeline_version_id Required input. The ID of the pipeline version to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public deletePipelineVersion(pipeline_id: string, pipeline_version_id: string, options?: any) {
return PipelineServiceApiFp(this.configuration).deletePipelineVersion(
pipeline_id,
pipeline_version_id,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Finds a specific pipeline by ID.
* @param {string} pipeline_id Required input. The ID of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public getPipeline(pipeline_id: string, options?: any) {
return PipelineServiceApiFp(this.configuration).getPipeline(pipeline_id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Finds a specific pipeline by name and namespace.
* @param {string} name Required input. Name of the pipeline to be retrieved.
* @param {string} [namespace] Optional input. Namespace of the pipeline. It could be empty if default namespaces needs to be used or if multi-user support is turned off.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public getPipelineByName(name: string, namespace?: string, options?: any) {
return PipelineServiceApiFp(this.configuration).getPipelineByName(
name,
namespace,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Gets a pipeline version by pipeline version ID and pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} pipeline_version_id Required input. ID of the pipeline version to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public getPipelineVersion(pipeline_id: string, pipeline_version_id: string, options?: any) {
return PipelineServiceApiFp(this.configuration).getPipelineVersion(
pipeline_id,
pipeline_version_id,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Lists all pipeline versions of a given pipeline ID.
* @param {string} pipeline_id Required input. ID of the parent pipeline.
* @param {string} [page_token] A page token to request the results page.
* @param {number} [page_size] The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Sorting order in form of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public listPipelineVersions(
pipeline_id: string,
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
options?: any,
) {
return PipelineServiceApiFp(this.configuration).listPipelineVersions(
pipeline_id,
page_token,
page_size,
sort_by,
filter,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Finds all pipelines within a namespace.
* @param {string} [namespace] Optional input. Namespace for the pipelines.
* @param {string} [page_token] A page token to request the results page.
* @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Sorting order in form of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public listPipelines(
namespace?: string,
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
options?: any,
) {
return PipelineServiceApiFp(this.configuration).listPipelines(
namespace,
page_token,
page_size,
sort_by,
filter,
options,
)(this.fetch, this.basePath);
}
}
| 123 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/pipeline/.swagger-codegen-ignore | # Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
| 124 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/pipeline/git_push.sh | #!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
git_user_id=$1
git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'
| 125 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/pipeline/index.ts | // tslint:disable
/**
* backend/api/v2beta1/pipeline.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export * from './api';
export * from './configuration';
| 126 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/pipeline/custom.d.ts | declare module 'portable-fetch';
declare module 'url';
| 127 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/pipeline/configuration.ts | // tslint:disable
/**
* backend/api/v2beta1/pipeline.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => string);
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => string);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
}
}
| 128 |
0 | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/pipeline | kubeflow_public_repos/pipelines/frontend/src/apisv2beta1/pipeline/.swagger-codegen/VERSION | 2.4.7 | 129 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/icons/kubeflowLogo.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
export default class KubeflowLogo extends React.Component<{
color: string;
style: React.CSSProperties;
}> {
public render(): JSX.Element {
return (
<svg
style={this.props.style}
width='36px'
height='36px'
viewBox='0 0 36 36'
version='1.1'
xmlns='http://www.w3.org/2000/svg'
xmlnsXlink='http://www.w3.org/1999/xlink'
>
<g id='Symbols' stroke='none' strokeWidth='1' fill='none' fillRule='evenodd'>
<g transform='translate(-19.000000, -20.000000)' fill={this.props.color}>
<g id='Group' transform='translate(16.000000, 20.000000)'>
<g id='Group-3' transform='translate(2.000000, 0.000000)'>
<g id='Group-31'>
<path
d='M13.280615,28.2895445 L25.6611429,12.4910476 C25.8744762,12.2190476
26.187619,12.043619 26.5310476,12.004 C26.875619,11.9641905
27.219619,12.063619 27.4893333,12.28 L33.8839688,17.4104681
C34.3147453,17.7560836 34.9441354,17.687047 35.2897509,17.2562705
C35.4883656,17.0087164 35.5576731,16.6815774 35.4765096,16.3747496
L33.6378449,9.42392156 C33.5041843,8.91863559 33.0039542,8.60151087
32.489937,8.69619653 L11.6932298,12.5270996 C11.2025358,12.617489
10.8535518,13.0557544 10.8753433,13.5542281 L11.494463,27.7164017
C11.5185839,28.2681595 11.9854258,28.6958937 12.5371835,28.6717728
C12.8289153,28.6590193 13.1004979,28.5193877 13.280615,28.2895445 Z'
id='Fill-1'
/>
<path
d='M23.7498017,32.7771547 L19.891889,29.5691687 C19.0425842,28.8629428
17.7815773,28.9789311 17.0753514,29.8282359 C17.0566259,29.8507551
17.0383974,29.8736828 17.020679,29.8970026 L13.7939072,34.1438508
C13.4597836,34.5836006 13.5454106,35.2109489 13.9851603,35.5450725
C14.1976017,35.7064863 14.4657379,35.776312 14.7299252,35.7390176
L23.2502146,34.5362384 C23.7970773,34.4590398 24.1778152,33.9531381
24.1006166,33.4062754 C24.0658889,33.1602706 23.9408305,32.9360017
23.7498017,32.7771547 Z'
id='Fill-2'
/>
<path
d='M21.4634549,25.9842193 L27.212891,30.4118587 C27.6364506,30.7380419
28.2416494,30.6733984 28.5867577,30.2651111 L34.4465587,23.3325537
C34.8030826,22.9107609 34.7501716,22.2798106 34.3283788,21.9232867
C34.3167911,21.9134922 34.3049821,21.9039626 34.2929607,21.8947054
L28.4845193,17.4218334 C28.0584482,17.0937314 27.4491884,17.1613382
27.1054127,17.5748667 L21.304617,24.5526566 C20.9515571,24.9773532
21.0096301,25.6078493 21.4343266,25.9609092 C21.4438902,25.9688597
21.4536014,25.9766311 21.4634549,25.9842193 Z'
id='Fill-3'
/>
<path
d='M10.9598921,2.32339463 L4.75822604,5.30992315 C3.66146381,5.83808955
2.86490023,6.83694834 2.59402821,8.02374044 L1.06234161,14.7346349
C0.939449081,15.2730733 1.27631553,15.8091879 1.8147539,15.9320804
C2.18925077,16.0175551 2.57960826,15.8809608 2.81910588,15.5806364
L7.53619048,9.66552381 L12.1756045,3.84785346 C12.5199474,3.41605902
12.4490539,2.78687542 12.0172594,2.44253256 C11.7169385,2.20303583
11.3059768,2.15673107 10.9598921,2.32339463 Z'
id='Fill-4'
/>
<path
d='M8.21352315,30.9427621 L7.69054913,17.8213507 C7.66855444,17.2695041
7.20336415,16.8399743 6.65151754,16.8619689 C6.36136678,16.8735334
6.09057161,17.010649 5.90951901,17.2376757 L1.43617766,22.8469201
C0.854379027,23.5764532 0.854372924,24.6113612 1.43616296,25.3409012
L6.43248567,31.6060776 C6.77683005,32.0378709 7.4060139,32.1087622
7.83780713,31.7644178 C8.0866848,31.565944 8.22620048,31.2608363
8.21352315,30.9427621 Z'
id='Fill-5'
/>
<path
d='M18.3667207,1.33231144 L13.9567062,6.86234847 C13.6123643,7.2941437
13.6832593,7.92332714 14.1150545,8.267669 C14.3414298,8.44819552
14.6349388,8.52174106 14.9196922,8.46928975 L27.7120482,6.11294919
C28.2551955,6.01290195 28.6143991,5.49148974 28.5143518,4.94834244
C28.4565321,4.63444455 28.2523431,4.36700464 27.9647717,4.22852098
L20.7981397,0.777337579 C19.9574387,0.372487253 18.9484977,0.602779078
18.3667207,1.33231144 Z'
id='Fill-6'
/>
</g>
</g>
</g>
</g>
</g>
</svg>
);
}
}
| 130 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/icons/StopCircle.tsx | /*
* Copyright 2021 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
interface StopCircleProps {
colorClass: string;
}
export default function StopCircle({ colorClass }: StopCircleProps) {
return (
<div className={colorClass}>
<svg
xmlns='http://www.w3.org/2000/svg'
enableBackground='new 0 0 24 24'
height='24px'
viewBox='0 0 24 24'
width='24px'
fill='#455A64'
>
<rect fill='none' height='24' width='24' />
<path d='M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M12,20c-4.42,0-8-3.58-8-8s3.58-8,8-8 s8,3.58,8,8S16.42,20,12,20z M16,16H8V8h8V16z' />
</svg>
</div>
);
}
| 131 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/icons/statusCached.tsx | /*
* Copyright 2020 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import SuccessIcon from '@material-ui/icons/CheckCircle';
import CachedIcon from '@material-ui/icons/Cached';
export default class StatusCached extends React.Component<{ style: any }> {
public render(): JSX.Element {
const { style } = this.props;
return (
<div
style={{
display: 'flex',
height: '100%',
flexDirection: 'column',
justifyContent: 'space-between',
}}
>
<SuccessIcon style={{ ...style }} />
<div>
{/* We use this div because parent element has weird padding and this seems to workaround it */}
<CachedIcon style={{ ...style }} />
</div>
</div>
);
}
}
| 132 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/icons/statusTerminated.tsx | /*
* Copyright 2019 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import { CSSProperties } from 'jss/css';
export default class StatusRunning extends React.Component<{ style: CSSProperties }> {
public render(): JSX.Element {
const { style } = this.props;
return (
<svg width={style.width as string} height={style.height as string} viewBox='0 0 18 18'>
<g stroke='none' strokeWidth='1' fill='none' fillRule='evenodd'>
<g transform='translate(-1.000000, -1.000000)'>
<polygon points='0 0 18 0 18 18 0 18' />
<path
d='M8.9925,1.5 C4.8525,1.5 1.5,4.86 1.5,9 C1.5,13.14 4.8525,16.5 8.9925,16.5
C13.14,16.5 16.5,13.14 16.5,9 C16.5,4.86 13.14,1.5 8.9925,1.5 Z M9,15 C5.685,15
3,12.315 3,9 C3,5.685 5.685,3 9,3 C12.315,3 15,5.685 15,9 C15,12.315 12.315,15 9,15 Z'
fill={style.color as string}
fillRule='nonzero'
/>
<polygon fill={style.color as string} fillRule='nonzero' points='6 6 12 6 12 12 6 12' />
</g>
</g>
</svg>
);
}
}
| 133 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/icons/pipelines.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
export default class PipelinesIcon extends React.Component<{ color: string }> {
public render(): JSX.Element {
return (
<svg
width='20px'
height='20px'
viewBox='0 0 20 20'
version='1.1'
xmlns='http://www.w3.org/2000/svg'
xmlnsXlink='http://www.w3.org/1999/xlink'
>
<g id='Symbols' stroke='none' strokeWidth='1' fill='none' fillRule='evenodd'>
<g transform='translate(-2.000000, -4.000000)'>
<polygon id='Shape' points='0 0 24 0 24 24 0 24' />
<path
d='M12.7244079,9.74960425 L17.4807112,9.74960425 C17.7675226,9.74960425
18,9.51894323 18,9.23437272 L18,4.51523153 C18,4.23066102 17.7675226,4
17.4807112,4 L12.7244079,4 C12.4375965,4 12.2051191,4.23066102
12.2051191,4.51523153 L12.2051191,6.06125154 L9.98218019,6.06125154
C9.52936032,6.06125154 9.16225043,6.42549311 9.16225043,6.87477501
L9.16225043,11.2135669 L7.05995053,11.2135669 C6.71661861,10.189612
5.74374462,9.45093267 4.59644424,9.45093267 C3.16249641,9.45093267
2,10.6043462 2,12.0270903 C2,13.4498886 3.16249641,14.603248
4.59644424,14.603248 C5.74379928,14.603248 6.71661861,13.8645687
7.06000519,12.8406138 L9.16225043,12.8406138 L9.16225043,17.1794057
C9.16225043,17.6286875 9.52936032,17.9929291 9.98218019,17.9929291
L12.2051191,17.9929291 L12.2051191,19.4847685 C12.2051191,19.769339
12.4375965,20 12.7244079,20 L17.4807112,20 C17.7675226,20 18,19.769339
18,19.4847685 L18,14.7656273 C18,14.4810568 17.7675226,14.2503957
17.4807112,14.2503957 L12.7244079,14.2503957 C12.4375965,14.2503957
12.2051191,14.4810568 12.2051191,14.7656273 L12.2051191,16.3658822
L10.80211,16.3658822 L10.80211,7.68829848 L12.2051191,7.68829848
L12.2051191,9.23437272 C12.2051191,9.51894323 12.4375965,9.74960425
12.7244079,9.74960425 Z'
id='Path'
fill={this.props.color}
/>
</g>
</g>
</svg>
);
}
}
| 134 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/icons/experiments.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
export default class ExperimentsIcon extends React.Component<{ color: string }> {
public render(): JSX.Element {
return (
<svg width='20' height='20' viewBox='0 0 20 12' xmlns='http://www.w3.org/2000/svg'>
<g id='Symbols' fill='none' fillRule='evenodd'>
<g transform='translate(-26 -72)'>
<g transform='translate(0 12)'>
<g transform='translate(0 44)'>
<g id='Group-3'>
<g transform='translate(26 12)'>
<polygon points='0 0 20 0 20 20 0 20' />
<path
d='M15,5.83333333 L13.825,4.65833333 L8.54166667,9.94166667
L9.71666667,11.1166667 L15,5.83333333 Z M18.5333333,4.65833333
L9.71666667,13.475 L6.23333333,10 L5.05833333,11.175 L9.71666667,15.8333333
L19.7166667,5.83333333 L18.5333333,4.65833333 Z M0.341666667,11.175
L5,15.8333333 L6.175,14.6583333 L1.525,10 L0.341666667,11.175 Z'
fill={this.props.color}
fillRule='nonzero'
/>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
);
}
}
| 135 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/icons/statusRunning.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import { CSSProperties } from 'jss/css';
export default class StatusRunning extends React.Component<{ style: CSSProperties }> {
public render(): JSX.Element {
const { style } = this.props;
return (
<svg width={style.width as string} height={style.height as string} viewBox='0 0 18 18'>
<g transform='translate(-450, -307)' fill={style.color as string} fillRule='nonzero'>
<g transform='translate(450, 266)'>
<g transform='translate(0, 41)'>
<path
d='M9,4 C6.23857143,4 4,6.23857143 4,9 C4,11.7614286 6.23857143,14 9,14
C11.7614286,14 14,11.7614286 14,9 C14,8.40214643 13.8950716,7.8288007
13.702626,7.29737398 L15.2180703,5.78192967 C15.7177126,6.74539838
16,7.83973264 16,9 C16,12.866 12.866,16 9,16 C5.134,16 2,12.866 2,9 C2,5.134
5.134,2 9,2 C10.933,2 12.683,2.7835 13.94975,4.05025 L12.7677679,5.23223214
L9,9 L9,4 Z'
/>
</g>
</g>
</g>
</svg>
);
}
}
| 136 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/config/sample_config_from_backend.json | [
"[Tutorial] Data passing in python components",
"[Tutorial] DSL - Control structures"
]
| 137 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/__serializers__/mock-function.js | /**
* Copyright 2021 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = {
test(val) {
return val && !!val._isMockFunction;
},
print(val) {
return '[MockFunction]';
},
};
| 138 |
0 | kubeflow_public_repos/pipelines/frontend/src/data | kubeflow_public_repos/pipelines/frontend/src/data/test/create_mount_delete_dynamic_pvc.yaml | # PIPELINE DEFINITION
# Name: my-pipeline
components:
comp-consumer:
executorLabel: exec-consumer
outputDefinitions:
parameters:
Output:
parameterType: STRING
comp-createpvc:
executorLabel: exec-createpvc
inputDefinitions:
parameters:
access_modes:
parameterType: LIST
annotations:
isOptional: true
parameterType: STRUCT
pvc_name:
isOptional: true
parameterType: STRING
pvc_name_suffix:
isOptional: true
parameterType: STRING
size:
parameterType: STRING
storage_class_name:
defaultValue: ''
isOptional: true
parameterType: STRING
volume_name:
isOptional: true
parameterType: STRING
outputDefinitions:
parameters:
name:
parameterType: STRING
comp-deletepvc:
executorLabel: exec-deletepvc
inputDefinitions:
parameters:
pvc_name:
parameterType: STRING
comp-producer:
executorLabel: exec-producer
outputDefinitions:
parameters:
Output:
parameterType: STRING
deploymentSpec:
executors:
exec-consumer:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- consumer
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef consumer() -> str:\n with open('/data/file.txt', 'r') as file:\n\
\ content = file.read()\n print(content)\n return content\n\
\n"
image: python:3.9
exec-createpvc:
container:
image: argostub/createpvc
exec-deletepvc:
container:
image: argostub/deletepvc
exec-producer:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- producer
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef producer() -> str:\n with open('/data/file.txt', 'w') as file:\n\
\ file.write('Hello world')\n with open('/data/file.txt', 'r')\
\ as file:\n content = file.read()\n print(content)\n return\
\ content\n\n"
image: python:3.9
pipelineInfo:
name: my-pipeline
root:
dag:
tasks:
consumer:
cachingOptions:
enableCache: true
componentRef:
name: comp-consumer
dependentTasks:
- createpvc
- producer
taskInfo:
name: consumer
createpvc:
cachingOptions:
enableCache: true
componentRef:
name: comp-createpvc
inputs:
parameters:
access_modes:
runtimeValue:
constant:
- ReadWriteOnce
pvc_name_suffix:
runtimeValue:
constant: -my-pvc
size:
runtimeValue:
constant: 5Mi
storage_class_name:
runtimeValue:
constant: standard
taskInfo:
name: createpvc
deletepvc:
cachingOptions:
enableCache: true
componentRef:
name: comp-deletepvc
dependentTasks:
- consumer
- createpvc
inputs:
parameters:
pvc_name:
taskOutputParameter:
outputParameterKey: name
producerTask: createpvc
taskInfo:
name: deletepvc
producer:
cachingOptions:
enableCache: true
componentRef:
name: comp-producer
dependentTasks:
- createpvc
taskInfo:
name: producer
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.16
---
platforms:
kubernetes:
deploymentSpec:
executors:
exec-consumer:
pvcMount:
- mountPath: /data
taskOutputParameter:
outputParameterKey: name
producerTask: createpvc
exec-producer:
pvcMount:
- mountPath: /data
taskOutputParameter:
outputParameterKey: name
producerTask: createpvc
| 139 |
0 | kubeflow_public_repos/pipelines/frontend/src/data | kubeflow_public_repos/pipelines/frontend/src/data/test/pipeline_with_loops_and_conditions.yaml | components:
comp-args-generator-op:
executorLabel: exec-args-generator-op
outputDefinitions:
parameters:
Output:
parameterType: LIST
comp-args-generator-op-2:
executorLabel: exec-args-generator-op-2
outputDefinitions:
parameters:
Output:
parameterType: LIST
comp-condition-1:
dag:
tasks:
args-generator-op-2:
cachingOptions:
enableCache: true
componentRef:
name: comp-args-generator-op-2
taskInfo:
name: args-generator-op-2
for-loop-2:
componentRef:
name: comp-for-loop-2
dependentTasks:
- args-generator-op-2
inputs:
parameters:
pipelinechannel--args-generator-op-2-Output:
taskOutputParameter:
outputParameterKey: Output
producerTask: args-generator-op-2
pipelinechannel--args-generator-op-Output:
componentInputParameter: pipelinechannel--args-generator-op-Output
pipelinechannel--flip-coin-op-Output:
componentInputParameter: pipelinechannel--flip-coin-op-Output
pipelinechannel--loop_parameter:
componentInputParameter: pipelinechannel--loop_parameter
pipelinechannel--msg:
componentInputParameter: pipelinechannel--msg
parameterIterator:
itemInput: pipelinechannel--args-generator-op-Output-loop-item
items:
inputParameter: pipelinechannel--args-generator-op-Output
taskInfo:
name: for-loop-2
inputDefinitions:
parameters:
pipelinechannel--args-generator-op-Output:
parameterType: LIST
pipelinechannel--flip-coin-op-Output:
parameterType: STRING
pipelinechannel--loop_parameter:
parameterType: LIST
pipelinechannel--msg:
parameterType: STRING
comp-condition-13:
dag:
tasks:
print-text-8:
cachingOptions:
enableCache: true
componentRef:
name: comp-print-text-8
inputs:
parameters:
msg:
runtimeValue:
constant: '1'
taskInfo:
name: print-text-8
inputDefinitions:
parameters:
pipelinechannel--flip-coin-op-Output:
parameterType: STRING
pipelinechannel--loop-item-param-11:
parameterType: STRING
comp-condition-15:
dag:
tasks:
for-loop-16:
componentRef:
name: comp-for-loop-16
inputs:
parameters:
pipelinechannel--loop_parameter-loop-item:
componentInputParameter: pipelinechannel--loop_parameter-loop-item
pipelinechannel--loop_parameter-loop-item-subvar-B_b:
componentInputParameter: pipelinechannel--loop_parameter-loop-item
parameterExpressionSelector: parseJson(string_value)["B_b"]
parameterIterator:
itemInput: pipelinechannel--loop_parameter-loop-item-subvar-B_b-loop-item
items:
inputParameter: pipelinechannel--loop_parameter-loop-item-subvar-B_b
taskInfo:
name: for-loop-16
inputDefinitions:
parameters:
pipelinechannel--loop_parameter-loop-item:
parameterType: STRING
pipelinechannel--loop_parameter-loop-item-subvar-A_a:
parameterType: STRING
comp-condition-3:
dag:
tasks:
print-text-2:
cachingOptions:
enableCache: true
componentRef:
name: comp-print-text-2
inputs:
parameters:
msg:
componentInputParameter: pipelinechannel--args-generator-op-Output-loop-item
parameterExpressionSelector: parseJson(string_value)["B_b"]
taskInfo:
name: print-text-2
inputDefinitions:
parameters:
pipelinechannel--args-generator-op-Output-loop-item:
parameterType: STRING
pipelinechannel--args-generator-op-Output-loop-item-subvar-A_a:
parameterType: STRING
pipelinechannel--flip-coin-op-Output:
parameterType: STRING
comp-condition-4:
dag:
tasks:
print-text-3:
cachingOptions:
enableCache: true
componentRef:
name: comp-print-text-3
inputs:
parameters:
msg:
componentInputParameter: pipelinechannel--args-generator-op-Output-loop-item
parameterExpressionSelector: parseJson(string_value)["B_b"]
taskInfo:
name: print-text-3
inputDefinitions:
parameters:
pipelinechannel--args-generator-op-Output-loop-item:
parameterType: STRING
pipelinechannel--flip-coin-op-Output:
parameterType: STRING
comp-condition-5:
dag:
tasks:
for-loop-7:
componentRef:
name: comp-for-loop-7
inputs:
parameters:
pipelinechannel--args-generator-op-Output-loop-item:
componentInputParameter: pipelinechannel--args-generator-op-Output-loop-item
pipelinechannel--flip-coin-op-Output:
componentInputParameter: pipelinechannel--flip-coin-op-Output
parameterIterator:
itemInput: pipelinechannel--loop-item-param-6
items:
raw: '[{"a": "-1"}, {"a": "-2"}]'
taskInfo:
name: for-loop-7
inputDefinitions:
parameters:
pipelinechannel--args-generator-op-Output-loop-item:
parameterType: STRING
pipelinechannel--args-generator-op-Output-loop-item-subvar-A_a:
parameterType: STRING
pipelinechannel--flip-coin-op-Output:
parameterType: STRING
comp-flip-coin-op:
executorLabel: exec-flip-coin-op
outputDefinitions:
parameters:
Output:
parameterType: STRING
comp-for-loop-10:
dag:
tasks:
print-text-6:
cachingOptions:
enableCache: true
componentRef:
name: comp-print-text-6
inputs:
parameters:
msg:
componentInputParameter: pipelinechannel--loop_parameter-loop-item
msg2:
componentInputParameter: pipelinechannel--args-generator-op-2-Output-loop-item
parameterExpressionSelector: parseJson(string_value)["A_a"]
taskInfo:
name: print-text-6
inputDefinitions:
parameters:
pipelinechannel--args-generator-op-2-Output:
parameterType: LIST
pipelinechannel--args-generator-op-2-Output-loop-item:
parameterType: STRING
pipelinechannel--flip-coin-op-Output:
parameterType: STRING
pipelinechannel--loop_parameter-loop-item:
parameterType: STRING
comp-for-loop-12:
dag:
tasks:
condition-13:
componentRef:
name: comp-condition-13
inputs:
parameters:
pipelinechannel--flip-coin-op-Output:
componentInputParameter: pipelinechannel--flip-coin-op-Output
pipelinechannel--loop-item-param-11:
componentInputParameter: pipelinechannel--loop-item-param-11
taskInfo:
name: condition-13
triggerPolicy:
condition: inputs.parameter_values['pipelinechannel--loop-item-param-11']
== '1'
print-text-7:
cachingOptions:
enableCache: true
componentRef:
name: comp-print-text-7
inputs:
parameters:
msg:
componentInputParameter: pipelinechannel--loop-item-param-11
taskInfo:
name: print-text-7
inputDefinitions:
parameters:
pipelinechannel--flip-coin-op-Output:
parameterType: STRING
pipelinechannel--loop-item-param-11:
parameterType: STRING
comp-for-loop-14:
dag:
tasks:
condition-15:
componentRef:
name: comp-condition-15
inputs:
parameters:
pipelinechannel--loop_parameter-loop-item:
componentInputParameter: pipelinechannel--loop_parameter-loop-item
pipelinechannel--loop_parameter-loop-item-subvar-A_a:
componentInputParameter: pipelinechannel--loop_parameter-loop-item
parameterExpressionSelector: parseJson(string_value)["A_a"]
taskInfo:
name: condition-15
triggerPolicy:
condition: inputs.parameter_values['pipelinechannel--loop_parameter-loop-item-subvar-A_a']
== 'heads'
inputDefinitions:
parameters:
pipelinechannel--loop_parameter:
parameterType: LIST
pipelinechannel--loop_parameter-loop-item:
parameterType: STRING
comp-for-loop-16:
dag:
tasks:
print-text-9:
cachingOptions:
enableCache: true
componentRef:
name: comp-print-text-9
inputs:
parameters:
msg:
componentInputParameter: pipelinechannel--loop_parameter-loop-item-subvar-B_b-loop-item
taskInfo:
name: print-text-9
inputDefinitions:
parameters:
pipelinechannel--loop_parameter-loop-item:
parameterType: STRING
pipelinechannel--loop_parameter-loop-item-subvar-B_b:
parameterType: STRING
pipelinechannel--loop_parameter-loop-item-subvar-B_b-loop-item:
parameterType: STRING
comp-for-loop-2:
dag:
tasks:
condition-3:
componentRef:
name: comp-condition-3
inputs:
parameters:
pipelinechannel--args-generator-op-Output-loop-item:
componentInputParameter: pipelinechannel--args-generator-op-Output-loop-item
pipelinechannel--args-generator-op-Output-loop-item-subvar-A_a:
componentInputParameter: pipelinechannel--args-generator-op-Output-loop-item
parameterExpressionSelector: parseJson(string_value)["A_a"]
pipelinechannel--flip-coin-op-Output:
componentInputParameter: pipelinechannel--flip-coin-op-Output
taskInfo:
name: condition-3
triggerPolicy:
condition: inputs.parameter_values['pipelinechannel--args-generator-op-Output-loop-item-subvar-A_a']
== 'heads'
condition-4:
componentRef:
name: comp-condition-4
inputs:
parameters:
pipelinechannel--args-generator-op-Output-loop-item:
componentInputParameter: pipelinechannel--args-generator-op-Output-loop-item
pipelinechannel--flip-coin-op-Output:
componentInputParameter: pipelinechannel--flip-coin-op-Output
taskInfo:
name: condition-4
triggerPolicy:
condition: inputs.parameter_values['pipelinechannel--flip-coin-op-Output']
== 'heads'
condition-5:
componentRef:
name: comp-condition-5
inputs:
parameters:
pipelinechannel--args-generator-op-Output-loop-item:
componentInputParameter: pipelinechannel--args-generator-op-Output-loop-item
pipelinechannel--args-generator-op-Output-loop-item-subvar-A_a:
componentInputParameter: pipelinechannel--args-generator-op-Output-loop-item
parameterExpressionSelector: parseJson(string_value)["A_a"]
pipelinechannel--flip-coin-op-Output:
componentInputParameter: pipelinechannel--flip-coin-op-Output
taskInfo:
name: condition-5
triggerPolicy:
condition: inputs.parameter_values['pipelinechannel--args-generator-op-Output-loop-item-subvar-A_a']
== 'tails'
for-loop-12:
componentRef:
name: comp-for-loop-12
inputs:
parameters:
pipelinechannel--flip-coin-op-Output:
componentInputParameter: pipelinechannel--flip-coin-op-Output
parameterIterator:
itemInput: pipelinechannel--loop-item-param-11
items:
raw: '["1", "2"]'
taskInfo:
name: for-loop-12
for-loop-8:
componentRef:
name: comp-for-loop-8
inputs:
parameters:
pipelinechannel--args-generator-op-Output-loop-item:
componentInputParameter: pipelinechannel--args-generator-op-Output-loop-item
pipelinechannel--args-generator-op-Output-loop-item-subvar-B_b:
componentInputParameter: pipelinechannel--args-generator-op-Output-loop-item
parameterExpressionSelector: parseJson(string_value)["B_b"]
pipelinechannel--flip-coin-op-Output:
componentInputParameter: pipelinechannel--flip-coin-op-Output
parameterIterator:
itemInput: pipelinechannel--args-generator-op-Output-loop-item-subvar-B_b-loop-item
items:
inputParameter: pipelinechannel--args-generator-op-Output-loop-item-subvar-B_b
taskInfo:
name: for-loop-8
for-loop-9:
componentRef:
name: comp-for-loop-9
inputs:
parameters:
pipelinechannel--args-generator-op-2-Output:
componentInputParameter: pipelinechannel--args-generator-op-2-Output
pipelinechannel--flip-coin-op-Output:
componentInputParameter: pipelinechannel--flip-coin-op-Output
pipelinechannel--loop_parameter:
componentInputParameter: pipelinechannel--loop_parameter
parameterIterator:
itemInput: pipelinechannel--loop_parameter-loop-item
items:
inputParameter: pipelinechannel--loop_parameter
taskInfo:
name: for-loop-9
print-text:
cachingOptions:
enableCache: true
componentRef:
name: comp-print-text
inputs:
parameters:
msg:
componentInputParameter: pipelinechannel--msg
taskInfo:
name: print-text
inputDefinitions:
parameters:
pipelinechannel--args-generator-op-2-Output:
parameterType: LIST
pipelinechannel--args-generator-op-Output:
parameterType: LIST
pipelinechannel--args-generator-op-Output-loop-item:
parameterType: STRING
pipelinechannel--flip-coin-op-Output:
parameterType: STRING
pipelinechannel--loop_parameter:
parameterType: LIST
pipelinechannel--msg:
parameterType: STRING
comp-for-loop-7:
dag:
tasks:
print-struct:
cachingOptions:
enableCache: true
componentRef:
name: comp-print-struct
inputs:
parameters:
struct:
componentInputParameter: pipelinechannel--loop-item-param-6
taskInfo:
name: print-struct
inputDefinitions:
parameters:
pipelinechannel--args-generator-op-Output-loop-item:
parameterType: STRING
pipelinechannel--flip-coin-op-Output:
parameterType: STRING
pipelinechannel--loop-item-param-6:
parameterType: STRUCT
comp-for-loop-8:
dag:
tasks:
print-text-4:
cachingOptions:
enableCache: true
componentRef:
name: comp-print-text-4
inputs:
parameters:
msg:
componentInputParameter: pipelinechannel--args-generator-op-Output-loop-item-subvar-B_b-loop-item
taskInfo:
name: print-text-4
inputDefinitions:
parameters:
pipelinechannel--args-generator-op-Output-loop-item:
parameterType: STRING
pipelinechannel--args-generator-op-Output-loop-item-subvar-B_b:
parameterType: STRING
pipelinechannel--args-generator-op-Output-loop-item-subvar-B_b-loop-item:
parameterType: STRING
pipelinechannel--flip-coin-op-Output:
parameterType: STRING
comp-for-loop-9:
dag:
tasks:
for-loop-10:
componentRef:
name: comp-for-loop-10
inputs:
parameters:
pipelinechannel--args-generator-op-2-Output:
componentInputParameter: pipelinechannel--args-generator-op-2-Output
pipelinechannel--flip-coin-op-Output:
componentInputParameter: pipelinechannel--flip-coin-op-Output
pipelinechannel--loop_parameter-loop-item:
componentInputParameter: pipelinechannel--loop_parameter-loop-item
parameterIterator:
itemInput: pipelinechannel--args-generator-op-2-Output-loop-item
items:
inputParameter: pipelinechannel--args-generator-op-2-Output
taskInfo:
name: for-loop-10
print-text-5:
cachingOptions:
enableCache: true
componentRef:
name: comp-print-text-5
inputs:
parameters:
msg:
componentInputParameter: pipelinechannel--loop_parameter-loop-item
taskInfo:
name: print-text-5
inputDefinitions:
parameters:
pipelinechannel--args-generator-op-2-Output:
parameterType: LIST
pipelinechannel--flip-coin-op-Output:
parameterType: STRING
pipelinechannel--loop_parameter:
parameterType: LIST
pipelinechannel--loop_parameter-loop-item:
parameterType: STRING
comp-print-struct:
executorLabel: exec-print-struct
inputDefinitions:
parameters:
struct:
parameterType: STRUCT
comp-print-text:
executorLabel: exec-print-text
inputDefinitions:
parameters:
msg:
parameterType: STRING
comp-print-text-2:
executorLabel: exec-print-text-2
inputDefinitions:
parameters:
msg:
parameterType: STRING
comp-print-text-3:
executorLabel: exec-print-text-3
inputDefinitions:
parameters:
msg:
parameterType: STRING
comp-print-text-4:
executorLabel: exec-print-text-4
inputDefinitions:
parameters:
msg:
parameterType: STRING
comp-print-text-5:
executorLabel: exec-print-text-5
inputDefinitions:
parameters:
msg:
parameterType: STRING
comp-print-text-6:
executorLabel: exec-print-text-6
inputDefinitions:
parameters:
msg:
parameterType: STRING
msg2:
parameterType: STRING
comp-print-text-7:
executorLabel: exec-print-text-7
inputDefinitions:
parameters:
msg:
parameterType: STRING
comp-print-text-8:
executorLabel: exec-print-text-8
inputDefinitions:
parameters:
msg:
parameterType: STRING
comp-print-text-9:
executorLabel: exec-print-text-9
inputDefinitions:
parameters:
msg:
parameterType: STRING
deploymentSpec:
executors:
exec-args-generator-op:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- args_generator_op
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef args_generator_op() -> list:\n return [\n {\n \
\ 'A_a': '1',\n 'B_b': ['2', '20'],\n },\n \
\ {\n 'A_a': '10',\n 'B_b': ['22', '222'],\n \
\ },\n ]\n\n"
image: python:3.9
exec-args-generator-op-2:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- args_generator_op
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef args_generator_op() -> list:\n return [\n {\n \
\ 'A_a': '1',\n 'B_b': ['2', '20'],\n },\n \
\ {\n 'A_a': '10',\n 'B_b': ['22', '222'],\n \
\ },\n ]\n\n"
image: python:3.9
exec-flip-coin-op:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- flip_coin_op
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef flip_coin_op() -> str:\n \"\"\"Flip a coin and output heads\
\ or tails randomly.\"\"\"\n import random\n result = 'heads' if random.randint(0,\
\ 1) == 0 else 'tails'\n return result\n\n"
image: python:3.9
exec-print-struct:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- print_struct
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef print_struct(struct: dict):\n print(struct)\n\n"
image: python:3.9
exec-print-text:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- print_text
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef print_text(msg: str, msg2: Optional[str] = None):\n print(f'msg:\
\ {msg}, msg2: {msg2}')\n\n"
image: python:3.9
exec-print-text-2:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- print_text
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef print_text(msg: str, msg2: Optional[str] = None):\n print(f'msg:\
\ {msg}, msg2: {msg2}')\n\n"
image: python:3.9
exec-print-text-3:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- print_text
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef print_text(msg: str, msg2: Optional[str] = None):\n print(f'msg:\
\ {msg}, msg2: {msg2}')\n\n"
image: python:3.9
exec-print-text-4:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- print_text
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef print_text(msg: str, msg2: Optional[str] = None):\n print(f'msg:\
\ {msg}, msg2: {msg2}')\n\n"
image: python:3.9
exec-print-text-5:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- print_text
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef print_text(msg: str, msg2: Optional[str] = None):\n print(f'msg:\
\ {msg}, msg2: {msg2}')\n\n"
image: python:3.9
exec-print-text-6:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- print_text
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef print_text(msg: str, msg2: Optional[str] = None):\n print(f'msg:\
\ {msg}, msg2: {msg2}')\n\n"
image: python:3.9
exec-print-text-7:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- print_text
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef print_text(msg: str, msg2: Optional[str] = None):\n print(f'msg:\
\ {msg}, msg2: {msg2}')\n\n"
image: python:3.9
exec-print-text-8:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- print_text
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef print_text(msg: str, msg2: Optional[str] = None):\n print(f'msg:\
\ {msg}, msg2: {msg2}')\n\n"
image: python:3.9
exec-print-text-9:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- print_text
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.16'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef print_text(msg: str, msg2: Optional[str] = None):\n print(f'msg:\
\ {msg}, msg2: {msg2}')\n\n"
image: python:3.9
pipelineInfo:
name: pipeline-with-loops-and-conditions-multi-layers
root:
dag:
tasks:
args-generator-op:
cachingOptions:
enableCache: true
componentRef:
name: comp-args-generator-op
taskInfo:
name: args-generator-op
condition-1:
componentRef:
name: comp-condition-1
dependentTasks:
- args-generator-op
- flip-coin-op
inputs:
parameters:
pipelinechannel--args-generator-op-Output:
taskOutputParameter:
outputParameterKey: Output
producerTask: args-generator-op
pipelinechannel--flip-coin-op-Output:
taskOutputParameter:
outputParameterKey: Output
producerTask: flip-coin-op
pipelinechannel--loop_parameter:
componentInputParameter: loop_parameter
pipelinechannel--msg:
componentInputParameter: msg
taskInfo:
name: condition-1
triggerPolicy:
condition: inputs.parameter_values['pipelinechannel--flip-coin-op-Output']
!= 'no-such-result'
flip-coin-op:
cachingOptions:
enableCache: true
componentRef:
name: comp-flip-coin-op
taskInfo:
name: flip-coin-op
for-loop-14:
componentRef:
name: comp-for-loop-14
inputs:
parameters:
pipelinechannel--loop_parameter:
componentInputParameter: loop_parameter
parameterIterator:
itemInput: pipelinechannel--loop_parameter-loop-item
items:
inputParameter: pipelinechannel--loop_parameter
taskInfo:
name: for-loop-14
inputDefinitions:
parameters:
loop_parameter:
defaultValue:
- A_a: heads
B_b:
- A
- B
- A_a: tails
B_b:
- X
- Y
- Z
parameterType: LIST
msg:
defaultValue: hello
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.16
| 140 |
0 | kubeflow_public_repos/pipelines/frontend/src/data | kubeflow_public_repos/pipelines/frontend/src/data/test/lightweight_python_functions_v2_pipeline_rev.yaml | pipelineInfo:
name: my-test-pipeline-beta
sdkVersion: kfp-2.0.0-beta.16
schemaVersion: 2.1.0
deploymentSpec:
executors:
exec-preprocess:
container:
image: python:3.9
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- preprocess
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-alpha.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef preprocess(\n # An input parameter of type string.\n message:\
\ str,\n # An input parameter of type dict.\n input_dict_parameter:\
\ Dict[str, int],\n # An input parameter of type list.\n input_list_parameter:\
\ List[str],\n # Use Output[T] to get a metadata-rich handle to the output\
\ artifact\n # of type `Dataset`.\n output_dataset_one: Output[Dataset],\n\
\ # A locally accessible filepath for another output artifact of type\n\
\ # `Dataset`.\n output_dataset_two_path: OutputPath('Dataset'),\n\
\ # A locally accessible filepath for an output parameter of type string.\n\
\ output_parameter_path: OutputPath(str),\n # A locally accessible\
\ filepath for an output parameter of type bool.\n output_bool_parameter_path:\
\ OutputPath(bool),\n # A locally accessible filepath for an output parameter\
\ of type dict.\n output_dict_parameter_path: OutputPath(Dict[str, int]),\n\
\ # A locally accessible filepath for an output parameter of type list.\n\
\ output_list_parameter_path: OutputPath(List[str]),\n):\n \"\"\"\
Dummy preprocessing step.\"\"\"\n\n # Use Dataset.path to access a local\
\ file path for writing.\n # One can also use Dataset.uri to access the\
\ actual URI file path.\n with open(output_dataset_one.path, 'w') as\
\ f:\n f.write(message)\n\n # OutputPath is used to just pass\
\ the local file path of the output artifact\n # to the function.\n \
\ with open(output_dataset_two_path, 'w') as f:\n f.write(message)\n\
\n with open(output_parameter_path, 'w') as f:\n f.write(message)\n\
\n with open(output_bool_parameter_path, 'w') as f:\n f.write(\n\
\ str(True)) # use either `str()` or `json.dumps()` for bool\
\ values.\n\n import json\n with open(output_dict_parameter_path,\
\ 'w') as f:\n f.write(json.dumps(input_dict_parameter))\n\n with\
\ open(output_list_parameter_path, 'w') as f:\n f.write(json.dumps(input_list_parameter))\n\
\n"
exec-train:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- train
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-alpha.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef train(\n # Use InputPath to get a locally accessible path\
\ for the input artifact\n # of type `Dataset`.\n dataset_one_path:\
\ InputPath('Dataset'),\n # Use Input[T] to get a metadata-rich handle\
\ to the input artifact\n # of type `Dataset`.\n dataset_two: Input[Dataset],\n\
\ # An input parameter of type string.\n message: str,\n # Use\
\ Output[T] to get a metadata-rich handle to the output artifact\n #\
\ of type `Dataset`.\n model: Output[Model],\n # An input parameter\
\ of type bool.\n input_bool: bool,\n # An input parameter of type\
\ dict.\n input_dict: Dict[str, int],\n # An input parameter of type\
\ List[str].\n input_list: List[str],\n # An input parameter of type\
\ int with a default value.\n num_steps: int = 100,\n):\n \"\"\"Dummy\
\ Training step.\"\"\"\n with open(dataset_one_path, 'r') as input_file:\n\
\ dataset_one_contents = input_file.read()\n\n with open(dataset_two.path,\
\ 'r') as input_file:\n dataset_two_contents = input_file.read()\n\
\n line = (f'dataset_one_contents: {dataset_one_contents} || '\n \
\ f'dataset_two_contents: {dataset_two_contents} || '\n \
\ f'message: {message} || '\n f'input_bool: {input_bool}, type\
\ {type(input_bool)} || '\n f'input_dict: {input_dict}, type\
\ {type(input_dict)} || '\n f'input_list: {input_list}, type\
\ {type(input_list)} \\n')\n\n with open(model.path, 'w') as output_file:\n\
\ for i in range(num_steps):\n output_file.write('Step\
\ {}\\n{}\\n=====\\n'.format(i, line))\n\n # model is an instance of\
\ Model artifact, which has a .metadata dictionary\n # to store arbitrary\
\ metadata for the output artifact.\n model.metadata['accuracy'] = 0.9\n\
\n"
image: python:3.9
components:
comp-preprocess:
inputDefinitions:
parameters:
input_dict_parameter:
parameterType: STRUCT
message:
parameterType: STRING
input_list_parameter:
parameterType: LIST
outputDefinitions:
artifacts:
output_dataset_two_path:
artifactType:
schemaTitle: system.Dataset
schemaVersion: 0.0.1
output_dataset_one:
artifactType:
schemaTitle: system.Dataset
schemaVersion: 0.0.1
parameters:
output_bool_parameter_path:
parameterType: BOOLEAN
output_list_parameter_path:
parameterType: LIST
output_parameter_path:
parameterType: STRING
output_dict_parameter_path:
parameterType: STRUCT
executorLabel: exec-preprocess
comp-train:
inputDefinitions:
artifacts:
dataset_one_path:
artifactType:
schemaTitle: system.Dataset
schemaVersion: 0.0.1
dataset_two:
artifactType:
schemaTitle: system.Dataset
schemaVersion: 0.0.1
parameters:
input_bool:
parameterType: BOOLEAN
message:
parameterType: STRING
input_dict:
parameterType: STRUCT
num_steps:
parameterType: NUMBER_INTEGER
defaultValue: 100.0
input_list:
parameterType: LIST
outputDefinitions:
artifacts:
model:
artifactType:
schemaTitle: system.Model
schemaVersion: 0.0.1
executorLabel: exec-train
root:
inputDefinitions:
parameters:
message:
parameterType: STRING
input_dict:
parameterType: STRUCT
defaultValue:
A: 1.0
B: 2.0
dag:
tasks:
train:
taskInfo:
name: train
inputs:
parameters:
input_list:
taskOutputParameter:
producerTask: preprocess
outputParameterKey: output_list_parameter_path
message:
taskOutputParameter:
producerTask: preprocess
outputParameterKey: output_parameter_path
input_bool:
taskOutputParameter:
producerTask: preprocess
outputParameterKey: output_bool_parameter_path
input_dict:
taskOutputParameter:
producerTask: preprocess
outputParameterKey: output_dict_parameter_path
artifacts:
dataset_two:
taskOutputArtifact:
producerTask: preprocess
outputArtifactKey: output_dataset_two_path
dataset_one_path:
taskOutputArtifact:
producerTask: preprocess
outputArtifactKey: output_dataset_one
dependentTasks:
- preprocess
cachingOptions:
enableCache: true
componentRef:
name: comp-train
preprocess:
taskInfo:
name: preprocess
inputs:
parameters:
input_list_parameter:
runtimeValue:
constant:
- a
- b
- c
message:
componentInputParameter: message
input_dict_parameter:
componentInputParameter: input_dict
cachingOptions:
enableCache: true
componentRef:
name: comp-preprocess
defaultPipelineRoot: minio://dummy_root
| 141 |
0 | kubeflow_public_repos/pipelines/frontend/src/data | kubeflow_public_repos/pipelines/frontend/src/data/test/xgboost_sample_pipeline.yaml | components:
comp-chicago-taxi-trips-dataset:
executorLabel: exec-chicago-taxi-trips-dataset
inputDefinitions:
parameters:
format:
defaultValue: csv
parameterType: STRING
limit:
defaultValue: '1000'
parameterType: NUMBER_INTEGER
select:
defaultValue: trip_id,taxi_id,trip_start_timestamp,trip_end_timestamp,trip_seconds,trip_miles,pickup_census_tract,dropoff_census_tract,pickup_community_area,dropoff_community_area,fare,tips,tolls,extras,trip_total,payment_type,company,pickup_centroid_latitude,pickup_centroid_longitude,pickup_centroid_location,dropoff_centroid_latitude,dropoff_centroid_longitude,dropoff_centroid_location
parameterType: STRING
where:
defaultValue: trip_start_timestamp>="1900-01-01" AND trip_start_timestamp<"2100-01-01"
parameterType: STRING
outputDefinitions:
artifacts:
table:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
comp-convert-csv-to-apache-parquet:
executorLabel: exec-convert-csv-to-apache-parquet
inputDefinitions:
artifacts:
data:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
outputDefinitions:
artifacts:
output_data:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
comp-xgboost-predict:
executorLabel: exec-xgboost-predict
inputDefinitions:
artifacts:
data:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
model:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
parameters:
label_column:
parameterType: NUMBER_INTEGER
outputDefinitions:
artifacts:
predictions:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
comp-xgboost-predict-2:
executorLabel: exec-xgboost-predict-2
inputDefinitions:
artifacts:
data:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
model:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
parameters:
label_column_name:
parameterType: STRING
outputDefinitions:
artifacts:
predictions:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
comp-xgboost-predict-3:
executorLabel: exec-xgboost-predict-3
inputDefinitions:
artifacts:
data:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
model:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
parameters:
label_column_name:
parameterType: STRING
outputDefinitions:
artifacts:
predictions:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
comp-xgboost-predict-4:
executorLabel: exec-xgboost-predict-4
inputDefinitions:
artifacts:
data:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
model:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
parameters:
label_column:
parameterType: NUMBER_INTEGER
outputDefinitions:
artifacts:
predictions:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
comp-xgboost-train:
executorLabel: exec-xgboost-train
inputDefinitions:
artifacts:
training_data:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
parameters:
booster:
defaultValue: gbtree
parameterType: STRING
label_column:
defaultValue: '0'
parameterType: NUMBER_INTEGER
learning_rate:
defaultValue: '0.3'
parameterType: NUMBER_DOUBLE
max_depth:
defaultValue: '6'
parameterType: NUMBER_INTEGER
min_split_loss:
defaultValue: '0'
parameterType: NUMBER_DOUBLE
num_iterations:
defaultValue: '10'
parameterType: NUMBER_INTEGER
objective:
defaultValue: reg:squarederror
parameterType: STRING
outputDefinitions:
artifacts:
model:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
model_config:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
comp-xgboost-train-2:
executorLabel: exec-xgboost-train-2
inputDefinitions:
artifacts:
training_data:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
parameters:
booster:
defaultValue: gbtree
parameterType: STRING
label_column_name:
parameterType: STRING
learning_rate:
defaultValue: '0.3'
parameterType: NUMBER_DOUBLE
max_depth:
defaultValue: '6'
parameterType: NUMBER_INTEGER
min_split_loss:
defaultValue: '0'
parameterType: NUMBER_DOUBLE
num_iterations:
defaultValue: '10'
parameterType: NUMBER_INTEGER
objective:
defaultValue: reg:squarederror
parameterType: STRING
outputDefinitions:
artifacts:
model:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
model_config:
artifactType:
schemaTitle: system.Artifact
schemaVersion: 0.0.1
defaultPipelineRoot: minio://dummy_root
deploymentSpec:
executors:
exec-chicago-taxi-trips-dataset:
container:
command:
- sh
- -c
- "set -e -x -o pipefail\noutput_path=\"$0\"\nselect=\"$1\"\nwhere=\"$2\"\n\
limit=\"$3\"\nformat=\"$4\"\nmkdir -p \"$(dirname \"$output_path\")\"\n\
curl --get 'https://data.cityofchicago.org/resource/wrvz-psew.'\"${format}\"\
\ \\\n --data-urlencode '$limit='\"${limit}\" \\\n --data-urlencode\
\ '$where='\"${where}\" \\\n --data-urlencode '$select='\"${select}\"\
\ \\\n | tr -d '\"' > \"$output_path\" # Removing unneeded quotes around\
\ all numbers\n"
- '{{$.outputs.artifacts[''table''].path}}'
- '{{$.inputs.parameters[''select'']}}'
- '{{$.inputs.parameters[''where'']}}'
- '{{$.inputs.parameters[''limit'']}}'
image: byrnedo/alpine-curl@sha256:548379d0a4a0c08b9e55d9d87a592b7d35d9ab3037f4936f5ccd09d0b625a342
exec-convert-csv-to-apache-parquet:
container:
args:
- --data
- '{{$.inputs.artifacts[''data''].path}}'
- --output-data
- '{{$.outputs.artifacts[''output_data''].path}}'
command:
- sh
- -c
- (PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location
'pyarrow==0.17.1' || PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install
--quiet --no-warn-script-location 'pyarrow==0.17.1' --user) && "$0" "$@"
- python3
- -u
- -c
- "def _make_parent_dirs_and_return_path(file_path: str):\n import os\n\
\ os.makedirs(os.path.dirname(file_path), exist_ok=True)\n return\
\ file_path\n\ndef convert_csv_to_apache_parquet(\n data_path,\n output_data_path,\n\
):\n '''Converts CSV table to Apache Parquet.\n\n [Apache Parquet](https://parquet.apache.org/)\n\
\n Annotations:\n author: Alexey Volkov <[email protected]>\n\
\ '''\n from pyarrow import csv, parquet\n\n table = csv.read_csv(data_path)\n\
\ parquet.write_table(table, output_data_path)\n\nimport argparse\n_parser\
\ = argparse.ArgumentParser(prog='Convert csv to apache parquet', description='Converts\
\ CSV table to Apache Parquet.\\n\\n [Apache Parquet](https://parquet.apache.org/)\\\
n\\n Annotations:\\n author: Alexey Volkov <[email protected]>')\n\
_parser.add_argument(\"--data\", dest=\"data_path\", type=str, required=True,\
\ default=argparse.SUPPRESS)\n_parser.add_argument(\"--output-data\", dest=\"\
output_data_path\", type=_make_parent_dirs_and_return_path, required=True,\
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
_output_files = _parsed_args.pop(\"_output_paths\", [])\n\n_outputs = convert_csv_to_apache_parquet(**_parsed_args)\n\
\n_output_serializers = [\n\n]\n\nimport os\nfor idx, output_file in enumerate(_output_files):\n\
\ try:\n os.makedirs(os.path.dirname(output_file))\n except\
\ OSError:\n pass\n with open(output_file, 'w') as f:\n \
\ f.write(_output_serializers[idx](_outputs[idx]))\n"
image: python:3.9
exec-xgboost-predict:
container:
args:
- --data
- '{{$.inputs.artifacts[''data''].path}}'
- --model
- '{{$.inputs.artifacts[''model''].path}}'
- --label-column
- '{{$.inputs.parameters[''label_column'']}}'
- --predictions
- '{{$.outputs.artifacts[''predictions''].path}}'
command:
- sh
- -c
- (PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location
'xgboost==1.1.1' 'pandas==1.0.5' || PIP_DISABLE_PIP_VERSION_CHECK=1 python3
-m pip install --quiet --no-warn-script-location 'xgboost==1.1.1' 'pandas==1.0.5'
--user) && "$0" "$@"
- python3
- -u
- -c
- "def _make_parent_dirs_and_return_path(file_path: str):\n import os\n\
\ os.makedirs(os.path.dirname(file_path), exist_ok=True)\n return\
\ file_path\n\ndef xgboost_predict(\n data_path, # Also supports LibSVM\n\
\ model_path,\n predictions_path,\n label_column = None,\n):\n\
\ '''Make predictions using a trained XGBoost model.\n\n Args:\n \
\ data_path: Path for the feature data in CSV format.\n model_path:\
\ Path for the trained model in binary XGBoost format.\n predictions_path:\
\ Output path for the predictions.\n label_column: Column containing\
\ the label data.\n\n Annotations:\n author: Alexey Volkov <[email protected]>\n\
\ '''\n from pathlib import Path\n\n import numpy\n import pandas\n\
\ import xgboost\n\n df = pandas.read_csv(\n data_path,\n \
\ )\n\n if label_column is not None:\n df = df.drop(columns=[df.columns[label_column]])\n\
\n testing_data = xgboost.DMatrix(\n data=df,\n )\n\n model\
\ = xgboost.Booster(model_file=model_path)\n\n predictions = model.predict(testing_data)\n\
\n Path(predictions_path).parent.mkdir(parents=True, exist_ok=True)\n\
\ numpy.savetxt(predictions_path, predictions)\n\nimport argparse\n_parser\
\ = argparse.ArgumentParser(prog='Xgboost predict', description='Make predictions\
\ using a trained XGBoost model.\\n\\n Args:\\n data_path: Path\
\ for the feature data in CSV format.\\n model_path: Path for the\
\ trained model in binary XGBoost format.\\n predictions_path: Output\
\ path for the predictions.\\n label_column: Column containing the\
\ label data.\\n\\n Annotations:\\n author: Alexey Volkov <[email protected]>')\n\
_parser.add_argument(\"--data\", dest=\"data_path\", type=str, required=True,\
\ default=argparse.SUPPRESS)\n_parser.add_argument(\"--model\", dest=\"\
model_path\", type=str, required=True, default=argparse.SUPPRESS)\n_parser.add_argument(\"\
--label-column\", dest=\"label_column\", type=int, required=False, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--predictions\", dest=\"predictions_path\", type=_make_parent_dirs_and_return_path,\
\ required=True, default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_predict(**_parsed_args)\n"
image: python:3.9
exec-xgboost-predict-2:
container:
args:
- --data
- '{{$.inputs.artifacts[''data''].path}}'
- --model
- '{{$.inputs.artifacts[''model''].path}}'
- --label-column-name
- '{{$.inputs.parameters[''label_column_name'']}}'
- --predictions
- '{{$.outputs.artifacts[''predictions''].path}}'
command:
- sh
- -c
- (PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location
'xgboost==1.1.1' 'pandas==1.0.5' 'pyarrow==0.17.1' || PIP_DISABLE_PIP_VERSION_CHECK=1
python3 -m pip install --quiet --no-warn-script-location 'xgboost==1.1.1'
'pandas==1.0.5' 'pyarrow==0.17.1' --user) && "$0" "$@"
- python3
- -u
- -c
- "def _make_parent_dirs_and_return_path(file_path: str):\n import os\n\
\ os.makedirs(os.path.dirname(file_path), exist_ok=True)\n return\
\ file_path\n\ndef xgboost_predict(\n data_path,\n model_path,\n \
\ predictions_path,\n label_column_name = None,\n):\n '''Make predictions\
\ using a trained XGBoost model.\n\n Args:\n data_path: Path for\
\ the feature data in Apache Parquet format.\n model_path: Path for\
\ the trained model in binary XGBoost format.\n predictions_path:\
\ Output path for the predictions.\n label_column_name: Optional.\
\ Name of the column containing the label data that is excluded during the\
\ prediction.\n\n Annotations:\n author: Alexey Volkov <[email protected]>\n\
\ '''\n from pathlib import Path\n\n import numpy\n import pandas\n\
\ import xgboost\n\n # Loading data\n df = pandas.read_parquet(data_path)\n\
\ if label_column_name:\n df = df.drop(columns=[label_column_name])\n\
\n evaluation_data = xgboost.DMatrix(\n data=df,\n )\n\n \
\ # Training\n model = xgboost.Booster(model_file=model_path)\n\n \
\ predictions = model.predict(evaluation_data)\n\n Path(predictions_path).parent.mkdir(parents=True,\
\ exist_ok=True)\n numpy.savetxt(predictions_path, predictions)\n\nimport\
\ argparse\n_parser = argparse.ArgumentParser(prog='Xgboost predict', description='Make\
\ predictions using a trained XGBoost model.\\n\\n Args:\\n data_path:\
\ Path for the feature data in Apache Parquet format.\\n model_path:\
\ Path for the trained model in binary XGBoost format.\\n predictions_path:\
\ Output path for the predictions.\\n label_column_name: Optional.\
\ Name of the column containing the label data that is excluded during the\
\ prediction.\\n\\n Annotations:\\n author: Alexey Volkov <[email protected]>')\n\
_parser.add_argument(\"--data\", dest=\"data_path\", type=str, required=True,\
\ default=argparse.SUPPRESS)\n_parser.add_argument(\"--model\", dest=\"\
model_path\", type=str, required=True, default=argparse.SUPPRESS)\n_parser.add_argument(\"\
--label-column-name\", dest=\"label_column_name\", type=str, required=False,\
\ default=argparse.SUPPRESS)\n_parser.add_argument(\"--predictions\", dest=\"\
predictions_path\", type=_make_parent_dirs_and_return_path, required=True,\
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_predict(**_parsed_args)\n"
image: python:3.9
exec-xgboost-predict-3:
container:
args:
- --data
- '{{$.inputs.artifacts[''data''].path}}'
- --model
- '{{$.inputs.artifacts[''model''].path}}'
- --label-column-name
- '{{$.inputs.parameters[''label_column_name'']}}'
- --predictions
- '{{$.outputs.artifacts[''predictions''].path}}'
command:
- sh
- -c
- (PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location
'xgboost==1.1.1' 'pandas==1.0.5' 'pyarrow==0.17.1' || PIP_DISABLE_PIP_VERSION_CHECK=1
python3 -m pip install --quiet --no-warn-script-location 'xgboost==1.1.1'
'pandas==1.0.5' 'pyarrow==0.17.1' --user) && "$0" "$@"
- python3
- -u
- -c
- "def _make_parent_dirs_and_return_path(file_path: str):\n import os\n\
\ os.makedirs(os.path.dirname(file_path), exist_ok=True)\n return\
\ file_path\n\ndef xgboost_predict(\n data_path,\n model_path,\n \
\ predictions_path,\n label_column_name = None,\n):\n '''Make predictions\
\ using a trained XGBoost model.\n\n Args:\n data_path: Path for\
\ the feature data in Apache Parquet format.\n model_path: Path for\
\ the trained model in binary XGBoost format.\n predictions_path:\
\ Output path for the predictions.\n label_column_name: Optional.\
\ Name of the column containing the label data that is excluded during the\
\ prediction.\n\n Annotations:\n author: Alexey Volkov <[email protected]>\n\
\ '''\n from pathlib import Path\n\n import numpy\n import pandas\n\
\ import xgboost\n\n # Loading data\n df = pandas.read_parquet(data_path)\n\
\ if label_column_name:\n df = df.drop(columns=[label_column_name])\n\
\n evaluation_data = xgboost.DMatrix(\n data=df,\n )\n\n \
\ # Training\n model = xgboost.Booster(model_file=model_path)\n\n \
\ predictions = model.predict(evaluation_data)\n\n Path(predictions_path).parent.mkdir(parents=True,\
\ exist_ok=True)\n numpy.savetxt(predictions_path, predictions)\n\nimport\
\ argparse\n_parser = argparse.ArgumentParser(prog='Xgboost predict', description='Make\
\ predictions using a trained XGBoost model.\\n\\n Args:\\n data_path:\
\ Path for the feature data in Apache Parquet format.\\n model_path:\
\ Path for the trained model in binary XGBoost format.\\n predictions_path:\
\ Output path for the predictions.\\n label_column_name: Optional.\
\ Name of the column containing the label data that is excluded during the\
\ prediction.\\n\\n Annotations:\\n author: Alexey Volkov <[email protected]>')\n\
_parser.add_argument(\"--data\", dest=\"data_path\", type=str, required=True,\
\ default=argparse.SUPPRESS)\n_parser.add_argument(\"--model\", dest=\"\
model_path\", type=str, required=True, default=argparse.SUPPRESS)\n_parser.add_argument(\"\
--label-column-name\", dest=\"label_column_name\", type=str, required=False,\
\ default=argparse.SUPPRESS)\n_parser.add_argument(\"--predictions\", dest=\"\
predictions_path\", type=_make_parent_dirs_and_return_path, required=True,\
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_predict(**_parsed_args)\n"
image: python:3.9
exec-xgboost-predict-4:
container:
args:
- --data
- '{{$.inputs.artifacts[''data''].path}}'
- --model
- '{{$.inputs.artifacts[''model''].path}}'
- --label-column
- '{{$.inputs.parameters[''label_column'']}}'
- --predictions
- '{{$.outputs.artifacts[''predictions''].path}}'
command:
- sh
- -c
- (PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location
'xgboost==1.1.1' 'pandas==1.0.5' || PIP_DISABLE_PIP_VERSION_CHECK=1 python3
-m pip install --quiet --no-warn-script-location 'xgboost==1.1.1' 'pandas==1.0.5'
--user) && "$0" "$@"
- python3
- -u
- -c
- "def _make_parent_dirs_and_return_path(file_path: str):\n import os\n\
\ os.makedirs(os.path.dirname(file_path), exist_ok=True)\n return\
\ file_path\n\ndef xgboost_predict(\n data_path, # Also supports LibSVM\n\
\ model_path,\n predictions_path,\n label_column = None,\n):\n\
\ '''Make predictions using a trained XGBoost model.\n\n Args:\n \
\ data_path: Path for the feature data in CSV format.\n model_path:\
\ Path for the trained model in binary XGBoost format.\n predictions_path:\
\ Output path for the predictions.\n label_column: Column containing\
\ the label data.\n\n Annotations:\n author: Alexey Volkov <[email protected]>\n\
\ '''\n from pathlib import Path\n\n import numpy\n import pandas\n\
\ import xgboost\n\n df = pandas.read_csv(\n data_path,\n \
\ )\n\n if label_column is not None:\n df = df.drop(columns=[df.columns[label_column]])\n\
\n testing_data = xgboost.DMatrix(\n data=df,\n )\n\n model\
\ = xgboost.Booster(model_file=model_path)\n\n predictions = model.predict(testing_data)\n\
\n Path(predictions_path).parent.mkdir(parents=True, exist_ok=True)\n\
\ numpy.savetxt(predictions_path, predictions)\n\nimport argparse\n_parser\
\ = argparse.ArgumentParser(prog='Xgboost predict', description='Make predictions\
\ using a trained XGBoost model.\\n\\n Args:\\n data_path: Path\
\ for the feature data in CSV format.\\n model_path: Path for the\
\ trained model in binary XGBoost format.\\n predictions_path: Output\
\ path for the predictions.\\n label_column: Column containing the\
\ label data.\\n\\n Annotations:\\n author: Alexey Volkov <[email protected]>')\n\
_parser.add_argument(\"--data\", dest=\"data_path\", type=str, required=True,\
\ default=argparse.SUPPRESS)\n_parser.add_argument(\"--model\", dest=\"\
model_path\", type=str, required=True, default=argparse.SUPPRESS)\n_parser.add_argument(\"\
--label-column\", dest=\"label_column\", type=int, required=False, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--predictions\", dest=\"predictions_path\", type=_make_parent_dirs_and_return_path,\
\ required=True, default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_predict(**_parsed_args)\n"
image: python:3.9
exec-xgboost-train:
container:
args:
- --training-data
- '{{$.inputs.artifacts[''training_data''].path}}'
- --label-column
- '{{$.inputs.parameters[''label_column'']}}'
- --num-iterations
- '{{$.inputs.parameters[''num_iterations'']}}'
- --objective
- '{{$.inputs.parameters[''objective'']}}'
- --model
- '{{$.outputs.artifacts[''model''].path}}'
- --model-config
- '{{$.outputs.artifacts[''model_config''].path}}'
command:
- sh
- -c
- (PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location
'xgboost==1.1.1' 'pandas==1.0.5' || PIP_DISABLE_PIP_VERSION_CHECK=1 python3
-m pip install --quiet --no-warn-script-location 'xgboost==1.1.1' 'pandas==1.0.5'
--user) && "$0" "$@"
- python3
- -u
- -c
- "def _make_parent_dirs_and_return_path(file_path: str):\n import os\n\
\ os.makedirs(os.path.dirname(file_path), exist_ok=True)\n return\
\ file_path\n\ndef xgboost_train(\n training_data_path, # Also supports\
\ LibSVM\n model_path,\n model_config_path,\n starting_model_path\
\ = None,\n\n label_column = 0,\n num_iterations = 10,\n booster_params\
\ = None,\n\n # Booster parameters\n objective = 'reg:squarederror',\n\
\ booster = 'gbtree',\n learning_rate = 0.3,\n min_split_loss =\
\ 0,\n max_depth = 6,\n):\n '''Train an XGBoost model.\n\n Args:\n\
\ training_data_path: Path for the training data in CSV format.\n\
\ model_path: Output path for the trained model in binary XGBoost\
\ format.\n model_config_path: Output path for the internal parameter\
\ configuration of Booster as a JSON string.\n starting_model_path:\
\ Path for the existing trained model to start from.\n label_column:\
\ Column containing the label data.\n num_boost_rounds: Number of\
\ boosting iterations.\n booster_params: Parameters for the booster.\
\ See https://xgboost.readthedocs.io/en/latest/parameter.html\n objective:\
\ The learning task and the corresponding learning objective.\n \
\ See https://xgboost.readthedocs.io/en/latest/parameter.html#learning-task-parameters\n\
\ The most common values are:\n \"reg:squarederror\"\
\ - Regression with squared loss (default).\n \"reg:logistic\"\
\ - Logistic regression.\n \"binary:logistic\" - Logistic regression\
\ for binary classification, output probability.\n \"binary:logitraw\"\
\ - Logistic regression for binary classification, output score before logistic\
\ transformation\n \"rank:pairwise\" - Use LambdaMART to perform\
\ pairwise ranking where the pairwise loss is minimized\n \"\
rank:ndcg\" - Use LambdaMART to perform list-wise ranking where Normalized\
\ Discounted Cumulative Gain (NDCG) is maximized\n\n Annotations:\n \
\ author: Alexey Volkov <[email protected]>\n '''\n \
\ import pandas\n import xgboost\n\n df = pandas.read_csv(\n \
\ training_data_path,\n )\n\n training_data = xgboost.DMatrix(\n\
\ data=df.drop(columns=[df.columns[label_column]]),\n label=df[df.columns[label_column]],\n\
\ )\n\n booster_params = booster_params or {}\n booster_params.setdefault('objective',\
\ objective)\n booster_params.setdefault('booster', booster)\n booster_params.setdefault('learning_rate',\
\ learning_rate)\n booster_params.setdefault('min_split_loss', min_split_loss)\n\
\ booster_params.setdefault('max_depth', max_depth)\n\n starting_model\
\ = None\n if starting_model_path:\n starting_model = xgboost.Booster(model_file=starting_model_path)\n\
\n model = xgboost.train(\n params=booster_params,\n dtrain=training_data,\n\
\ num_boost_round=num_iterations,\n xgb_model=starting_model\n\
\ )\n\n # Saving the model in binary format\n model.save_model(model_path)\n\
\n model_config_str = model.save_config()\n with open(model_config_path,\
\ 'w') as model_config_file:\n model_config_file.write(model_config_str)\n\
\nimport json\nimport argparse\n_parser = argparse.ArgumentParser(prog='Xgboost\
\ train', description='Train an XGBoost model.\\n\\n Args:\\n \
\ training_data_path: Path for the training data in CSV format.\\n \
\ model_path: Output path for the trained model in binary XGBoost format.\\\
n model_config_path: Output path for the internal parameter configuration\
\ of Booster as a JSON string.\\n starting_model_path: Path for the\
\ existing trained model to start from.\\n label_column: Column containing\
\ the label data.\\n num_boost_rounds: Number of boosting iterations.\\\
n booster_params: Parameters for the booster. See https://xgboost.readthedocs.io/en/latest/parameter.html\\\
n objective: The learning task and the corresponding learning objective.\\\
n See https://xgboost.readthedocs.io/en/latest/parameter.html#learning-task-parameters\\\
n The most common values are:\\n \"reg:squarederror\"\
\ - Regression with squared loss (default).\\n \"reg:logistic\"\
\ - Logistic regression.\\n \"binary:logistic\" - Logistic regression\
\ for binary classification, output probability.\\n \"binary:logitraw\"\
\ - Logistic regression for binary classification, output score before logistic\
\ transformation\\n \"rank:pairwise\" - Use LambdaMART to perform\
\ pairwise ranking where the pairwise loss is minimized\\n \"\
rank:ndcg\" - Use LambdaMART to perform list-wise ranking where Normalized\
\ Discounted Cumulative Gain (NDCG) is maximized\\n\\n Annotations:\\\
n author: Alexey Volkov <[email protected]>')\n_parser.add_argument(\"\
--training-data\", dest=\"training_data_path\", type=str, required=True,\
\ default=argparse.SUPPRESS)\n_parser.add_argument(\"--starting-model\"\
, dest=\"starting_model_path\", type=str, required=False, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--label-column\", dest=\"label_column\", type=int,\
\ required=False, default=argparse.SUPPRESS)\n_parser.add_argument(\"--num-iterations\"\
, dest=\"num_iterations\", type=int, required=False, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--booster-params\", dest=\"booster_params\", type=json.loads,\
\ required=False, default=argparse.SUPPRESS)\n_parser.add_argument(\"--objective\"\
, dest=\"objective\", type=str, required=False, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--booster\", dest=\"booster\", type=str, required=False,\
\ default=argparse.SUPPRESS)\n_parser.add_argument(\"--learning-rate\",\
\ dest=\"learning_rate\", type=float, required=False, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--min-split-loss\", dest=\"min_split_loss\", type=float,\
\ required=False, default=argparse.SUPPRESS)\n_parser.add_argument(\"--max-depth\"\
, dest=\"max_depth\", type=int, required=False, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--model\", dest=\"model_path\", type=_make_parent_dirs_and_return_path,\
\ required=True, default=argparse.SUPPRESS)\n_parser.add_argument(\"--model-config\"\
, dest=\"model_config_path\", type=_make_parent_dirs_and_return_path, required=True,\
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_train(**_parsed_args)\n"
image: python:3.9
exec-xgboost-train-2:
container:
args:
- --training-data
- '{{$.inputs.artifacts[''training_data''].path}}'
- --label-column-name
- '{{$.inputs.parameters[''label_column_name'']}}'
- --num-iterations
- '{{$.inputs.parameters[''num_iterations'']}}'
- --objective
- '{{$.inputs.parameters[''objective'']}}'
- --model
- '{{$.outputs.artifacts[''model''].path}}'
- --model-config
- '{{$.outputs.artifacts[''model_config''].path}}'
command:
- sh
- -c
- (PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location
'xgboost==1.1.1' 'pandas==1.0.5' 'pyarrow==0.17.1' || PIP_DISABLE_PIP_VERSION_CHECK=1
python3 -m pip install --quiet --no-warn-script-location 'xgboost==1.1.1'
'pandas==1.0.5' 'pyarrow==0.17.1' --user) && "$0" "$@"
- python3
- -u
- -c
- "def _make_parent_dirs_and_return_path(file_path: str):\n import os\n\
\ os.makedirs(os.path.dirname(file_path), exist_ok=True)\n return\
\ file_path\n\ndef xgboost_train(\n training_data_path,\n model_path,\n\
\ model_config_path,\n label_column_name,\n\n starting_model_path\
\ = None,\n\n num_iterations = 10,\n booster_params = None,\n\n \
\ # Booster parameters\n objective = 'reg:squarederror',\n booster\
\ = 'gbtree',\n learning_rate = 0.3,\n min_split_loss = 0,\n max_depth\
\ = 6,\n):\n '''Train an XGBoost model.\n\n Args:\n training_data_path:\
\ Path for the training data in Apache Parquet format.\n model_path:\
\ Output path for the trained model in binary XGBoost format.\n model_config_path:\
\ Output path for the internal parameter configuration of Booster as a JSON\
\ string.\n starting_model_path: Path for the existing trained model\
\ to start from.\n label_column_name: Name of the column containing\
\ the label data.\n num_boost_rounds: Number of boosting iterations.\n\
\ booster_params: Parameters for the booster. See https://xgboost.readthedocs.io/en/latest/parameter.html\n\
\ objective: The learning task and the corresponding learning objective.\n\
\ See https://xgboost.readthedocs.io/en/latest/parameter.html#learning-task-parameters\n\
\ The most common values are:\n \"reg:squarederror\"\
\ - Regression with squared loss (default).\n \"reg:logistic\"\
\ - Logistic regression.\n \"binary:logistic\" - Logistic regression\
\ for binary classification, output probability.\n \"binary:logitraw\"\
\ - Logistic regression for binary classification, output score before logistic\
\ transformation\n \"rank:pairwise\" - Use LambdaMART to perform\
\ pairwise ranking where the pairwise loss is minimized\n \"\
rank:ndcg\" - Use LambdaMART to perform list-wise ranking where Normalized\
\ Discounted Cumulative Gain (NDCG) is maximized\n\n Annotations:\n \
\ author: Alexey Volkov <[email protected]>\n '''\n \
\ import pandas\n import xgboost\n\n # Loading data\n df = pandas.read_parquet(training_data_path)\n\
\ training_data = xgboost.DMatrix(\n data=df.drop(columns=[label_column_name]),\n\
\ label=df[[label_column_name]],\n )\n # Training\n booster_params\
\ = booster_params or {}\n booster_params.setdefault('objective', objective)\n\
\ booster_params.setdefault('booster', booster)\n booster_params.setdefault('learning_rate',\
\ learning_rate)\n booster_params.setdefault('min_split_loss', min_split_loss)\n\
\ booster_params.setdefault('max_depth', max_depth)\n\n starting_model\
\ = None\n if starting_model_path:\n starting_model = xgboost.Booster(model_file=starting_model_path)\n\
\n model = xgboost.train(\n params=booster_params,\n dtrain=training_data,\n\
\ num_boost_round=num_iterations,\n xgb_model=starting_model\n\
\ )\n\n # Saving the model in binary format\n model.save_model(model_path)\n\
\n model_config_str = model.save_config()\n with open(model_config_path,\
\ 'w') as model_config_file:\n model_config_file.write(model_config_str)\n\
\nimport json\nimport argparse\n_parser = argparse.ArgumentParser(prog='Xgboost\
\ train', description='Train an XGBoost model.\\n\\n Args:\\n \
\ training_data_path: Path for the training data in Apache Parquet format.\\\
n model_path: Output path for the trained model in binary XGBoost\
\ format.\\n model_config_path: Output path for the internal parameter\
\ configuration of Booster as a JSON string.\\n starting_model_path:\
\ Path for the existing trained model to start from.\\n label_column_name:\
\ Name of the column containing the label data.\\n num_boost_rounds:\
\ Number of boosting iterations.\\n booster_params: Parameters for\
\ the booster. See https://xgboost.readthedocs.io/en/latest/parameter.html\\\
n objective: The learning task and the corresponding learning objective.\\\
n See https://xgboost.readthedocs.io/en/latest/parameter.html#learning-task-parameters\\\
n The most common values are:\\n \"reg:squarederror\"\
\ - Regression with squared loss (default).\\n \"reg:logistic\"\
\ - Logistic regression.\\n \"binary:logistic\" - Logistic regression\
\ for binary classification, output probability.\\n \"binary:logitraw\"\
\ - Logistic regression for binary classification, output score before logistic\
\ transformation\\n \"rank:pairwise\" - Use LambdaMART to perform\
\ pairwise ranking where the pairwise loss is minimized\\n \"\
rank:ndcg\" - Use LambdaMART to perform list-wise ranking where Normalized\
\ Discounted Cumulative Gain (NDCG) is maximized\\n\\n Annotations:\\\
n author: Alexey Volkov <[email protected]>')\n_parser.add_argument(\"\
--training-data\", dest=\"training_data_path\", type=str, required=True,\
\ default=argparse.SUPPRESS)\n_parser.add_argument(\"--label-column-name\"\
, dest=\"label_column_name\", type=str, required=True, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--starting-model\", dest=\"starting_model_path\"\
, type=str, required=False, default=argparse.SUPPRESS)\n_parser.add_argument(\"\
--num-iterations\", dest=\"num_iterations\", type=int, required=False, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--booster-params\", dest=\"booster_params\", type=json.loads,\
\ required=False, default=argparse.SUPPRESS)\n_parser.add_argument(\"--objective\"\
, dest=\"objective\", type=str, required=False, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--booster\", dest=\"booster\", type=str, required=False,\
\ default=argparse.SUPPRESS)\n_parser.add_argument(\"--learning-rate\",\
\ dest=\"learning_rate\", type=float, required=False, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--min-split-loss\", dest=\"min_split_loss\", type=float,\
\ required=False, default=argparse.SUPPRESS)\n_parser.add_argument(\"--max-depth\"\
, dest=\"max_depth\", type=int, required=False, default=argparse.SUPPRESS)\n\
_parser.add_argument(\"--model\", dest=\"model_path\", type=_make_parent_dirs_and_return_path,\
\ required=True, default=argparse.SUPPRESS)\n_parser.add_argument(\"--model-config\"\
, dest=\"model_config_path\", type=_make_parent_dirs_and_return_path, required=True,\
\ default=argparse.SUPPRESS)\n_parsed_args = vars(_parser.parse_args())\n\
\n_outputs = xgboost_train(**_parsed_args)\n"
image: python:3.9
pipelineInfo:
name: xgboost-sample-pipeline
root:
dag:
tasks:
chicago-taxi-trips-dataset:
cachingOptions:
enableCache: true
componentRef:
name: comp-chicago-taxi-trips-dataset
inputs:
parameters:
limit:
runtimeValue:
constant: 10000.0
select:
runtimeValue:
constant: tips,trip_seconds,trip_miles,pickup_community_area,dropoff_community_area,fare,tolls,extras,trip_total
where:
runtimeValue:
constant: trip_start_timestamp >= "2019-01-01" AND trip_start_timestamp
< "2019-02-01"
taskInfo:
name: chicago-taxi-trips-dataset
convert-csv-to-apache-parquet:
cachingOptions:
enableCache: true
componentRef:
name: comp-convert-csv-to-apache-parquet
dependentTasks:
- chicago-taxi-trips-dataset
inputs:
artifacts:
data:
taskOutputArtifact:
outputArtifactKey: table
producerTask: chicago-taxi-trips-dataset
taskInfo:
name: convert-csv-to-apache-parquet
xgboost-predict:
cachingOptions:
enableCache: true
componentRef:
name: comp-xgboost-predict
dependentTasks:
- chicago-taxi-trips-dataset
- xgboost-train
inputs:
artifacts:
data:
taskOutputArtifact:
outputArtifactKey: table
producerTask: chicago-taxi-trips-dataset
model:
taskOutputArtifact:
outputArtifactKey: model
producerTask: xgboost-train
parameters:
label_column:
runtimeValue:
constant: 0.0
taskInfo:
name: xgboost-predict
xgboost-predict-2:
cachingOptions:
enableCache: true
componentRef:
name: comp-xgboost-predict-2
dependentTasks:
- convert-csv-to-apache-parquet
- xgboost-train-2
inputs:
artifacts:
data:
taskOutputArtifact:
outputArtifactKey: output_data
producerTask: convert-csv-to-apache-parquet
model:
taskOutputArtifact:
outputArtifactKey: model
producerTask: xgboost-train-2
parameters:
label_column_name:
runtimeValue:
constant: tips
taskInfo:
name: xgboost-predict-2
xgboost-predict-3:
cachingOptions:
enableCache: true
componentRef:
name: comp-xgboost-predict-3
dependentTasks:
- convert-csv-to-apache-parquet
- xgboost-train
inputs:
artifacts:
data:
taskOutputArtifact:
outputArtifactKey: output_data
producerTask: convert-csv-to-apache-parquet
model:
taskOutputArtifact:
outputArtifactKey: model
producerTask: xgboost-train
parameters:
label_column_name:
runtimeValue:
constant: tips
taskInfo:
name: xgboost-predict-3
xgboost-predict-4:
cachingOptions:
enableCache: true
componentRef:
name: comp-xgboost-predict-4
dependentTasks:
- chicago-taxi-trips-dataset
- xgboost-train-2
inputs:
artifacts:
data:
taskOutputArtifact:
outputArtifactKey: table
producerTask: chicago-taxi-trips-dataset
model:
taskOutputArtifact:
outputArtifactKey: model
producerTask: xgboost-train-2
parameters:
label_column:
runtimeValue:
constant: 0.0
taskInfo:
name: xgboost-predict-4
xgboost-train:
cachingOptions:
enableCache: true
componentRef:
name: comp-xgboost-train
dependentTasks:
- chicago-taxi-trips-dataset
inputs:
artifacts:
training_data:
taskOutputArtifact:
outputArtifactKey: table
producerTask: chicago-taxi-trips-dataset
parameters:
label_column:
runtimeValue:
constant: 0.0
num_iterations:
runtimeValue:
constant: 200.0
objective:
runtimeValue:
constant: reg:squarederror
taskInfo:
name: xgboost-train
xgboost-train-2:
cachingOptions:
enableCache: true
componentRef:
name: comp-xgboost-train-2
dependentTasks:
- convert-csv-to-apache-parquet
inputs:
artifacts:
training_data:
taskOutputArtifact:
outputArtifactKey: output_data
producerTask: convert-csv-to-apache-parquet
parameters:
label_column_name:
runtimeValue:
constant: tips
num_iterations:
runtimeValue:
constant: 200.0
objective:
runtimeValue:
constant: reg:squarederror
taskInfo:
name: xgboost-train-2
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.16
| 142 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/run/api.ts | /// <reference path="./custom.d.ts" />
// tslint:disable
/**
* backend/api/run.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import * as url from 'url';
import * as portableFetch from 'portable-fetch';
import { Configuration } from './configuration';
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};
/**
*
* @export
* @interface FetchAPI
*/
export interface FetchAPI {
(url: string, init?: any): Promise<Response>;
}
/**
*
* @export
* @interface FetchArgs
*/
export interface FetchArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration;
constructor(
configuration?: Configuration,
protected basePath: string = BASE_PATH,
protected fetch: FetchAPI = portableFetch,
) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: 'RequiredError';
constructor(public field: string, msg?: string) {
super(msg);
}
}
/**
*
* @export
* @interface ApiListRunsResponse
*/
export interface ApiListRunsResponse {
/**
*
* @type {Array<ApiRun>}
* @memberof ApiListRunsResponse
*/
runs?: Array<ApiRun>;
/**
* The total number of runs for the given query.
* @type {number}
* @memberof ApiListRunsResponse
*/
total_size?: number;
/**
* The token to list the next page of runs.
* @type {string}
* @memberof ApiListRunsResponse
*/
next_page_token?: string;
}
/**
*
* @export
* @interface ApiParameter
*/
export interface ApiParameter {
/**
*
* @type {string}
* @memberof ApiParameter
*/
name?: string;
/**
*
* @type {string}
* @memberof ApiParameter
*/
value?: string;
}
/**
*
* @export
* @interface ApiPipelineRuntime
*/
export interface ApiPipelineRuntime {
/**
* Output. The runtime JSON manifest of the pipeline, including the status of pipeline steps and fields need for UI visualization etc.
* @type {string}
* @memberof ApiPipelineRuntime
*/
pipeline_manifest?: string;
/**
* Output. The runtime JSON manifest of the argo workflow. This is deprecated after pipeline_runtime_manifest is in use.
* @type {string}
* @memberof ApiPipelineRuntime
*/
workflow_manifest?: string;
}
/**
*
* @export
* @interface ApiPipelineSpec
*/
export interface ApiPipelineSpec {
/**
* Optional input field. The ID of the pipeline user uploaded before.
* @type {string}
* @memberof ApiPipelineSpec
*/
pipeline_id?: string;
/**
* Optional output field. The name of the pipeline. Not empty if the pipeline id is not empty.
* @type {string}
* @memberof ApiPipelineSpec
*/
pipeline_name?: string;
/**
* Optional input field. The marshalled raw argo JSON workflow. This will be deprecated when pipeline_manifest is in use.
* @type {string}
* @memberof ApiPipelineSpec
*/
workflow_manifest?: string;
/**
* Optional input field. The raw pipeline JSON spec.
* @type {string}
* @memberof ApiPipelineSpec
*/
pipeline_manifest?: string;
/**
*
* @type {Array<ApiParameter>}
* @memberof ApiPipelineSpec
*/
parameters?: Array<ApiParameter>;
/**
*
* @type {PipelineSpecRuntimeConfig}
* @memberof ApiPipelineSpec
*/
runtime_config?: PipelineSpecRuntimeConfig;
}
/**
*
* @export
* @interface ApiReadArtifactResponse
*/
export interface ApiReadArtifactResponse {
/**
* The bytes of the artifact content.
* @type {string}
* @memberof ApiReadArtifactResponse
*/
data?: string;
}
/**
*
* @export
* @enum {string}
*/
export enum ApiRelationship {
UNKNOWNRELATIONSHIP = <any>'UNKNOWN_RELATIONSHIP',
OWNER = <any>'OWNER',
CREATOR = <any>'CREATOR',
}
/**
*
* @export
* @interface ApiReportRunMetricsRequest
*/
export interface ApiReportRunMetricsRequest {
/**
* Required. The parent run ID of the metric.
* @type {string}
* @memberof ApiReportRunMetricsRequest
*/
run_id?: string;
/**
* List of metrics to report.
* @type {Array<ApiRunMetric>}
* @memberof ApiReportRunMetricsRequest
*/
metrics?: Array<ApiRunMetric>;
}
/**
*
* @export
* @interface ApiReportRunMetricsResponse
*/
export interface ApiReportRunMetricsResponse {
/**
*
* @type {Array<ReportRunMetricsResponseReportRunMetricResult>}
* @memberof ApiReportRunMetricsResponse
*/
results?: Array<ReportRunMetricsResponseReportRunMetricResult>;
}
/**
*
* @export
* @interface ApiResourceKey
*/
export interface ApiResourceKey {
/**
* The type of the resource that referred to.
* @type {ApiResourceType}
* @memberof ApiResourceKey
*/
type?: ApiResourceType;
/**
* The ID of the resource that referred to.
* @type {string}
* @memberof ApiResourceKey
*/
id?: string;
}
/**
*
* @export
* @interface ApiResourceReference
*/
export interface ApiResourceReference {
/**
*
* @type {ApiResourceKey}
* @memberof ApiResourceReference
*/
key?: ApiResourceKey;
/**
* The name of the resource that referred to.
* @type {string}
* @memberof ApiResourceReference
*/
name?: string;
/**
* Required field. The relationship from referred resource to the object.
* @type {ApiRelationship}
* @memberof ApiResourceReference
*/
relationship?: ApiRelationship;
}
/**
*
* @export
* @enum {string}
*/
export enum ApiResourceType {
UNKNOWNRESOURCETYPE = <any>'UNKNOWN_RESOURCE_TYPE',
EXPERIMENT = <any>'EXPERIMENT',
JOB = <any>'JOB',
PIPELINE = <any>'PIPELINE',
PIPELINEVERSION = <any>'PIPELINE_VERSION',
NAMESPACE = <any>'NAMESPACE',
}
/**
*
* @export
* @interface ApiRun
*/
export interface ApiRun {
/**
* Output. Unique run ID. Generated by API server.
* @type {string}
* @memberof ApiRun
*/
id?: string;
/**
* Required input field. Name provided by user, or auto generated if run is created by scheduled job. Not unique.
* @type {string}
* @memberof ApiRun
*/
name?: string;
/**
* Output. Specify whether this run is in archived or available mode.
* @type {ApiRunStorageState}
* @memberof ApiRun
*/
storage_state?: ApiRunStorageState;
/**
*
* @type {string}
* @memberof ApiRun
*/
description?: string;
/**
* Required input field. Describing what the pipeline manifest and parameters to use for the run.
* @type {ApiPipelineSpec}
* @memberof ApiRun
*/
pipeline_spec?: ApiPipelineSpec;
/**
* Optional input field. Specify which resource this run belongs to. When creating a run from a particular pipeline version, the pipeline version can be specified here.
* @type {Array<ApiResourceReference>}
* @memberof ApiRun
*/
resource_references?: Array<ApiResourceReference>;
/**
* Optional input field. Specify which Kubernetes service account this run uses.
* @type {string}
* @memberof ApiRun
*/
service_account?: string;
/**
* Output. The time that the run created.
* @type {Date}
* @memberof ApiRun
*/
created_at?: Date;
/**
* Output. When this run is scheduled to run. This could be different from created_at. For example, if a run is from a backfilling job that was supposed to run 2 month ago, the scheduled_at is 2 month ago, v.s. created_at is the current time.
* @type {Date}
* @memberof ApiRun
*/
scheduled_at?: Date;
/**
* Output. The time this run is finished.
* @type {Date}
* @memberof ApiRun
*/
finished_at?: Date;
/**
*
* @type {string}
* @memberof ApiRun
*/
status?: string;
/**
* In case any error happens retrieving a run field, only run ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call.
* @type {string}
* @memberof ApiRun
*/
error?: string;
/**
* Output. The metrics of the run. The metrics are reported by ReportMetrics API.
* @type {Array<ApiRunMetric>}
* @memberof ApiRun
*/
metrics?: Array<ApiRunMetric>;
}
/**
*
* @export
* @interface ApiRunDetail
*/
export interface ApiRunDetail {
/**
*
* @type {ApiRun}
* @memberof ApiRunDetail
*/
run?: ApiRun;
/**
*
* @type {ApiPipelineRuntime}
* @memberof ApiRunDetail
*/
pipeline_runtime?: ApiPipelineRuntime;
}
/**
*
* @export
* @interface ApiRunMetric
*/
export interface ApiRunMetric {
/**
* Required. The user defined name of the metric. It must between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
* @type {string}
* @memberof ApiRunMetric
*/
name?: string;
/**
* Required. The runtime node ID which reports the metric. The node ID can be found in the RunDetail.workflow.Status. Metric with same (node_id, name) are considerd as duplicate. Only the first reporting will be recorded. Max length is 128.
* @type {string}
* @memberof ApiRunMetric
*/
node_id?: string;
/**
* The number value of the metric.
* @type {number}
* @memberof ApiRunMetric
*/
number_value?: number;
/**
* The display format of metric.
* @type {RunMetricFormat}
* @memberof ApiRunMetric
*/
format?: RunMetricFormat;
}
/**
*
* @export
* @enum {string}
*/
export enum ApiRunStorageState {
AVAILABLE = <any>'STORAGESTATE_AVAILABLE',
ARCHIVED = <any>'STORAGESTATE_ARCHIVED',
}
/**
*
* @export
* @interface ApiStatus
*/
export interface ApiStatus {
/**
*
* @type {string}
* @memberof ApiStatus
*/
error?: string;
/**
*
* @type {number}
* @memberof ApiStatus
*/
code?: number;
/**
*
* @type {Array<ProtobufAny>}
* @memberof ApiStatus
*/
details?: Array<ProtobufAny>;
}
/**
* The runtime config of a PipelineSpec.
* @export
* @interface PipelineSpecRuntimeConfig
*/
export interface PipelineSpecRuntimeConfig {
/**
* The runtime parameters of the PipelineSpec. The parameters will be used to replace the placeholders at runtime.
* @type {{ [key: string]: any; }}
* @memberof PipelineSpecRuntimeConfig
*/
parameters?: { [key: string]: any };
/**
*
* @type {string}
* @memberof PipelineSpecRuntimeConfig
*/
pipeline_root?: string;
}
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
* @export
* @interface ProtobufAny
*/
export interface ProtobufAny {
/**
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
* @type {string}
* @memberof ProtobufAny
*/
type_url?: string;
/**
* Must be a valid serialized protocol buffer of the above specified type.
* @type {string}
* @memberof ProtobufAny
*/
value?: string;
}
/**
* `NullValue` is a singleton enumeration to represent the null value for the `Value` type union. The JSON representation for `NullValue` is JSON `null`. - NULL_VALUE: Null value.
* @export
* @enum {string}
*/
export enum ProtobufNullValue {
NULLVALUE = <any>'NULL_VALUE',
}
/**
*
* @export
* @interface ReportRunMetricsResponseReportRunMetricResult
*/
export interface ReportRunMetricsResponseReportRunMetricResult {
/**
* Output. The name of the metric.
* @type {string}
* @memberof ReportRunMetricsResponseReportRunMetricResult
*/
metric_name?: string;
/**
* Output. The ID of the node which reports the metric.
* @type {string}
* @memberof ReportRunMetricsResponseReportRunMetricResult
*/
metric_node_id?: string;
/**
* Output. The status of the metric reporting.
* @type {ReportRunMetricsResponseReportRunMetricResultStatus}
* @memberof ReportRunMetricsResponseReportRunMetricResult
*/
status?: ReportRunMetricsResponseReportRunMetricResultStatus;
/**
* Output. The detailed message of the error of the reporting.
* @type {string}
* @memberof ReportRunMetricsResponseReportRunMetricResult
*/
message?: string;
}
/**
* - UNSPECIFIED: Default value if not present. - OK: Indicates successful reporting. - INVALID_ARGUMENT: Indicates that the payload of the metric is invalid. - DUPLICATE_REPORTING: Indicates that the metric has been reported before. - INTERNAL_ERROR: Indicates that something went wrong in the server.
* @export
* @enum {string}
*/
export enum ReportRunMetricsResponseReportRunMetricResultStatus {
UNSPECIFIED = <any>'UNSPECIFIED',
OK = <any>'OK',
INVALIDARGUMENT = <any>'INVALID_ARGUMENT',
DUPLICATEREPORTING = <any>'DUPLICATE_REPORTING',
INTERNALERROR = <any>'INTERNAL_ERROR',
}
/**
* - UNSPECIFIED: Default value if not present. - RAW: Display value as its raw format. - PERCENTAGE: Display value in percentage format.
* @export
* @enum {string}
*/
export enum RunMetricFormat {
UNSPECIFIED = <any>'UNSPECIFIED',
RAW = <any>'RAW',
PERCENTAGE = <any>'PERCENTAGE',
}
/**
* RunServiceApi - fetch parameter creator
* @export
*/
export const RunServiceApiFetchParamCreator = function(configuration?: Configuration) {
return {
/**
*
* @summary Archives a run.
* @param {string} id The ID of the run to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveRun(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling archiveRun.',
);
}
const localVarPath = `/apis/v1beta1/runs/{id}:archive`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Creates a new run.
* @param {ApiRun} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createRun(body: ApiRun, options: any = {}): FetchArgs {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError(
'body',
'Required parameter body was null or undefined when calling createRun.',
);
}
const localVarPath = `/apis/v1beta1/runs`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization =
<any>'ApiRun' !== 'string' ||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Deletes a run.
* @param {string} id The ID of the run to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRun(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling deleteRun.',
);
}
const localVarPath = `/apis/v1beta1/runs/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds a specific run by ID.
* @param {string} run_id The ID of the run to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRun(run_id: string, options: any = {}): FetchArgs {
// verify required parameter 'run_id' is not null or undefined
if (run_id === null || run_id === undefined) {
throw new RequiredError(
'run_id',
'Required parameter run_id was null or undefined when calling getRun.',
);
}
const localVarPath = `/apis/v1beta1/runs/{run_id}`.replace(
`{${'run_id'}}`,
encodeURIComponent(String(run_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds all runs.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListRuns call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of runs to be listed per page. If there are more runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" (Example, \"name asc\" or \"id desc\"). Ascending by default.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRuns(
page_token?: string,
page_size?: number,
sort_by?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
filter?: string,
options: any = {},
): FetchArgs {
const localVarPath = `/apis/v1beta1/runs`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
if (page_token !== undefined) {
localVarQueryParameter['page_token'] = page_token;
}
if (page_size !== undefined) {
localVarQueryParameter['page_size'] = page_size;
}
if (sort_by !== undefined) {
localVarQueryParameter['sort_by'] = sort_by;
}
if (resource_reference_key_type !== undefined) {
localVarQueryParameter['resource_reference_key.type'] = resource_reference_key_type;
}
if (resource_reference_key_id !== undefined) {
localVarQueryParameter['resource_reference_key.id'] = resource_reference_key_id;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds a run's artifact data.
* @param {string} run_id The ID of the run.
* @param {string} node_id The ID of the running node.
* @param {string} artifact_name The name of the artifact.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
readArtifact(
run_id: string,
node_id: string,
artifact_name: string,
options: any = {},
): FetchArgs {
// verify required parameter 'run_id' is not null or undefined
if (run_id === null || run_id === undefined) {
throw new RequiredError(
'run_id',
'Required parameter run_id was null or undefined when calling readArtifact.',
);
}
// verify required parameter 'node_id' is not null or undefined
if (node_id === null || node_id === undefined) {
throw new RequiredError(
'node_id',
'Required parameter node_id was null or undefined when calling readArtifact.',
);
}
// verify required parameter 'artifact_name' is not null or undefined
if (artifact_name === null || artifact_name === undefined) {
throw new RequiredError(
'artifact_name',
'Required parameter artifact_name was null or undefined when calling readArtifact.',
);
}
const localVarPath = `/apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read`
.replace(`{${'run_id'}}`, encodeURIComponent(String(run_id)))
.replace(`{${'node_id'}}`, encodeURIComponent(String(node_id)))
.replace(`{${'artifact_name'}}`, encodeURIComponent(String(artifact_name)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary 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.
* @param {string} run_id Required. The parent run ID of the metric.
* @param {ApiReportRunMetricsRequest} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
reportRunMetrics(
run_id: string,
body: ApiReportRunMetricsRequest,
options: any = {},
): FetchArgs {
// verify required parameter 'run_id' is not null or undefined
if (run_id === null || run_id === undefined) {
throw new RequiredError(
'run_id',
'Required parameter run_id was null or undefined when calling reportRunMetrics.',
);
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError(
'body',
'Required parameter body was null or undefined when calling reportRunMetrics.',
);
}
const localVarPath = `/apis/v1beta1/runs/{run_id}:reportMetrics`.replace(
`{${'run_id'}}`,
encodeURIComponent(String(run_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization =
<any>'ApiReportRunMetricsRequest' !== 'string' ||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Re-initiates a failed or terminated run.
* @param {string} run_id The ID of the run to be retried.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
retryRun(run_id: string, options: any = {}): FetchArgs {
// verify required parameter 'run_id' is not null or undefined
if (run_id === null || run_id === undefined) {
throw new RequiredError(
'run_id',
'Required parameter run_id was null or undefined when calling retryRun.',
);
}
const localVarPath = `/apis/v1beta1/runs/{run_id}/retry`.replace(
`{${'run_id'}}`,
encodeURIComponent(String(run_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Terminates an active run.
* @param {string} run_id The ID of the run to be terminated.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
terminateRun(run_id: string, options: any = {}): FetchArgs {
// verify required parameter 'run_id' is not null or undefined
if (run_id === null || run_id === undefined) {
throw new RequiredError(
'run_id',
'Required parameter run_id was null or undefined when calling terminateRun.',
);
}
const localVarPath = `/apis/v1beta1/runs/{run_id}/terminate`.replace(
`{${'run_id'}}`,
encodeURIComponent(String(run_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Restores an archived run.
* @param {string} id The ID of the run to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
unarchiveRun(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling unarchiveRun.',
);
}
const localVarPath = `/apis/v1beta1/runs/{id}:unarchive`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* RunServiceApi - functional programming interface
* @export
*/
export const RunServiceApiFp = function(configuration?: Configuration) {
return {
/**
*
* @summary Archives a run.
* @param {string} id The ID of the run to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveRun(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = RunServiceApiFetchParamCreator(configuration).archiveRun(
id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Creates a new run.
* @param {ApiRun} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createRun(
body: ApiRun,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiRunDetail> {
const localVarFetchArgs = RunServiceApiFetchParamCreator(configuration).createRun(
body,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Deletes a run.
* @param {string} id The ID of the run to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRun(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = RunServiceApiFetchParamCreator(configuration).deleteRun(
id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds a specific run by ID.
* @param {string} run_id The ID of the run to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRun(
run_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiRunDetail> {
const localVarFetchArgs = RunServiceApiFetchParamCreator(configuration).getRun(
run_id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds all runs.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListRuns call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of runs to be listed per page. If there are more runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" (Example, \"name asc\" or \"id desc\"). Ascending by default.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRuns(
page_token?: string,
page_size?: number,
sort_by?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
filter?: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiListRunsResponse> {
const localVarFetchArgs = RunServiceApiFetchParamCreator(configuration).listRuns(
page_token,
page_size,
sort_by,
resource_reference_key_type,
resource_reference_key_id,
filter,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds a run's artifact data.
* @param {string} run_id The ID of the run.
* @param {string} node_id The ID of the running node.
* @param {string} artifact_name The name of the artifact.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
readArtifact(
run_id: string,
node_id: string,
artifact_name: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiReadArtifactResponse> {
const localVarFetchArgs = RunServiceApiFetchParamCreator(configuration).readArtifact(
run_id,
node_id,
artifact_name,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary 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.
* @param {string} run_id Required. The parent run ID of the metric.
* @param {ApiReportRunMetricsRequest} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
reportRunMetrics(
run_id: string,
body: ApiReportRunMetricsRequest,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiReportRunMetricsResponse> {
const localVarFetchArgs = RunServiceApiFetchParamCreator(configuration).reportRunMetrics(
run_id,
body,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Re-initiates a failed or terminated run.
* @param {string} run_id The ID of the run to be retried.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
retryRun(run_id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = RunServiceApiFetchParamCreator(configuration).retryRun(
run_id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Terminates an active run.
* @param {string} run_id The ID of the run to be terminated.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
terminateRun(
run_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = RunServiceApiFetchParamCreator(configuration).terminateRun(
run_id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Restores an archived run.
* @param {string} id The ID of the run to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
unarchiveRun(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = RunServiceApiFetchParamCreator(configuration).unarchiveRun(
id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
};
};
/**
* RunServiceApi - factory interface
* @export
*/
export const RunServiceApiFactory = function(
configuration?: Configuration,
fetch?: FetchAPI,
basePath?: string,
) {
return {
/**
*
* @summary Archives a run.
* @param {string} id The ID of the run to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveRun(id: string, options?: any) {
return RunServiceApiFp(configuration).archiveRun(id, options)(fetch, basePath);
},
/**
*
* @summary Creates a new run.
* @param {ApiRun} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createRun(body: ApiRun, options?: any) {
return RunServiceApiFp(configuration).createRun(body, options)(fetch, basePath);
},
/**
*
* @summary Deletes a run.
* @param {string} id The ID of the run to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRun(id: string, options?: any) {
return RunServiceApiFp(configuration).deleteRun(id, options)(fetch, basePath);
},
/**
*
* @summary Finds a specific run by ID.
* @param {string} run_id The ID of the run to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRun(run_id: string, options?: any) {
return RunServiceApiFp(configuration).getRun(run_id, options)(fetch, basePath);
},
/**
*
* @summary Finds all runs.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListRuns call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of runs to be listed per page. If there are more runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" (Example, \"name asc\" or \"id desc\"). Ascending by default.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRuns(
page_token?: string,
page_size?: number,
sort_by?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
filter?: string,
options?: any,
) {
return RunServiceApiFp(configuration).listRuns(
page_token,
page_size,
sort_by,
resource_reference_key_type,
resource_reference_key_id,
filter,
options,
)(fetch, basePath);
},
/**
*
* @summary Finds a run's artifact data.
* @param {string} run_id The ID of the run.
* @param {string} node_id The ID of the running node.
* @param {string} artifact_name The name of the artifact.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
readArtifact(run_id: string, node_id: string, artifact_name: string, options?: any) {
return RunServiceApiFp(configuration).readArtifact(
run_id,
node_id,
artifact_name,
options,
)(fetch, basePath);
},
/**
*
* @summary 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.
* @param {string} run_id Required. The parent run ID of the metric.
* @param {ApiReportRunMetricsRequest} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
reportRunMetrics(run_id: string, body: ApiReportRunMetricsRequest, options?: any) {
return RunServiceApiFp(configuration).reportRunMetrics(
run_id,
body,
options,
)(fetch, basePath);
},
/**
*
* @summary Re-initiates a failed or terminated run.
* @param {string} run_id The ID of the run to be retried.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
retryRun(run_id: string, options?: any) {
return RunServiceApiFp(configuration).retryRun(run_id, options)(fetch, basePath);
},
/**
*
* @summary Terminates an active run.
* @param {string} run_id The ID of the run to be terminated.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
terminateRun(run_id: string, options?: any) {
return RunServiceApiFp(configuration).terminateRun(run_id, options)(fetch, basePath);
},
/**
*
* @summary Restores an archived run.
* @param {string} id The ID of the run to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
unarchiveRun(id: string, options?: any) {
return RunServiceApiFp(configuration).unarchiveRun(id, options)(fetch, basePath);
},
};
};
/**
* RunServiceApi - object-oriented interface
* @export
* @class RunServiceApi
* @extends {BaseAPI}
*/
export class RunServiceApi extends BaseAPI {
/**
*
* @summary Archives a run.
* @param {string} id The ID of the run to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunServiceApi
*/
public archiveRun(id: string, options?: any) {
return RunServiceApiFp(this.configuration).archiveRun(id, options)(this.fetch, this.basePath);
}
/**
*
* @summary Creates a new run.
* @param {ApiRun} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunServiceApi
*/
public createRun(body: ApiRun, options?: any) {
return RunServiceApiFp(this.configuration).createRun(body, options)(this.fetch, this.basePath);
}
/**
*
* @summary Deletes a run.
* @param {string} id The ID of the run to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunServiceApi
*/
public deleteRun(id: string, options?: any) {
return RunServiceApiFp(this.configuration).deleteRun(id, options)(this.fetch, this.basePath);
}
/**
*
* @summary Finds a specific run by ID.
* @param {string} run_id The ID of the run to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunServiceApi
*/
public getRun(run_id: string, options?: any) {
return RunServiceApiFp(this.configuration).getRun(run_id, options)(this.fetch, this.basePath);
}
/**
*
* @summary Finds all runs.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListRuns call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of runs to be listed per page. If there are more runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" (Example, \"name asc\" or \"id desc\"). Ascending by default.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunServiceApi
*/
public listRuns(
page_token?: string,
page_size?: number,
sort_by?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
filter?: string,
options?: any,
) {
return RunServiceApiFp(this.configuration).listRuns(
page_token,
page_size,
sort_by,
resource_reference_key_type,
resource_reference_key_id,
filter,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Finds a run's artifact data.
* @param {string} run_id The ID of the run.
* @param {string} node_id The ID of the running node.
* @param {string} artifact_name The name of the artifact.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunServiceApi
*/
public readArtifact(run_id: string, node_id: string, artifact_name: string, options?: any) {
return RunServiceApiFp(this.configuration).readArtifact(
run_id,
node_id,
artifact_name,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary 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.
* @param {string} run_id Required. The parent run ID of the metric.
* @param {ApiReportRunMetricsRequest} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunServiceApi
*/
public reportRunMetrics(run_id: string, body: ApiReportRunMetricsRequest, options?: any) {
return RunServiceApiFp(this.configuration).reportRunMetrics(
run_id,
body,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Re-initiates a failed or terminated run.
* @param {string} run_id The ID of the run to be retried.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunServiceApi
*/
public retryRun(run_id: string, options?: any) {
return RunServiceApiFp(this.configuration).retryRun(run_id, options)(this.fetch, this.basePath);
}
/**
*
* @summary Terminates an active run.
* @param {string} run_id The ID of the run to be terminated.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunServiceApi
*/
public terminateRun(run_id: string, options?: any) {
return RunServiceApiFp(this.configuration).terminateRun(run_id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Restores an archived run.
* @param {string} id The ID of the run to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunServiceApi
*/
public unarchiveRun(id: string, options?: any) {
return RunServiceApiFp(this.configuration).unarchiveRun(id, options)(this.fetch, this.basePath);
}
}
| 143 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/run/.swagger-codegen-ignore | # Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
# Ignore .gitignore
.gitignore
| 144 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/run/index.ts | // tslint:disable
/**
* backend/api/run.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export * from './api';
export * from './configuration';
| 145 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/run/custom.d.ts | declare module 'portable-fetch';
declare module 'url';
| 146 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/run/configuration.ts | // tslint:disable
/**
* backend/api/run.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => string);
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => string);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
}
}
| 147 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis/run | kubeflow_public_repos/pipelines/frontend/src/apis/run/.swagger-codegen/VERSION | 2.4.7 | 148 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/job/api.ts | /// <reference path="./custom.d.ts" />
// tslint:disable
/**
* backend/api/job.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import * as url from 'url';
import * as portableFetch from 'portable-fetch';
import { Configuration } from './configuration';
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};
/**
*
* @export
* @interface FetchAPI
*/
export interface FetchAPI {
(url: string, init?: any): Promise<Response>;
}
/**
*
* @export
* @interface FetchArgs
*/
export interface FetchArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration;
constructor(
configuration?: Configuration,
protected basePath: string = BASE_PATH,
protected fetch: FetchAPI = portableFetch,
) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: 'RequiredError';
constructor(public field: string, msg?: string) {
super(msg);
}
}
/**
*
* @export
* @interface ApiCronSchedule
*/
export interface ApiCronSchedule {
/**
*
* @type {Date}
* @memberof ApiCronSchedule
*/
start_time?: Date;
/**
*
* @type {Date}
* @memberof ApiCronSchedule
*/
end_time?: Date;
/**
*
* @type {string}
* @memberof ApiCronSchedule
*/
cron?: string;
}
/**
*
* @export
* @interface ApiJob
*/
export interface ApiJob {
/**
* Output. Unique run ID. Generated by API server.
* @type {string}
* @memberof ApiJob
*/
id?: string;
/**
* Required input field. Job name provided by user. Not unique.
* @type {string}
* @memberof ApiJob
*/
name?: string;
/**
*
* @type {string}
* @memberof ApiJob
*/
description?: string;
/**
* Required input field. Describing what the pipeline manifest and parameters to use for the scheduled job.
* @type {ApiPipelineSpec}
* @memberof ApiJob
*/
pipeline_spec?: ApiPipelineSpec;
/**
* Optional input field. Specify which resource this job belongs to.
* @type {Array<ApiResourceReference>}
* @memberof ApiJob
*/
resource_references?: Array<ApiResourceReference>;
/**
* Optional input field. Specify which Kubernetes service account this job uses.
* @type {string}
* @memberof ApiJob
*/
service_account?: string;
/**
*
* @type {string}
* @memberof ApiJob
*/
max_concurrency?: string;
/**
* Required input field. Specify how a run is triggered. Support cron mode or periodic mode.
* @type {ApiTrigger}
* @memberof ApiJob
*/
trigger?: ApiTrigger;
/**
*
* @type {JobMode}
* @memberof ApiJob
*/
mode?: JobMode;
/**
* Output. The time this job is created.
* @type {Date}
* @memberof ApiJob
*/
created_at?: Date;
/**
* Output. The last time this job is updated.
* @type {Date}
* @memberof ApiJob
*/
updated_at?: Date;
/**
*
* @type {string}
* @memberof ApiJob
*/
status?: string;
/**
* In case any error happens retrieving a job field, only job ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call.
* @type {string}
* @memberof ApiJob
*/
error?: string;
/**
* Input. Whether the job is enabled or not.
* @type {boolean}
* @memberof ApiJob
*/
enabled?: boolean;
/**
* Optional input field. Whether the job should catch up if behind schedule. If true, the job will only schedule the latest interval if behind schedule. If false, the job will catch up on each past interval.
* @type {boolean}
* @memberof ApiJob
*/
no_catchup?: boolean;
}
/**
*
* @export
* @interface ApiListJobsResponse
*/
export interface ApiListJobsResponse {
/**
* A list of jobs returned.
* @type {Array<ApiJob>}
* @memberof ApiListJobsResponse
*/
jobs?: Array<ApiJob>;
/**
* The total number of jobs for the given query.
* @type {number}
* @memberof ApiListJobsResponse
*/
total_size?: number;
/**
* The token to list the next page of jobs.
* @type {string}
* @memberof ApiListJobsResponse
*/
next_page_token?: string;
}
/**
*
* @export
* @interface ApiParameter
*/
export interface ApiParameter {
/**
*
* @type {string}
* @memberof ApiParameter
*/
name?: string;
/**
*
* @type {string}
* @memberof ApiParameter
*/
value?: string;
}
/**
*
* @export
* @interface ApiPeriodicSchedule
*/
export interface ApiPeriodicSchedule {
/**
*
* @type {Date}
* @memberof ApiPeriodicSchedule
*/
start_time?: Date;
/**
*
* @type {Date}
* @memberof ApiPeriodicSchedule
*/
end_time?: Date;
/**
*
* @type {string}
* @memberof ApiPeriodicSchedule
*/
interval_second?: string;
}
/**
*
* @export
* @interface ApiPipelineSpec
*/
export interface ApiPipelineSpec {
/**
* Optional input field. The ID of the pipeline user uploaded before.
* @type {string}
* @memberof ApiPipelineSpec
*/
pipeline_id?: string;
/**
* Optional output field. The name of the pipeline. Not empty if the pipeline id is not empty.
* @type {string}
* @memberof ApiPipelineSpec
*/
pipeline_name?: string;
/**
* Optional input field. The marshalled raw argo JSON workflow. This will be deprecated when pipeline_manifest is in use.
* @type {string}
* @memberof ApiPipelineSpec
*/
workflow_manifest?: string;
/**
* Optional input field. The raw pipeline JSON spec.
* @type {string}
* @memberof ApiPipelineSpec
*/
pipeline_manifest?: string;
/**
*
* @type {Array<ApiParameter>}
* @memberof ApiPipelineSpec
*/
parameters?: Array<ApiParameter>;
/**
*
* @type {PipelineSpecRuntimeConfig}
* @memberof ApiPipelineSpec
*/
runtime_config?: PipelineSpecRuntimeConfig;
}
/**
*
* @export
* @enum {string}
*/
export enum ApiRelationship {
UNKNOWNRELATIONSHIP = <any>'UNKNOWN_RELATIONSHIP',
OWNER = <any>'OWNER',
CREATOR = <any>'CREATOR',
}
/**
*
* @export
* @interface ApiResourceKey
*/
export interface ApiResourceKey {
/**
* The type of the resource that referred to.
* @type {ApiResourceType}
* @memberof ApiResourceKey
*/
type?: ApiResourceType;
/**
* The ID of the resource that referred to.
* @type {string}
* @memberof ApiResourceKey
*/
id?: string;
}
/**
*
* @export
* @interface ApiResourceReference
*/
export interface ApiResourceReference {
/**
*
* @type {ApiResourceKey}
* @memberof ApiResourceReference
*/
key?: ApiResourceKey;
/**
* The name of the resource that referred to.
* @type {string}
* @memberof ApiResourceReference
*/
name?: string;
/**
* Required field. The relationship from referred resource to the object.
* @type {ApiRelationship}
* @memberof ApiResourceReference
*/
relationship?: ApiRelationship;
}
/**
*
* @export
* @enum {string}
*/
export enum ApiResourceType {
UNKNOWNRESOURCETYPE = <any>'UNKNOWN_RESOURCE_TYPE',
EXPERIMENT = <any>'EXPERIMENT',
JOB = <any>'JOB',
PIPELINE = <any>'PIPELINE',
PIPELINEVERSION = <any>'PIPELINE_VERSION',
NAMESPACE = <any>'NAMESPACE',
}
/**
*
* @export
* @interface ApiStatus
*/
export interface ApiStatus {
/**
*
* @type {string}
* @memberof ApiStatus
*/
error?: string;
/**
*
* @type {number}
* @memberof ApiStatus
*/
code?: number;
/**
*
* @type {Array<ProtobufAny>}
* @memberof ApiStatus
*/
details?: Array<ProtobufAny>;
}
/**
* Trigger defines what starts a pipeline run.
* @export
* @interface ApiTrigger
*/
export interface ApiTrigger {
/**
*
* @type {ApiCronSchedule}
* @memberof ApiTrigger
*/
cron_schedule?: ApiCronSchedule;
/**
*
* @type {ApiPeriodicSchedule}
* @memberof ApiTrigger
*/
periodic_schedule?: ApiPeriodicSchedule;
}
/**
* Required input. - DISABLED: The job won't schedule any run if disabled.
* @export
* @enum {string}
*/
export enum JobMode {
UNKNOWNMODE = <any>'UNKNOWN_MODE',
ENABLED = <any>'ENABLED',
DISABLED = <any>'DISABLED',
}
/**
* The runtime config of a PipelineSpec.
* @export
* @interface PipelineSpecRuntimeConfig
*/
export interface PipelineSpecRuntimeConfig {
/**
* The runtime parameters of the PipelineSpec. The parameters will be used to replace the placeholders at runtime.
* @type {{ [key: string]: any; }}
* @memberof PipelineSpecRuntimeConfig
*/
parameters?: { [key: string]: any };
/**
*
* @type {string}
* @memberof PipelineSpecRuntimeConfig
*/
pipeline_root?: string;
}
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
* @export
* @interface ProtobufAny
*/
export interface ProtobufAny {
/**
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
* @type {string}
* @memberof ProtobufAny
*/
type_url?: string;
/**
* Must be a valid serialized protocol buffer of the above specified type.
* @type {string}
* @memberof ProtobufAny
*/
value?: string;
}
/**
* `NullValue` is a singleton enumeration to represent the null value for the `Value` type union. The JSON representation for `NullValue` is JSON `null`. - NULL_VALUE: Null value.
* @export
* @enum {string}
*/
export enum ProtobufNullValue {
NULLVALUE = <any>'NULL_VALUE',
}
/**
* JobServiceApi - fetch parameter creator
* @export
*/
export const JobServiceApiFetchParamCreator = function(configuration?: Configuration) {
return {
/**
*
* @summary Creates a new job.
* @param {ApiJob} body The job to be created
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createJob(body: ApiJob, options: any = {}): FetchArgs {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError(
'body',
'Required parameter body was null or undefined when calling createJob.',
);
}
const localVarPath = `/apis/v1beta1/jobs`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization =
<any>'ApiJob' !== 'string' ||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Deletes a job.
* @param {string} id The ID of the job to be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteJob(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling deleteJob.',
);
}
const localVarPath = `/apis/v1beta1/jobs/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Stops a job and all its associated runs. The job is not deleted.
* @param {string} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
disableJob(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling disableJob.',
);
}
const localVarPath = `/apis/v1beta1/jobs/{id}/disable`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Restarts a job that was previously stopped. All runs associated with the job will continue.
* @param {string} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
enableJob(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling enableJob.',
);
}
const localVarPath = `/apis/v1beta1/jobs/{id}/enable`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds a specific job by ID.
* @param {string} id The ID of the job to be retrieved
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getJob(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling getJob.',
);
}
const localVarPath = `/apis/v1beta1/jobs/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds all jobs.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListJobs call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of jobs to be listed per page. If there are more jobs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listJobs(
page_token?: string,
page_size?: number,
sort_by?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
filter?: string,
options: any = {},
): FetchArgs {
const localVarPath = `/apis/v1beta1/jobs`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
if (page_token !== undefined) {
localVarQueryParameter['page_token'] = page_token;
}
if (page_size !== undefined) {
localVarQueryParameter['page_size'] = page_size;
}
if (sort_by !== undefined) {
localVarQueryParameter['sort_by'] = sort_by;
}
if (resource_reference_key_type !== undefined) {
localVarQueryParameter['resource_reference_key.type'] = resource_reference_key_type;
}
if (resource_reference_key_id !== undefined) {
localVarQueryParameter['resource_reference_key.id'] = resource_reference_key_id;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* JobServiceApi - functional programming interface
* @export
*/
export const JobServiceApiFp = function(configuration?: Configuration) {
return {
/**
*
* @summary Creates a new job.
* @param {ApiJob} body The job to be created
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createJob(
body: ApiJob,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiJob> {
const localVarFetchArgs = JobServiceApiFetchParamCreator(configuration).createJob(
body,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Deletes a job.
* @param {string} id The ID of the job to be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteJob(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = JobServiceApiFetchParamCreator(configuration).deleteJob(
id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Stops a job and all its associated runs. The job is not deleted.
* @param {string} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
disableJob(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = JobServiceApiFetchParamCreator(configuration).disableJob(
id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Restarts a job that was previously stopped. All runs associated with the job will continue.
* @param {string} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
enableJob(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = JobServiceApiFetchParamCreator(configuration).enableJob(
id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds a specific job by ID.
* @param {string} id The ID of the job to be retrieved
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getJob(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ApiJob> {
const localVarFetchArgs = JobServiceApiFetchParamCreator(configuration).getJob(id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds all jobs.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListJobs call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of jobs to be listed per page. If there are more jobs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listJobs(
page_token?: string,
page_size?: number,
sort_by?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
filter?: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiListJobsResponse> {
const localVarFetchArgs = JobServiceApiFetchParamCreator(configuration).listJobs(
page_token,
page_size,
sort_by,
resource_reference_key_type,
resource_reference_key_id,
filter,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
};
};
/**
* JobServiceApi - factory interface
* @export
*/
export const JobServiceApiFactory = function(
configuration?: Configuration,
fetch?: FetchAPI,
basePath?: string,
) {
return {
/**
*
* @summary Creates a new job.
* @param {ApiJob} body The job to be created
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createJob(body: ApiJob, options?: any) {
return JobServiceApiFp(configuration).createJob(body, options)(fetch, basePath);
},
/**
*
* @summary Deletes a job.
* @param {string} id The ID of the job to be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteJob(id: string, options?: any) {
return JobServiceApiFp(configuration).deleteJob(id, options)(fetch, basePath);
},
/**
*
* @summary Stops a job and all its associated runs. The job is not deleted.
* @param {string} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
disableJob(id: string, options?: any) {
return JobServiceApiFp(configuration).disableJob(id, options)(fetch, basePath);
},
/**
*
* @summary Restarts a job that was previously stopped. All runs associated with the job will continue.
* @param {string} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
enableJob(id: string, options?: any) {
return JobServiceApiFp(configuration).enableJob(id, options)(fetch, basePath);
},
/**
*
* @summary Finds a specific job by ID.
* @param {string} id The ID of the job to be retrieved
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getJob(id: string, options?: any) {
return JobServiceApiFp(configuration).getJob(id, options)(fetch, basePath);
},
/**
*
* @summary Finds all jobs.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListJobs call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of jobs to be listed per page. If there are more jobs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listJobs(
page_token?: string,
page_size?: number,
sort_by?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
filter?: string,
options?: any,
) {
return JobServiceApiFp(configuration).listJobs(
page_token,
page_size,
sort_by,
resource_reference_key_type,
resource_reference_key_id,
filter,
options,
)(fetch, basePath);
},
};
};
/**
* JobServiceApi - object-oriented interface
* @export
* @class JobServiceApi
* @extends {BaseAPI}
*/
export class JobServiceApi extends BaseAPI {
/**
*
* @summary Creates a new job.
* @param {ApiJob} body The job to be created
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceApi
*/
public createJob(body: ApiJob, options?: any) {
return JobServiceApiFp(this.configuration).createJob(body, options)(this.fetch, this.basePath);
}
/**
*
* @summary Deletes a job.
* @param {string} id The ID of the job to be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceApi
*/
public deleteJob(id: string, options?: any) {
return JobServiceApiFp(this.configuration).deleteJob(id, options)(this.fetch, this.basePath);
}
/**
*
* @summary Stops a job and all its associated runs. The job is not deleted.
* @param {string} id The ID of the job to be disabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceApi
*/
public disableJob(id: string, options?: any) {
return JobServiceApiFp(this.configuration).disableJob(id, options)(this.fetch, this.basePath);
}
/**
*
* @summary Restarts a job that was previously stopped. All runs associated with the job will continue.
* @param {string} id The ID of the job to be enabled
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceApi
*/
public enableJob(id: string, options?: any) {
return JobServiceApiFp(this.configuration).enableJob(id, options)(this.fetch, this.basePath);
}
/**
*
* @summary Finds a specific job by ID.
* @param {string} id The ID of the job to be retrieved
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceApi
*/
public getJob(id: string, options?: any) {
return JobServiceApiFp(this.configuration).getJob(id, options)(this.fetch, this.basePath);
}
/**
*
* @summary Finds all jobs.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListJobs call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of jobs to be listed per page. If there are more jobs than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\". Ascending by default.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof JobServiceApi
*/
public listJobs(
page_token?: string,
page_size?: number,
sort_by?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
filter?: string,
options?: any,
) {
return JobServiceApiFp(this.configuration).listJobs(
page_token,
page_size,
sort_by,
resource_reference_key_type,
resource_reference_key_id,
filter,
options,
)(this.fetch, this.basePath);
}
}
| 149 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/job/.swagger-codegen-ignore | # Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
# Ignore .gitignore
.gitignore
| 150 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/job/index.ts | // tslint:disable
/**
* backend/api/job.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export * from './api';
export * from './configuration';
| 151 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/job/custom.d.ts | declare module 'portable-fetch';
declare module 'url';
| 152 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/job/configuration.ts | // tslint:disable
/**
* backend/api/job.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => string);
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => string);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
}
}
| 153 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis/job | kubeflow_public_repos/pipelines/frontend/src/apis/job/.swagger-codegen/VERSION | 2.4.7 | 154 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/visualization/api.ts | /// <reference path="./custom.d.ts" />
// tslint:disable
/**
* backend/api/visualization.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import * as url from 'url';
import * as portableFetch from 'portable-fetch';
import { Configuration } from './configuration';
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};
/**
*
* @export
* @interface FetchAPI
*/
export interface FetchAPI {
(url: string, init?: any): Promise<Response>;
}
/**
*
* @export
* @interface FetchArgs
*/
export interface FetchArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration;
constructor(
configuration?: Configuration,
protected basePath: string = BASE_PATH,
protected fetch: FetchAPI = portableFetch,
) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: 'RequiredError';
constructor(public field: string, msg?: string) {
super(msg);
}
}
/**
*
* @export
* @interface ApiStatus
*/
export interface ApiStatus {
/**
*
* @type {string}
* @memberof ApiStatus
*/
error?: string;
/**
*
* @type {number}
* @memberof ApiStatus
*/
code?: number;
/**
*
* @type {Array<ProtobufAny>}
* @memberof ApiStatus
*/
details?: Array<ProtobufAny>;
}
/**
*
* @export
* @interface ApiVisualization
*/
export interface ApiVisualization {
/**
*
* @type {ApiVisualizationType}
* @memberof ApiVisualization
*/
type?: ApiVisualizationType;
/**
* Path pattern of input data to be used during generation of visualizations. This is required when creating the pipeline through CreateVisualization API.
* @type {string}
* @memberof ApiVisualization
*/
source?: string;
/**
* Variables to be used during generation of a visualization. This should be provided as a JSON string. This is required when creating the pipeline through CreateVisualization API.
* @type {string}
* @memberof ApiVisualization
*/
arguments?: string;
/**
* Output. Generated visualization html.
* @type {string}
* @memberof ApiVisualization
*/
html?: string;
/**
* In case any error happens when generating visualizations, only visualization ID and the error message are returned. Client has the flexibility of choosing how to handle the error.
* @type {string}
* @memberof ApiVisualization
*/
error?: string;
}
/**
* Type of visualization to be generated. This is required when creating the pipeline through CreateVisualization API.
* @export
* @enum {string}
*/
export enum ApiVisualizationType {
ROCCURVE = <any>'ROC_CURVE',
TFDV = <any>'TFDV',
TFMA = <any>'TFMA',
TABLE = <any>'TABLE',
CUSTOM = <any>'CUSTOM',
}
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
* @export
* @interface ProtobufAny
*/
export interface ProtobufAny {
/**
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
* @type {string}
* @memberof ProtobufAny
*/
type_url?: string;
/**
* Must be a valid serialized protocol buffer of the above specified type.
* @type {string}
* @memberof ProtobufAny
*/
value?: string;
}
/**
* VisualizationServiceApi - fetch parameter creator
* @export
*/
export const VisualizationServiceApiFetchParamCreator = function(configuration?: Configuration) {
return {
/**
*
* @param {string} namespace
* @param {ApiVisualization} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createVisualization(namespace: string, body: ApiVisualization, options: any = {}): FetchArgs {
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new RequiredError(
'namespace',
'Required parameter namespace was null or undefined when calling createVisualization.',
);
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError(
'body',
'Required parameter body was null or undefined when calling createVisualization.',
);
}
const localVarPath = `/apis/v1beta1/visualizations/{namespace}`.replace(
`{${'namespace'}}`,
encodeURIComponent(String(namespace)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization =
<any>'ApiVisualization' !== 'string' ||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* VisualizationServiceApi - functional programming interface
* @export
*/
export const VisualizationServiceApiFp = function(configuration?: Configuration) {
return {
/**
*
* @param {string} namespace
* @param {ApiVisualization} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createVisualization(
namespace: string,
body: ApiVisualization,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiVisualization> {
const localVarFetchArgs = VisualizationServiceApiFetchParamCreator(
configuration,
).createVisualization(namespace, body, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
};
};
/**
* VisualizationServiceApi - factory interface
* @export
*/
export const VisualizationServiceApiFactory = function(
configuration?: Configuration,
fetch?: FetchAPI,
basePath?: string,
) {
return {
/**
*
* @param {string} namespace
* @param {ApiVisualization} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createVisualization(namespace: string, body: ApiVisualization, options?: any) {
return VisualizationServiceApiFp(configuration).createVisualization(
namespace,
body,
options,
)(fetch, basePath);
},
};
};
/**
* VisualizationServiceApi - object-oriented interface
* @export
* @class VisualizationServiceApi
* @extends {BaseAPI}
*/
export class VisualizationServiceApi extends BaseAPI {
/**
*
* @param {string} namespace
* @param {ApiVisualization} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof VisualizationServiceApi
*/
public createVisualization(namespace: string, body: ApiVisualization, options?: any) {
return VisualizationServiceApiFp(this.configuration).createVisualization(
namespace,
body,
options,
)(this.fetch, this.basePath);
}
}
| 155 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/visualization/.swagger-codegen-ignore | # Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
| 156 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/visualization/git_push.sh | #!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
git_user_id=$1
git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'
| 157 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/visualization/index.ts | // tslint:disable
/**
* backend/api/visualization.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export * from './api';
export * from './configuration';
| 158 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/visualization/custom.d.ts | declare module 'portable-fetch';
declare module 'url';
| 159 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/visualization/configuration.ts | // tslint:disable
/**
* backend/api/visualization.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => string);
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => string);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
}
}
| 160 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis/visualization | kubeflow_public_repos/pipelines/frontend/src/apis/visualization/.swagger-codegen/VERSION | 2.4.7 | 161 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/filter/api.ts | /// <reference path="./custom.d.ts" />
// tslint:disable
/**
* backend/api/filter.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import * as url from 'url';
import * as portableFetch from 'portable-fetch';
import { Configuration } from './configuration';
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};
/**
*
* @export
* @interface FetchAPI
*/
export interface FetchAPI {
(url: string, init?: any): Promise<Response>;
}
/**
*
* @export
* @interface FetchArgs
*/
export interface FetchArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration;
constructor(
configuration?: Configuration,
protected basePath: string = BASE_PATH,
protected fetch: FetchAPI = portableFetch,
) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: 'RequiredError';
constructor(public field: string, msg?: string) {
super(msg);
}
}
/**
* Filter is used to filter resources returned from a ListXXX request. Example filters: 1) Filter runs with status = 'Running' filter { predicate { key: \"status\" op: EQUALS string_value: \"Running\" } } 2) Filter runs that succeeded since Dec 1, 2018 filter { predicate { key: \"status\" op: EQUALS string_value: \"Succeeded\" } predicate { key: \"created_at\" op: GREATER_THAN timestamp_value { seconds: 1543651200 } } } 3) Filter runs with one of labels 'label_1' or 'label_2' filter { predicate { key: \"label\" op: IN string_values { value: 'label_1' value: 'label_2' } } }
* @export
* @interface ApiFilter
*/
export interface ApiFilter {
/**
* All predicates are AND-ed when this filter is applied.
* @type {Array<ApiPredicate>}
* @memberof ApiFilter
*/
predicates?: Array<ApiPredicate>;
}
/**
*
* @export
* @interface ApiIntValues
*/
export interface ApiIntValues {
/**
*
* @type {Array<number>}
* @memberof ApiIntValues
*/
values?: Array<number>;
}
/**
*
* @export
* @interface ApiLongValues
*/
export interface ApiLongValues {
/**
*
* @type {Array<string>}
* @memberof ApiLongValues
*/
values?: Array<string>;
}
/**
* Predicate captures individual conditions that must be true for a resource being filtered.
* @export
* @interface ApiPredicate
*/
export interface ApiPredicate {
/**
*
* @type {PredicateOp}
* @memberof ApiPredicate
*/
op?: PredicateOp;
/**
*
* @type {string}
* @memberof ApiPredicate
*/
key?: string;
/**
*
* @type {number}
* @memberof ApiPredicate
*/
int_value?: number;
/**
*
* @type {string}
* @memberof ApiPredicate
*/
long_value?: string;
/**
*
* @type {string}
* @memberof ApiPredicate
*/
string_value?: string;
/**
* Timestamp values will be converted to Unix time (seconds since the epoch) prior to being used in a filtering operation.
* @type {Date}
* @memberof ApiPredicate
*/
timestamp_value?: Date;
/**
* Array values below are only meant to be used by the IN operator.
* @type {ApiIntValues}
* @memberof ApiPredicate
*/
int_values?: ApiIntValues;
/**
*
* @type {ApiLongValues}
* @memberof ApiPredicate
*/
long_values?: ApiLongValues;
/**
*
* @type {ApiStringValues}
* @memberof ApiPredicate
*/
string_values?: ApiStringValues;
}
/**
*
* @export
* @interface ApiStringValues
*/
export interface ApiStringValues {
/**
*
* @type {Array<string>}
* @memberof ApiStringValues
*/
values?: Array<string>;
}
/**
* Op is the operation to apply. - EQUALS: Operators on scalar values. Only applies to one of |int_value|, |long_value|, |string_value| or |timestamp_value|. - IN: Checks if the value is a member of a given array, which should be one of |int_values|, |long_values| or |string_values|. - IS_SUBSTRING: Checks if the value contains |string_value| as a substring match. Only applies to |string_value|.
* @export
* @enum {string}
*/
export enum PredicateOp {
UNKNOWN = <any>'UNKNOWN',
EQUALS = <any>'EQUALS',
NOTEQUALS = <any>'NOT_EQUALS',
GREATERTHAN = <any>'GREATER_THAN',
GREATERTHANEQUALS = <any>'GREATER_THAN_EQUALS',
LESSTHAN = <any>'LESS_THAN',
LESSTHANEQUALS = <any>'LESS_THAN_EQUALS',
IN = <any>'IN',
ISSUBSTRING = <any>'IS_SUBSTRING',
}
| 162 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/filter/.swagger-codegen-ignore | # Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
| 163 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/filter/git_push.sh | #!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
git_user_id=$1
git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'
| 164 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/filter/index.ts | // tslint:disable
/**
* backend/api/filter.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export * from './api';
export * from './configuration';
| 165 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/filter/custom.d.ts | declare module 'portable-fetch';
declare module 'url';
| 166 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/filter/configuration.ts | // tslint:disable
/**
* backend/api/filter.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => string);
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => string);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
}
}
| 167 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis/filter | kubeflow_public_repos/pipelines/frontend/src/apis/filter/.swagger-codegen/VERSION | 2.4.7 | 168 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/experiment/api.ts | /// <reference path="./custom.d.ts" />
// tslint:disable
/**
* backend/api/experiment.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import * as url from 'url';
import * as portableFetch from 'portable-fetch';
import { Configuration } from './configuration';
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};
/**
*
* @export
* @interface FetchAPI
*/
export interface FetchAPI {
(url: string, init?: any): Promise<Response>;
}
/**
*
* @export
* @interface FetchArgs
*/
export interface FetchArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration;
constructor(
configuration?: Configuration,
protected basePath: string = BASE_PATH,
protected fetch: FetchAPI = portableFetch,
) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: 'RequiredError';
constructor(public field: string, msg?: string) {
super(msg);
}
}
/**
*
* @export
* @interface ApiExperiment
*/
export interface ApiExperiment {
/**
* Output. Unique experiment ID. Generated by API server.
* @type {string}
* @memberof ApiExperiment
*/
id?: string;
/**
* Required input field. Unique experiment name provided by user.
* @type {string}
* @memberof ApiExperiment
*/
name?: string;
/**
*
* @type {string}
* @memberof ApiExperiment
*/
description?: string;
/**
* Output. The time that the experiment created.
* @type {Date}
* @memberof ApiExperiment
*/
created_at?: Date;
/**
* Optional input field. Specify which resource this run belongs to. For Experiment, the only valid resource reference is a single Namespace.
* @type {Array<ApiResourceReference>}
* @memberof ApiExperiment
*/
resource_references?: Array<ApiResourceReference>;
/**
* Output. Specifies whether this experiment is in archived or available state.
* @type {ApiExperimentStorageState}
* @memberof ApiExperiment
*/
storage_state?: ApiExperimentStorageState;
}
/**
*
* @export
* @enum {string}
*/
export enum ApiExperimentStorageState {
UNSPECIFIED = <any>'STORAGESTATE_UNSPECIFIED',
AVAILABLE = <any>'STORAGESTATE_AVAILABLE',
ARCHIVED = <any>'STORAGESTATE_ARCHIVED',
}
/**
*
* @export
* @interface ApiListExperimentsResponse
*/
export interface ApiListExperimentsResponse {
/**
* A list of experiments returned.
* @type {Array<ApiExperiment>}
* @memberof ApiListExperimentsResponse
*/
experiments?: Array<ApiExperiment>;
/**
* The total number of experiments for the given query.
* @type {number}
* @memberof ApiListExperimentsResponse
*/
total_size?: number;
/**
* The token to list the next page of experiments.
* @type {string}
* @memberof ApiListExperimentsResponse
*/
next_page_token?: string;
}
/**
*
* @export
* @enum {string}
*/
export enum ApiRelationship {
UNKNOWNRELATIONSHIP = <any>'UNKNOWN_RELATIONSHIP',
OWNER = <any>'OWNER',
CREATOR = <any>'CREATOR',
}
/**
*
* @export
* @interface ApiResourceKey
*/
export interface ApiResourceKey {
/**
* The type of the resource that referred to.
* @type {ApiResourceType}
* @memberof ApiResourceKey
*/
type?: ApiResourceType;
/**
* The ID of the resource that referred to.
* @type {string}
* @memberof ApiResourceKey
*/
id?: string;
}
/**
*
* @export
* @interface ApiResourceReference
*/
export interface ApiResourceReference {
/**
*
* @type {ApiResourceKey}
* @memberof ApiResourceReference
*/
key?: ApiResourceKey;
/**
* The name of the resource that referred to.
* @type {string}
* @memberof ApiResourceReference
*/
name?: string;
/**
* Required field. The relationship from referred resource to the object.
* @type {ApiRelationship}
* @memberof ApiResourceReference
*/
relationship?: ApiRelationship;
}
/**
*
* @export
* @enum {string}
*/
export enum ApiResourceType {
UNKNOWNRESOURCETYPE = <any>'UNKNOWN_RESOURCE_TYPE',
EXPERIMENT = <any>'EXPERIMENT',
JOB = <any>'JOB',
PIPELINE = <any>'PIPELINE',
PIPELINEVERSION = <any>'PIPELINE_VERSION',
NAMESPACE = <any>'NAMESPACE',
}
/**
*
* @export
* @interface ApiStatus
*/
export interface ApiStatus {
/**
*
* @type {string}
* @memberof ApiStatus
*/
error?: string;
/**
*
* @type {number}
* @memberof ApiStatus
*/
code?: number;
/**
*
* @type {Array<ProtobufAny>}
* @memberof ApiStatus
*/
details?: Array<ProtobufAny>;
}
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
* @export
* @interface ProtobufAny
*/
export interface ProtobufAny {
/**
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
* @type {string}
* @memberof ProtobufAny
*/
type_url?: string;
/**
* Must be a valid serialized protocol buffer of the above specified type.
* @type {string}
* @memberof ProtobufAny
*/
value?: string;
}
/**
* ExperimentServiceApi - fetch parameter creator
* @export
*/
export const ExperimentServiceApiFetchParamCreator = function(configuration?: Configuration) {
return {
/**
*
* @summary Archives an experiment and the experiment's runs and jobs.
* @param {string} id The ID of the experiment to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveExperiment(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling archiveExperiment.',
);
}
const localVarPath = `/apis/v1beta1/experiments/{id}:archive`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Creates a new experiment.
* @param {ApiExperiment} body The experiment to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createExperiment(body: ApiExperiment, options: any = {}): FetchArgs {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError(
'body',
'Required parameter body was null or undefined when calling createExperiment.',
);
}
const localVarPath = `/apis/v1beta1/experiments`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization =
<any>'ApiExperiment' !== 'string' ||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Deletes an experiment without deleting the experiment's runs and jobs. To avoid unexpected behaviors, delete an experiment's runs and jobs before deleting the experiment.
* @param {string} id The ID of the experiment to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExperiment(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling deleteExperiment.',
);
}
const localVarPath = `/apis/v1beta1/experiments/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds a specific experiment by ID.
* @param {string} id The ID of the experiment to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExperiment(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling getExperiment.',
);
}
const localVarPath = `/apis/v1beta1/experiments/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listExperiment(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
options: any = {},
): FetchArgs {
const localVarPath = `/apis/v1beta1/experiments`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
if (page_token !== undefined) {
localVarQueryParameter['page_token'] = page_token;
}
if (page_size !== undefined) {
localVarQueryParameter['page_size'] = page_size;
}
if (sort_by !== undefined) {
localVarQueryParameter['sort_by'] = sort_by;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (resource_reference_key_type !== undefined) {
localVarQueryParameter['resource_reference_key.type'] = resource_reference_key_type;
}
if (resource_reference_key_id !== undefined) {
localVarQueryParameter['resource_reference_key.id'] = resource_reference_key_id;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Restores an archived experiment. The experiment's archived runs and jobs will stay archived.
* @param {string} id The ID of the experiment to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
unarchiveExperiment(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling unarchiveExperiment.',
);
}
const localVarPath = `/apis/v1beta1/experiments/{id}:unarchive`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* ExperimentServiceApi - functional programming interface
* @export
*/
export const ExperimentServiceApiFp = function(configuration?: Configuration) {
return {
/**
*
* @summary Archives an experiment and the experiment's runs and jobs.
* @param {string} id The ID of the experiment to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveExperiment(
id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
configuration,
).archiveExperiment(id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Creates a new experiment.
* @param {ApiExperiment} body The experiment to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createExperiment(
body: ApiExperiment,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiExperiment> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
configuration,
).createExperiment(body, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Deletes an experiment without deleting the experiment's runs and jobs. To avoid unexpected behaviors, delete an experiment's runs and jobs before deleting the experiment.
* @param {string} id The ID of the experiment to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExperiment(
id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
configuration,
).deleteExperiment(id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds a specific experiment by ID.
* @param {string} id The ID of the experiment to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExperiment(
id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiExperiment> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(configuration).getExperiment(
id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listExperiment(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiListExperimentsResponse> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(configuration).listExperiment(
page_token,
page_size,
sort_by,
filter,
resource_reference_key_type,
resource_reference_key_id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Restores an archived experiment. The experiment's archived runs and jobs will stay archived.
* @param {string} id The ID of the experiment to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
unarchiveExperiment(
id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = ExperimentServiceApiFetchParamCreator(
configuration,
).unarchiveExperiment(id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
};
};
/**
* ExperimentServiceApi - factory interface
* @export
*/
export const ExperimentServiceApiFactory = function(
configuration?: Configuration,
fetch?: FetchAPI,
basePath?: string,
) {
return {
/**
*
* @summary Archives an experiment and the experiment's runs and jobs.
* @param {string} id The ID of the experiment to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
archiveExperiment(id: string, options?: any) {
return ExperimentServiceApiFp(configuration).archiveExperiment(id, options)(fetch, basePath);
},
/**
*
* @summary Creates a new experiment.
* @param {ApiExperiment} body The experiment to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createExperiment(body: ApiExperiment, options?: any) {
return ExperimentServiceApiFp(configuration).createExperiment(body, options)(fetch, basePath);
},
/**
*
* @summary Deletes an experiment without deleting the experiment's runs and jobs. To avoid unexpected behaviors, delete an experiment's runs and jobs before deleting the experiment.
* @param {string} id The ID of the experiment to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteExperiment(id: string, options?: any) {
return ExperimentServiceApiFp(configuration).deleteExperiment(id, options)(fetch, basePath);
},
/**
*
* @summary Finds a specific experiment by ID.
* @param {string} id The ID of the experiment to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getExperiment(id: string, options?: any) {
return ExperimentServiceApiFp(configuration).getExperiment(id, options)(fetch, basePath);
},
/**
*
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listExperiment(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
options?: any,
) {
return ExperimentServiceApiFp(configuration).listExperiment(
page_token,
page_size,
sort_by,
filter,
resource_reference_key_type,
resource_reference_key_id,
options,
)(fetch, basePath);
},
/**
*
* @summary Restores an archived experiment. The experiment's archived runs and jobs will stay archived.
* @param {string} id The ID of the experiment to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
unarchiveExperiment(id: string, options?: any) {
return ExperimentServiceApiFp(configuration).unarchiveExperiment(id, options)(
fetch,
basePath,
);
},
};
};
/**
* ExperimentServiceApi - object-oriented interface
* @export
* @class ExperimentServiceApi
* @extends {BaseAPI}
*/
export class ExperimentServiceApi extends BaseAPI {
/**
*
* @summary Archives an experiment and the experiment's runs and jobs.
* @param {string} id The ID of the experiment to be archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public archiveExperiment(id: string, options?: any) {
return ExperimentServiceApiFp(this.configuration).archiveExperiment(id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Creates a new experiment.
* @param {ApiExperiment} body The experiment to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public createExperiment(body: ApiExperiment, options?: any) {
return ExperimentServiceApiFp(this.configuration).createExperiment(body, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Deletes an experiment without deleting the experiment's runs and jobs. To avoid unexpected behaviors, delete an experiment's runs and jobs before deleting the experiment.
* @param {string} id The ID of the experiment to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public deleteExperiment(id: string, options?: any) {
return ExperimentServiceApiFp(this.configuration).deleteExperiment(id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Finds a specific experiment by ID.
* @param {string} id The ID of the experiment to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public getExperiment(id: string, options?: any) {
return ExperimentServiceApiFp(this.configuration).getExperiment(id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Finds all experiments. Supports pagination, and sorting on certain fields.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page.
* @param {number} [page_size] The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public listExperiment(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
options?: any,
) {
return ExperimentServiceApiFp(this.configuration).listExperiment(
page_token,
page_size,
sort_by,
filter,
resource_reference_key_type,
resource_reference_key_id,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Restores an archived experiment. The experiment's archived runs and jobs will stay archived.
* @param {string} id The ID of the experiment to be restored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ExperimentServiceApi
*/
public unarchiveExperiment(id: string, options?: any) {
return ExperimentServiceApiFp(this.configuration).unarchiveExperiment(id, options)(
this.fetch,
this.basePath,
);
}
}
| 169 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/experiment/.swagger-codegen-ignore | # Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
# Ignore .gitignore
.gitignore
| 170 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/experiment/index.ts | // tslint:disable
/**
* backend/api/experiment.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export * from './api';
export * from './configuration';
| 171 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/experiment/custom.d.ts | declare module 'portable-fetch';
declare module 'url';
| 172 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/experiment/configuration.ts | // tslint:disable
/**
* backend/api/experiment.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => string);
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => string);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
}
}
| 173 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis/experiment | kubeflow_public_repos/pipelines/frontend/src/apis/experiment/.swagger-codegen/VERSION | 2.4.7 | 174 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/pipeline/api.ts | /// <reference path="./custom.d.ts" />
// tslint:disable
/**
* backend/api/pipeline.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import * as url from 'url';
import * as portableFetch from 'portable-fetch';
import { Configuration } from './configuration';
const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};
/**
*
* @export
* @interface FetchAPI
*/
export interface FetchAPI {
(url: string, init?: any): Promise<Response>;
}
/**
*
* @export
* @interface FetchArgs
*/
export interface FetchArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration;
constructor(
configuration?: Configuration,
protected basePath: string = BASE_PATH,
protected fetch: FetchAPI = portableFetch,
) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: 'RequiredError';
constructor(public field: string, msg?: string) {
super(msg);
}
}
/**
*
* @export
* @interface ApiGetTemplateResponse
*/
export interface ApiGetTemplateResponse {
/**
* The template of the pipeline specified in a GetTemplate request, or of a pipeline version specified in a GetPipelinesVersionTemplate request.
* @type {string}
* @memberof ApiGetTemplateResponse
*/
template?: string;
}
/**
*
* @export
* @interface ApiListPipelineVersionsResponse
*/
export interface ApiListPipelineVersionsResponse {
/**
*
* @type {Array<ApiPipelineVersion>}
* @memberof ApiListPipelineVersionsResponse
*/
versions?: Array<ApiPipelineVersion>;
/**
* The token to list the next page of pipeline versions.
* @type {string}
* @memberof ApiListPipelineVersionsResponse
*/
next_page_token?: string;
/**
* The total number of pipeline versions for the given query.
* @type {number}
* @memberof ApiListPipelineVersionsResponse
*/
total_size?: number;
}
/**
*
* @export
* @interface ApiListPipelinesResponse
*/
export interface ApiListPipelinesResponse {
/**
*
* @type {Array<ApiPipeline>}
* @memberof ApiListPipelinesResponse
*/
pipelines?: Array<ApiPipeline>;
/**
* The total number of pipelines for the given query.
* @type {number}
* @memberof ApiListPipelinesResponse
*/
total_size?: number;
/**
* The token to list the next page of pipelines.
* @type {string}
* @memberof ApiListPipelinesResponse
*/
next_page_token?: string;
}
/**
*
* @export
* @interface ApiParameter
*/
export interface ApiParameter {
/**
*
* @type {string}
* @memberof ApiParameter
*/
name?: string;
/**
*
* @type {string}
* @memberof ApiParameter
*/
value?: string;
}
/**
*
* @export
* @interface ApiPipeline
*/
export interface ApiPipeline {
/**
* Output. Unique pipeline ID. Generated by API server.
* @type {string}
* @memberof ApiPipeline
*/
id?: string;
/**
* Output. The time this pipeline is created.
* @type {Date}
* @memberof ApiPipeline
*/
created_at?: Date;
/**
* Optional input field. Pipeline name provided by user. If not specified, file name is used as pipeline name.
* @type {string}
* @memberof ApiPipeline
*/
name?: string;
/**
* Optional input field. Describing the purpose of the job.
* @type {string}
* @memberof ApiPipeline
*/
description?: string;
/**
* Output. The input parameters for this pipeline. TODO(jingzhang36): replace this parameters field with the parameters field inside PipelineVersion when all usage of the former has been changed to use the latter.
* @type {Array<ApiParameter>}
* @memberof ApiPipeline
*/
parameters?: Array<ApiParameter>;
/**
* The URL to the source of the pipeline. This is required when creating the pipeine through CreatePipeline API. TODO(jingzhang36): replace this url field with the code_source_urls field inside PipelineVersion when all usage of the former has been changed to use the latter.
* @type {ApiUrl}
* @memberof ApiPipeline
*/
url?: ApiUrl;
/**
* In case any error happens retrieving a pipeline field, only pipeline ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call.
* @type {string}
* @memberof ApiPipeline
*/
error?: string;
/**
*
* @type {ApiPipelineVersion}
* @memberof ApiPipeline
*/
default_version?: ApiPipelineVersion;
/**
* Input field. Specify which resource this pipeline belongs to. For Pipeline, the only valid resource reference is a single Namespace.
* @type {Array<ApiResourceReference>}
* @memberof ApiPipeline
*/
resource_references?: Array<ApiResourceReference>;
}
/**
*
* @export
* @interface ApiPipelineVersion
*/
export interface ApiPipelineVersion {
/**
* Output. Unique version ID. Generated by API server.
* @type {string}
* @memberof ApiPipelineVersion
*/
id?: string;
/**
* Optional input field. Version name provided by user.
* @type {string}
* @memberof ApiPipelineVersion
*/
name?: string;
/**
* Output. The time this pipeline version is created.
* @type {Date}
* @memberof ApiPipelineVersion
*/
created_at?: Date;
/**
* Output. The input parameters for this pipeline.
* @type {Array<ApiParameter>}
* @memberof ApiPipelineVersion
*/
parameters?: Array<ApiParameter>;
/**
* Input. Optional. Pipeline version code source.
* @type {string}
* @memberof ApiPipelineVersion
*/
code_source_url?: string;
/**
* Input. Required. Pipeline version package url. Whe calling CreatePipelineVersion API method, need to provide one package file location.
* @type {ApiUrl}
* @memberof ApiPipelineVersion
*/
package_url?: ApiUrl;
/**
* Input field. Specify which resource this pipeline version belongs to. For Experiment, the only valid resource reference is a single Namespace.
* @type {Array<ApiResourceReference>}
* @memberof ApiPipelineVersion
*/
resource_references?: Array<ApiResourceReference>;
/**
* Input. Optional. Description for the pipeline version.
* @type {string}
* @memberof ApiPipelineVersion
*/
description?: string;
}
/**
*
* @export
* @enum {string}
*/
export enum ApiRelationship {
UNKNOWNRELATIONSHIP = <any>'UNKNOWN_RELATIONSHIP',
OWNER = <any>'OWNER',
CREATOR = <any>'CREATOR',
}
/**
*
* @export
* @interface ApiResourceKey
*/
export interface ApiResourceKey {
/**
* The type of the resource that referred to.
* @type {ApiResourceType}
* @memberof ApiResourceKey
*/
type?: ApiResourceType;
/**
* The ID of the resource that referred to.
* @type {string}
* @memberof ApiResourceKey
*/
id?: string;
}
/**
*
* @export
* @interface ApiResourceReference
*/
export interface ApiResourceReference {
/**
*
* @type {ApiResourceKey}
* @memberof ApiResourceReference
*/
key?: ApiResourceKey;
/**
* The name of the resource that referred to.
* @type {string}
* @memberof ApiResourceReference
*/
name?: string;
/**
* Required field. The relationship from referred resource to the object.
* @type {ApiRelationship}
* @memberof ApiResourceReference
*/
relationship?: ApiRelationship;
}
/**
*
* @export
* @enum {string}
*/
export enum ApiResourceType {
UNKNOWNRESOURCETYPE = <any>'UNKNOWN_RESOURCE_TYPE',
EXPERIMENT = <any>'EXPERIMENT',
JOB = <any>'JOB',
PIPELINE = <any>'PIPELINE',
PIPELINEVERSION = <any>'PIPELINE_VERSION',
NAMESPACE = <any>'NAMESPACE',
}
/**
*
* @export
* @interface ApiStatus
*/
export interface ApiStatus {
/**
*
* @type {string}
* @memberof ApiStatus
*/
error?: string;
/**
*
* @type {number}
* @memberof ApiStatus
*/
code?: number;
/**
*
* @type {Array<ProtobufAny>}
* @memberof ApiStatus
*/
details?: Array<ProtobufAny>;
}
/**
*
* @export
* @interface ApiUrl
*/
export interface ApiUrl {
/**
* URL of the pipeline definition or the pipeline version definition.
* @type {string}
* @memberof ApiUrl
*/
pipeline_url?: string;
}
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
* @export
* @interface ProtobufAny
*/
export interface ProtobufAny {
/**
* A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
* @type {string}
* @memberof ProtobufAny
*/
type_url?: string;
/**
* Must be a valid serialized protocol buffer of the above specified type.
* @type {string}
* @memberof ProtobufAny
*/
value?: string;
}
/**
* PipelineServiceApi - fetch parameter creator
* @export
*/
export const PipelineServiceApiFetchParamCreator = function(configuration?: Configuration) {
return {
/**
*
* @summary Creates a pipeline.
* @param {ApiPipeline} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipeline(body: ApiPipeline, options: any = {}): FetchArgs {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError(
'body',
'Required parameter body was null or undefined when calling createPipeline.',
);
}
const localVarPath = `/apis/v1beta1/pipelines`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization =
<any>'ApiPipeline' !== 'string' ||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Adds a pipeline version to the specified pipeline.
* @param {ApiPipelineVersion} body ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipelineVersion(body: ApiPipelineVersion, options: any = {}): FetchArgs {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError(
'body',
'Required parameter body was null or undefined when calling createPipelineVersion.',
);
}
const localVarPath = `/apis/v1beta1/pipeline_versions`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
const needsSerialization =
<any>'ApiPipelineVersion' !== 'string' ||
localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '';
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Deletes a pipeline and its pipeline versions.
* @param {string} id The ID of the pipeline to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipeline(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling deletePipeline.',
);
}
const localVarPath = `/apis/v1beta1/pipelines/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Deletes a pipeline version by pipeline version ID. If the deleted pipeline version is the default pipeline version, the pipeline's default version changes to the pipeline's most recent pipeline version. If there are no remaining pipeline versions, the pipeline will have no default version. Examines the run_service_api.ipynb notebook to learn more about creating a run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb).
* @param {string} version_id The ID of the pipeline version to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipelineVersion(version_id: string, options: any = {}): FetchArgs {
// verify required parameter 'version_id' is not null or undefined
if (version_id === null || version_id === undefined) {
throw new RequiredError(
'version_id',
'Required parameter version_id was null or undefined when calling deletePipelineVersion.',
);
}
const localVarPath = `/apis/v1beta1/pipeline_versions/{version_id}`.replace(
`{${'version_id'}}`,
encodeURIComponent(String(version_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds a specific pipeline by ID.
* @param {string} id The ID of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipeline(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling getPipeline.',
);
}
const localVarPath = `/apis/v1beta1/pipelines/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds a pipeline by Name (and namespace)
* @param {string} namespace The Namespace the pipeline belongs to. In the case of shared pipelines and KFPipeline standalone installation, the pipeline name is the only needed field for unique resource lookup (namespace is not required). In those case, please provide hyphen (dash character, \"-\").
* @param {string} name The Name of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineByName(namespace: string, name: string, options: any = {}): FetchArgs {
// verify required parameter 'namespace' is not null or undefined
if (namespace === null || namespace === undefined) {
throw new RequiredError(
'namespace',
'Required parameter namespace was null or undefined when calling getPipelineByName.',
);
}
// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new RequiredError(
'name',
'Required parameter name was null or undefined when calling getPipelineByName.',
);
}
const localVarPath = `/apis/v1beta1/namespaces/{namespace}/pipelines/{name}`
.replace(`{${'namespace'}}`, encodeURIComponent(String(namespace)))
.replace(`{${'name'}}`, encodeURIComponent(String(name)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Gets a pipeline version by pipeline version ID.
* @param {string} version_id The ID of the pipeline version to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineVersion(version_id: string, options: any = {}): FetchArgs {
// verify required parameter 'version_id' is not null or undefined
if (version_id === null || version_id === undefined) {
throw new RequiredError(
'version_id',
'Required parameter version_id was null or undefined when calling getPipelineVersion.',
);
}
const localVarPath = `/apis/v1beta1/pipeline_versions/{version_id}`.replace(
`{${'version_id'}}`,
encodeURIComponent(String(version_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Returns a YAML template that contains the specified pipeline version's description, parameters and metadata.
* @param {string} version_id The ID of the pipeline version whose template is to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineVersionTemplate(version_id: string, options: any = {}): FetchArgs {
// verify required parameter 'version_id' is not null or undefined
if (version_id === null || version_id === undefined) {
throw new RequiredError(
'version_id',
'Required parameter version_id was null or undefined when calling getPipelineVersionTemplate.',
);
}
const localVarPath = `/apis/v1beta1/pipeline_versions/{version_id}/templates`.replace(
`{${'version_id'}}`,
encodeURIComponent(String(version_id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided.
* @param {string} id The ID of the pipeline whose template is to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTemplate(id: string, options: any = {}): FetchArgs {
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new RequiredError(
'id',
'Required parameter id was null or undefined when calling getTemplate.',
);
}
const localVarPath = `/apis/v1beta1/pipelines/{id}/templates`.replace(
`{${'id'}}`,
encodeURIComponent(String(id)),
);
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Lists all pipeline versions of a given pipeline.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_key_type] The type of the resource that referred to.
* @param {string} [resource_key_id] The ID of the resource that referred to.
* @param {number} [page_size] The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelineVersions call or can be omitted when fetching the first page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A base-64 encoded, JSON-serialized Filter protocol buffer (see filter.proto).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelineVersions(
resource_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_key_id?: string,
page_size?: number,
page_token?: string,
sort_by?: string,
filter?: string,
options: any = {},
): FetchArgs {
const localVarPath = `/apis/v1beta1/pipeline_versions`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
if (resource_key_type !== undefined) {
localVarQueryParameter['resource_key.type'] = resource_key_type;
}
if (resource_key_id !== undefined) {
localVarQueryParameter['resource_key.id'] = resource_key_id;
}
if (page_size !== undefined) {
localVarQueryParameter['page_size'] = page_size;
}
if (page_token !== undefined) {
localVarQueryParameter['page_token'] = page_token;
}
if (sort_by !== undefined) {
localVarQueryParameter['sort_by'] = sort_by;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Finds all pipelines.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call.
* @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelines(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
options: any = {},
): FetchArgs {
const localVarPath = `/apis/v1beta1/pipelines`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
if (page_token !== undefined) {
localVarQueryParameter['page_token'] = page_token;
}
if (page_size !== undefined) {
localVarQueryParameter['page_size'] = page_size;
}
if (sort_by !== undefined) {
localVarQueryParameter['sort_by'] = sort_by;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (resource_reference_key_type !== undefined) {
localVarQueryParameter['resource_reference_key.type'] = resource_reference_key_type;
}
if (resource_reference_key_id !== undefined) {
localVarQueryParameter['resource_reference_key.id'] = resource_reference_key_id;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Update the default pipeline version of a specific pipeline.
* @param {string} pipeline_id The ID of the pipeline to be updated.
* @param {string} version_id The ID of the default version.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updatePipelineDefaultVersion(
pipeline_id: string,
version_id: string,
options: any = {},
): FetchArgs {
// verify required parameter 'pipeline_id' is not null or undefined
if (pipeline_id === null || pipeline_id === undefined) {
throw new RequiredError(
'pipeline_id',
'Required parameter pipeline_id was null or undefined when calling updatePipelineDefaultVersion.',
);
}
// verify required parameter 'version_id' is not null or undefined
if (version_id === null || version_id === undefined) {
throw new RequiredError(
'version_id',
'Required parameter version_id was null or undefined when calling updatePipelineDefaultVersion.',
);
}
const localVarPath = `/apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}`
.replace(`{${'pipeline_id'}}`, encodeURIComponent(String(pipeline_id)))
.replace(`{${'version_id'}}`, encodeURIComponent(String(version_id)));
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication Bearer required
if (configuration && configuration.apiKey) {
const localVarApiKeyValue =
typeof configuration.apiKey === 'function'
? configuration.apiKey('authorization')
: configuration.apiKey;
localVarHeaderParameter['authorization'] = localVarApiKeyValue;
}
localVarUrlObj.query = Object.assign(
{},
localVarUrlObj.query,
localVarQueryParameter,
options.query,
);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* PipelineServiceApi - functional programming interface
* @export
*/
export const PipelineServiceApiFp = function(configuration?: Configuration) {
return {
/**
*
* @summary Creates a pipeline.
* @param {ApiPipeline} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipeline(
body: ApiPipeline,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiPipeline> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(configuration).createPipeline(
body,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Adds a pipeline version to the specified pipeline.
* @param {ApiPipelineVersion} body ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipelineVersion(
body: ApiPipelineVersion,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiPipelineVersion> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).createPipelineVersion(body, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Deletes a pipeline and its pipeline versions.
* @param {string} id The ID of the pipeline to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipeline(
id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(configuration).deletePipeline(
id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Deletes a pipeline version by pipeline version ID. If the deleted pipeline version is the default pipeline version, the pipeline's default version changes to the pipeline's most recent pipeline version. If there are no remaining pipeline versions, the pipeline will have no default version. Examines the run_service_api.ipynb notebook to learn more about creating a run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb).
* @param {string} version_id The ID of the pipeline version to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipelineVersion(
version_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).deletePipelineVersion(version_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds a specific pipeline by ID.
* @param {string} id The ID of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipeline(
id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiPipeline> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(configuration).getPipeline(
id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds a pipeline by Name (and namespace)
* @param {string} namespace The Namespace the pipeline belongs to. In the case of shared pipelines and KFPipeline standalone installation, the pipeline name is the only needed field for unique resource lookup (namespace is not required). In those case, please provide hyphen (dash character, \"-\").
* @param {string} name The Name of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineByName(
namespace: string,
name: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiPipeline> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).getPipelineByName(namespace, name, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Gets a pipeline version by pipeline version ID.
* @param {string} version_id The ID of the pipeline version to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineVersion(
version_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiPipelineVersion> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).getPipelineVersion(version_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Returns a YAML template that contains the specified pipeline version's description, parameters and metadata.
* @param {string} version_id The ID of the pipeline version whose template is to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineVersionTemplate(
version_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiGetTemplateResponse> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).getPipelineVersionTemplate(version_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided.
* @param {string} id The ID of the pipeline whose template is to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTemplate(
id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiGetTemplateResponse> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(configuration).getTemplate(
id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Lists all pipeline versions of a given pipeline.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_key_type] The type of the resource that referred to.
* @param {string} [resource_key_id] The ID of the resource that referred to.
* @param {number} [page_size] The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelineVersions call or can be omitted when fetching the first page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A base-64 encoded, JSON-serialized Filter protocol buffer (see filter.proto).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelineVersions(
resource_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_key_id?: string,
page_size?: number,
page_token?: string,
sort_by?: string,
filter?: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiListPipelineVersionsResponse> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).listPipelineVersions(
resource_key_type,
resource_key_id,
page_size,
page_token,
sort_by,
filter,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Finds all pipelines.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call.
* @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelines(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<ApiListPipelinesResponse> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(configuration).listPipelines(
page_token,
page_size,
sort_by,
filter,
resource_reference_key_type,
resource_reference_key_id,
options,
);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
/**
*
* @summary Update the default pipeline version of a specific pipeline.
* @param {string} pipeline_id The ID of the pipeline to be updated.
* @param {string} version_id The ID of the default version.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updatePipelineDefaultVersion(
pipeline_id: string,
version_id: string,
options?: any,
): (fetch?: FetchAPI, basePath?: string) => Promise<any> {
const localVarFetchArgs = PipelineServiceApiFetchParamCreator(
configuration,
).updatePipelineDefaultVersion(pipeline_id, version_id, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(response => {
if (response.status >= 200 && response.status < 300) {
return response.json();
} else {
throw response;
}
});
};
},
};
};
/**
* PipelineServiceApi - factory interface
* @export
*/
export const PipelineServiceApiFactory = function(
configuration?: Configuration,
fetch?: FetchAPI,
basePath?: string,
) {
return {
/**
*
* @summary Creates a pipeline.
* @param {ApiPipeline} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipeline(body: ApiPipeline, options?: any) {
return PipelineServiceApiFp(configuration).createPipeline(body, options)(fetch, basePath);
},
/**
*
* @summary Adds a pipeline version to the specified pipeline.
* @param {ApiPipelineVersion} body ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPipelineVersion(body: ApiPipelineVersion, options?: any) {
return PipelineServiceApiFp(configuration).createPipelineVersion(body, options)(
fetch,
basePath,
);
},
/**
*
* @summary Deletes a pipeline and its pipeline versions.
* @param {string} id The ID of the pipeline to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipeline(id: string, options?: any) {
return PipelineServiceApiFp(configuration).deletePipeline(id, options)(fetch, basePath);
},
/**
*
* @summary Deletes a pipeline version by pipeline version ID. If the deleted pipeline version is the default pipeline version, the pipeline's default version changes to the pipeline's most recent pipeline version. If there are no remaining pipeline versions, the pipeline will have no default version. Examines the run_service_api.ipynb notebook to learn more about creating a run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb).
* @param {string} version_id The ID of the pipeline version to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipelineVersion(version_id: string, options?: any) {
return PipelineServiceApiFp(configuration).deletePipelineVersion(version_id, options)(
fetch,
basePath,
);
},
/**
*
* @summary Finds a specific pipeline by ID.
* @param {string} id The ID of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipeline(id: string, options?: any) {
return PipelineServiceApiFp(configuration).getPipeline(id, options)(fetch, basePath);
},
/**
*
* @summary Finds a pipeline by Name (and namespace)
* @param {string} namespace The Namespace the pipeline belongs to. In the case of shared pipelines and KFPipeline standalone installation, the pipeline name is the only needed field for unique resource lookup (namespace is not required). In those case, please provide hyphen (dash character, \"-\").
* @param {string} name The Name of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineByName(namespace: string, name: string, options?: any) {
return PipelineServiceApiFp(configuration).getPipelineByName(
namespace,
name,
options,
)(fetch, basePath);
},
/**
*
* @summary Gets a pipeline version by pipeline version ID.
* @param {string} version_id The ID of the pipeline version to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineVersion(version_id: string, options?: any) {
return PipelineServiceApiFp(configuration).getPipelineVersion(version_id, options)(
fetch,
basePath,
);
},
/**
*
* @summary Returns a YAML template that contains the specified pipeline version's description, parameters and metadata.
* @param {string} version_id The ID of the pipeline version whose template is to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPipelineVersionTemplate(version_id: string, options?: any) {
return PipelineServiceApiFp(configuration).getPipelineVersionTemplate(version_id, options)(
fetch,
basePath,
);
},
/**
*
* @summary Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided.
* @param {string} id The ID of the pipeline whose template is to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTemplate(id: string, options?: any) {
return PipelineServiceApiFp(configuration).getTemplate(id, options)(fetch, basePath);
},
/**
*
* @summary Lists all pipeline versions of a given pipeline.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_key_type] The type of the resource that referred to.
* @param {string} [resource_key_id] The ID of the resource that referred to.
* @param {number} [page_size] The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelineVersions call or can be omitted when fetching the first page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A base-64 encoded, JSON-serialized Filter protocol buffer (see filter.proto).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelineVersions(
resource_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_key_id?: string,
page_size?: number,
page_token?: string,
sort_by?: string,
filter?: string,
options?: any,
) {
return PipelineServiceApiFp(configuration).listPipelineVersions(
resource_key_type,
resource_key_id,
page_size,
page_token,
sort_by,
filter,
options,
)(fetch, basePath);
},
/**
*
* @summary Finds all pipelines.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call.
* @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listPipelines(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
options?: any,
) {
return PipelineServiceApiFp(configuration).listPipelines(
page_token,
page_size,
sort_by,
filter,
resource_reference_key_type,
resource_reference_key_id,
options,
)(fetch, basePath);
},
/**
*
* @summary Update the default pipeline version of a specific pipeline.
* @param {string} pipeline_id The ID of the pipeline to be updated.
* @param {string} version_id The ID of the default version.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updatePipelineDefaultVersion(pipeline_id: string, version_id: string, options?: any) {
return PipelineServiceApiFp(configuration).updatePipelineDefaultVersion(
pipeline_id,
version_id,
options,
)(fetch, basePath);
},
};
};
/**
* PipelineServiceApi - object-oriented interface
* @export
* @class PipelineServiceApi
* @extends {BaseAPI}
*/
export class PipelineServiceApi extends BaseAPI {
/**
*
* @summary Creates a pipeline.
* @param {ApiPipeline} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public createPipeline(body: ApiPipeline, options?: any) {
return PipelineServiceApiFp(this.configuration).createPipeline(body, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Adds a pipeline version to the specified pipeline.
* @param {ApiPipelineVersion} body ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public createPipelineVersion(body: ApiPipelineVersion, options?: any) {
return PipelineServiceApiFp(this.configuration).createPipelineVersion(body, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Deletes a pipeline and its pipeline versions.
* @param {string} id The ID of the pipeline to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public deletePipeline(id: string, options?: any) {
return PipelineServiceApiFp(this.configuration).deletePipeline(id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Deletes a pipeline version by pipeline version ID. If the deleted pipeline version is the default pipeline version, the pipeline's default version changes to the pipeline's most recent pipeline version. If there are no remaining pipeline versions, the pipeline will have no default version. Examines the run_service_api.ipynb notebook to learn more about creating a run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb).
* @param {string} version_id The ID of the pipeline version to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public deletePipelineVersion(version_id: string, options?: any) {
return PipelineServiceApiFp(this.configuration).deletePipelineVersion(version_id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Finds a specific pipeline by ID.
* @param {string} id The ID of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public getPipeline(id: string, options?: any) {
return PipelineServiceApiFp(this.configuration).getPipeline(id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Finds a pipeline by Name (and namespace)
* @param {string} namespace The Namespace the pipeline belongs to. In the case of shared pipelines and KFPipeline standalone installation, the pipeline name is the only needed field for unique resource lookup (namespace is not required). In those case, please provide hyphen (dash character, \"-\").
* @param {string} name The Name of the pipeline to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public getPipelineByName(namespace: string, name: string, options?: any) {
return PipelineServiceApiFp(this.configuration).getPipelineByName(
namespace,
name,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Gets a pipeline version by pipeline version ID.
* @param {string} version_id The ID of the pipeline version to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public getPipelineVersion(version_id: string, options?: any) {
return PipelineServiceApiFp(this.configuration).getPipelineVersion(version_id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Returns a YAML template that contains the specified pipeline version's description, parameters and metadata.
* @param {string} version_id The ID of the pipeline version whose template is to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public getPipelineVersionTemplate(version_id: string, options?: any) {
return PipelineServiceApiFp(this.configuration).getPipelineVersionTemplate(version_id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided.
* @param {string} id The ID of the pipeline whose template is to be retrieved.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public getTemplate(id: string, options?: any) {
return PipelineServiceApiFp(this.configuration).getTemplate(id, options)(
this.fetch,
this.basePath,
);
}
/**
*
* @summary Lists all pipeline versions of a given pipeline.
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_key_type] The type of the resource that referred to.
* @param {string} [resource_key_id] The ID of the resource that referred to.
* @param {number} [page_size] The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a nextPageToken field you can use to fetch the next page.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelineVersions call or can be omitted when fetching the first page.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A base-64 encoded, JSON-serialized Filter protocol buffer (see filter.proto).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public listPipelineVersions(
resource_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_key_id?: string,
page_size?: number,
page_token?: string,
sort_by?: string,
filter?: string,
options?: any,
) {
return PipelineServiceApiFp(this.configuration).listPipelineVersions(
resource_key_type,
resource_key_id,
page_size,
page_token,
sort_by,
filter,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Finds all pipelines.
* @param {string} [page_token] A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call.
* @param {number} [page_size] The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field.
* @param {string} [sort_by] Can be format of \"field_name\", \"field_name asc\" or \"field_name desc\" Ascending by default.
* @param {string} [filter] A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
* @param {'UNKNOWN_RESOURCE_TYPE' | 'EXPERIMENT' | 'JOB' | 'PIPELINE' | 'PIPELINE_VERSION' | 'NAMESPACE'} [resource_reference_key_type] The type of the resource that referred to.
* @param {string} [resource_reference_key_id] The ID of the resource that referred to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public listPipelines(
page_token?: string,
page_size?: number,
sort_by?: string,
filter?: string,
resource_reference_key_type?:
| 'UNKNOWN_RESOURCE_TYPE'
| 'EXPERIMENT'
| 'JOB'
| 'PIPELINE'
| 'PIPELINE_VERSION'
| 'NAMESPACE',
resource_reference_key_id?: string,
options?: any,
) {
return PipelineServiceApiFp(this.configuration).listPipelines(
page_token,
page_size,
sort_by,
filter,
resource_reference_key_type,
resource_reference_key_id,
options,
)(this.fetch, this.basePath);
}
/**
*
* @summary Update the default pipeline version of a specific pipeline.
* @param {string} pipeline_id The ID of the pipeline to be updated.
* @param {string} version_id The ID of the default version.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PipelineServiceApi
*/
public updatePipelineDefaultVersion(pipeline_id: string, version_id: string, options?: any) {
return PipelineServiceApiFp(this.configuration).updatePipelineDefaultVersion(
pipeline_id,
version_id,
options,
)(this.fetch, this.basePath);
}
}
| 175 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/pipeline/.swagger-codegen-ignore | # Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
# Ignore .gitignore
.gitignore
| 176 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/pipeline/index.ts | // tslint:disable
/**
* backend/api/pipeline.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export * from './api';
export * from './configuration';
| 177 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/pipeline/custom.d.ts | declare module 'portable-fetch';
declare module 'url';
| 178 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis | kubeflow_public_repos/pipelines/frontend/src/apis/pipeline/configuration.ts | // tslint:disable
/**
* backend/api/pipeline.proto
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: version not set
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => string);
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => string);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
}
}
| 179 |
0 | kubeflow_public_repos/pipelines/frontend/src/apis/pipeline | kubeflow_public_repos/pipelines/frontend/src/apis/pipeline/.swagger-codegen/VERSION | 2.4.7 | 180 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/Separator.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
type Orientation = 'horizontal' | 'vertical';
interface SeparatorProps {
orientation?: Orientation;
units?: number;
}
const style = (orientation: Orientation, units: number) => {
return orientation === 'horizontal'
? {
display: 'inline-block',
minWidth: units,
width: units,
}
: {
display: 'block',
flexShrink: 0,
height: units,
minHeight: units,
};
};
const Separator = (props: SeparatorProps) => (
<span style={style(props.orientation || 'horizontal', props.units || 10)} />
);
export default Separator;
| 181 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/ExternalLink.tsx | /**
* Copyright 2021 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { DetailedHTMLProps, AnchorHTMLAttributes } from 'react';
import { stylesheet } from 'typestyle';
import { color } from '../Css';
import { classes } from 'typestyle';
const css = stylesheet({
link: {
$nest: {
'&:hover': {
textDecoration: 'underline',
},
},
color: color.theme,
textDecoration: 'none',
wordBreak: 'break-all', // Links do not need to break at words.
},
});
export const ExternalLink: React.FC<DetailedHTMLProps<
AnchorHTMLAttributes<HTMLAnchorElement>,
HTMLAnchorElement
>> = props => (
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a {...props} className={classes(css.link, props.className)} target='_blank' rel='noopener' />
);
export const AutoLink: React.FC<DetailedHTMLProps<
AnchorHTMLAttributes<HTMLAnchorElement>,
HTMLAnchorElement
>> = props =>
props.href && props.href.startsWith('#') ? (
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a {...props} className={classes(css.link, props.className)} />
) : (
<ExternalLink {...props} />
);
| 182 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/MD2Tabs.test.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import MD2Tabs from './MD2Tabs';
import toJson from 'enzyme-to-json';
import { logger } from '../lib/Utils';
import { shallow, mount } from 'enzyme';
describe('Input', () => {
const buttonSelector = 'WithStyles(Button)';
it('renders with the right styles by default', () => {
const tree = shallow(<MD2Tabs tabs={['tab1', 'tab2']} selectedTab={0} />);
expect(toJson(tree)).toMatchSnapshot();
});
it('does not try to call the onSwitch handler if it is not defined', () => {
const tree = shallow(<MD2Tabs tabs={['tab1', 'tab2']} selectedTab={0} />);
tree
.find(buttonSelector)
.at(1)
.simulate('click');
});
it('calls the onSwitch function if an unselected button is clicked', () => {
const switchHandler = jest.fn();
const tree = shallow(
<MD2Tabs tabs={['tab1', 'tab2']} selectedTab={0} onSwitch={switchHandler} />,
);
tree
.find(buttonSelector)
.at(1)
.simulate('click');
expect(switchHandler).toHaveBeenCalled();
});
it('does not the onSwitch function if the already selected button is clicked', () => {
const switchHandler = jest.fn();
const tree = shallow(
<MD2Tabs tabs={['tab1', 'tab2']} selectedTab={1} onSwitch={switchHandler} />,
);
tree
.find(buttonSelector)
.at(1)
.simulate('click');
expect(switchHandler).not.toHaveBeenCalled();
});
it('gracefully handles an out of bound selectedTab value', () => {
logger.error = jest.fn();
const tree = mount(<MD2Tabs tabs={['tab1', 'tab2']} selectedTab={100} />);
(tree.instance() as any)._updateIndicator();
expect(toJson(tree)).toMatchSnapshot();
});
it('recalculates indicator styles when props are updated', () => {
const spy = jest.fn();
jest.useFakeTimers();
jest.spyOn(MD2Tabs.prototype as any, '_updateIndicator').mockImplementationOnce(spy);
const tree = mount(<MD2Tabs tabs={['tab1', 'tab2']} selectedTab={0} />);
tree.instance().componentDidUpdate!({}, {});
jest.runAllTimers();
expect(spy).toHaveBeenCalled();
});
});
| 183 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/Input.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import TextField, { OutlinedTextFieldProps } from '@material-ui/core/TextField';
import { commonCss } from '../Css';
interface InputProps extends OutlinedTextFieldProps {
height?: number | string;
maxWidth?: number | string;
width?: number;
}
const Input = (props: InputProps) => {
const { height, maxWidth, variant, width, ...rest } = props;
return (
<TextField
variant={variant}
className={commonCss.textField}
spellCheck={false}
style={{
height: !!props.multiline ? 'auto' : height || 40,
maxWidth: maxWidth || 600,
width: width || '100%',
}}
{...rest}
>
{props.children}
</TextField>
);
};
export default Input;
| 184 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/ErrorBoundary.tsx | /*
* Copyright 2021 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
interface ErrorBoundaryState {
error: any;
errorInfo: any;
}
export class ErrorBoundary extends React.Component<Readonly<{}>, ErrorBoundaryState> {
constructor(props: Readonly<Readonly<{}>>) {
super(props);
this.state = { error: null, errorInfo: null };
}
componentDidCatch(error: any, errorInfo: any) {
this.setState({
error: error,
errorInfo: errorInfo,
});
}
render() {
if (this.state.errorInfo) {
// Error path
return (
<div>
<h2>Something went wrong.</h2>
<details style={{ whiteSpace: 'pre-wrap' }}>
{this.state.error && this.state.error.toString()}
<br />
{this.state.errorInfo.componentStack}
</details>
</div>
);
}
// Normally, just render children
return this.props.children;
}
}
| 185 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/Separator.test.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import Separator from './Separator';
import toJson from 'enzyme-to-json';
import { shallow } from 'enzyme';
describe('Separator', () => {
it('renders with the right styles by default', () => {
const tree = shallow(<Separator />);
expect(toJson(tree)).toMatchSnapshot();
});
it('renders with the specified orientation', () => {
const tree = shallow(<Separator orientation='vertical' />);
expect(toJson(tree)).toMatchSnapshot();
});
it('renders with the specified units', () => {
const tree = shallow(<Separator units={123} />);
expect(toJson(tree)).toMatchSnapshot();
});
});
| 186 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/Input.test.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import Input from './Input';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
describe('Input', () => {
const handleChange = jest.fn();
const value = 'some input value';
it('renders with the right styles by default', () => {
const tree = shallow(
<Input onChange={handleChange('fieldname')} value={value} variant='outlined' />,
);
expect(toJson(tree)).toMatchSnapshot();
});
it('accepts height and width as prop overrides', () => {
const tree = shallow(
<Input
height={123}
width={456}
onChange={handleChange('fieldname')}
value={value}
variant='outlined'
/>,
);
expect(toJson(tree)).toMatchSnapshot();
});
});
| 187 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/BusyButton.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import Button, { ButtonProps } from '@material-ui/core/Button';
import CircularProgress from '@material-ui/core/CircularProgress';
import { stylesheet, classes } from 'typestyle';
const css = stylesheet({
icon: {
height: 20,
marginRight: 4,
width: 20,
},
root: {
cursor: 'pointer',
marginBottom: 2, // To prevent container from flickering as the spinner shows up
position: 'relative',
transition: 'padding 0.3s',
},
rootBusy: {
cursor: 'default',
paddingRight: 35,
},
spinner: {
opacity: 0,
position: 'absolute',
right: '0.8em',
transition: 'all 0.3s',
},
spinnerBusy: {
opacity: 1,
},
});
interface BusyButtonProps extends ButtonProps {
title: string;
icon?: any;
busy?: boolean;
outlined?: boolean;
}
class BusyButton extends React.Component<BusyButtonProps> {
public render(): JSX.Element {
const { title, busy, className, disabled, icon, outlined, ...rest } = this.props;
return (
<Button
{...rest}
color={outlined ? 'primary' : 'secondary'}
className={classes(css.root, busy && css.rootBusy, className)}
disabled={busy || disabled}
>
{!!icon && <this.props.icon className={css.icon} />}
<span>{title}</span>
{busy === true && (
<CircularProgress size={15} className={classes(css.spinner, busy && css.spinnerBusy)} />
)}
</Button>
);
}
}
export default BusyButton;
| 188 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/IconWithTooltip.test.tsx | /*
* Copyright 2019 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import IconWithTooltip from './IconWithTooltip';
import TestIcon from '@material-ui/icons/Help';
import { create } from 'react-test-renderer';
describe('IconWithTooltip', () => {
it('renders without height or weight', () => {
const tree = create(
<IconWithTooltip Icon={TestIcon} iconColor='green' tooltip='test icon tooltip' />,
);
expect(tree).toMatchSnapshot();
});
it('renders with height and weight', () => {
const tree = create(
<IconWithTooltip
Icon={TestIcon}
height={20}
width={20}
iconColor='green'
tooltip='test icon tooltip'
/>,
);
expect(tree).toMatchSnapshot();
});
});
| 189 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/CardTooltip.tsx | /*
* Copyright 2020 Arrikto Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import { withStyles } from '@material-ui/core/styles';
import Tooltip from '@material-ui/core/Tooltip';
import React, { ReactNode } from 'react';
import { color, fontsize } from '../Css';
const NostyleTooltip = withStyles({
tooltip: {
backgroundColor: 'transparent',
border: '0 none',
color: color.secondaryText,
fontSize: fontsize.base,
maxWidth: 220,
},
})(Tooltip);
interface CardTooltipProps {
helpText?: ReactNode;
children: React.ReactElement;
}
export const CardTooltip: React.FC<CardTooltipProps> = props => {
return (
<NostyleTooltip
title={
<Card>
<CardContent>{props.helpText}</CardContent>
</Card>
}
interactive={true}
leaveDelay={400}
placement='top'
>
{props.children}
</NostyleTooltip>
);
};
| 190 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/HelpButton.tsx | /**
* Copyright 2021 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import IconButton from '@material-ui/core/IconButton';
import HelpIcon from '@material-ui/icons/Help';
import React, { ReactNode } from 'react';
import { CardTooltip } from './CardTooltip';
interface HelpButtonProps {
helpText?: ReactNode;
}
export const HelpButton: React.FC<HelpButtonProps> = ({ helpText }) => {
return (
<CardTooltip helpText={helpText}>
<IconButton>
<HelpIcon />
</IconButton>
</CardTooltip>
);
};
| 191 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/MD2Tabs.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import Button from '@material-ui/core/Button';
import Tooltip from '@material-ui/core/Tooltip';
import Separator from './Separator';
import { color, fontsize } from '../Css';
import { classes, stylesheet } from 'typestyle';
import { logger } from '../lib/Utils';
interface MD2TabsProps {
onSwitch?: (tab: number) => void;
selectedTab: number;
tabs: (string | { header: string; tooltip: string })[];
}
const css = stylesheet({
active: {
color: `${color.theme} !important`,
fontWeight: 'bold',
},
button: {
$nest: {
'&:hover': {
backgroundColor: 'initial',
},
},
borderRadius: '4px 4px 0 0',
color: color.inactive,
fontSize: fontsize.base,
height: 33,
minHeight: 0,
padding: '0 15px',
textTransform: 'none',
},
indicator: {
backgroundColor: 'initial',
borderBottom: '3px solid ' + color.theme,
borderLeft: '3px solid transparent',
borderRight: '3px solid transparent',
bottom: 0,
left: 35,
position: 'absolute',
transition: 'width 0.3s, left 0.3s',
width: 50,
},
tabs: {
borderBottom: '1px solid ' + color.separator,
height: 33,
position: 'relative',
whiteSpace: 'nowrap',
},
});
class MD2Tabs extends React.Component<MD2TabsProps, any> {
private _rootRef = React.createRef<any>();
private _indicatorRef = React.createRef<any>();
private _tabRefs = this.props.tabs.map(t => React.createRef<HTMLSpanElement>());
private _timeoutHandle = 0;
public render(): JSX.Element {
const selected = this._getSelectedIndex();
const switchHandler = this.props.onSwitch || (() => null);
const tabs = this.props.tabs.map(tab => {
if (typeof tab === 'string') {
return { header: tab, tooltip: '' };
}
return tab;
});
return (
<div className={css.tabs} ref={this._rootRef}>
<div className={css.indicator} ref={this._indicatorRef} />
<Separator units={20} />
{tabs.map((tab, i) => (
<Tooltip title={tab.tooltip} placement='top-start' key={i}>
<Button
className={classes(css.button, i === selected ? css.active : '')}
key={i}
onClick={() => {
if (i !== selected) {
switchHandler(i);
}
}}
>
<span ref={this._tabRefs[i]}>{tab.header}</span>
</Button>
</Tooltip>
))}
</div>
);
}
public componentDidMount(): void {
this._timeoutHandle = setTimeout(this._updateIndicator.bind(this));
}
public componentDidUpdate(): void {
this._timeoutHandle = setTimeout(this._updateIndicator.bind(this));
}
public componentWillUnmount(): void {
clearTimeout(this._timeoutHandle);
}
private _getSelectedIndex(): number {
let selected = this.props.selectedTab;
if (this.props.tabs[selected] === undefined) {
logger.error('Out of bound index passed for selected tab');
selected = 0;
}
return selected;
}
private _updateIndicator(): void {
const selected = this._getSelectedIndex();
const activeLabelElement = this._tabRefs[selected].current as HTMLSpanElement;
if (!activeLabelElement) {
return;
}
const leftOffset =
activeLabelElement.getBoundingClientRect().left -
this._rootRef.current.getBoundingClientRect().left;
const tabIndicator = this._indicatorRef.current;
tabIndicator.style.left = leftOffset - 5 + 'px';
tabIndicator.style.width = activeLabelElement.getBoundingClientRect().width + 5 + 'px';
tabIndicator.style.display = 'block';
}
}
export default MD2Tabs;
| 192 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/Hr.test.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import Hr from './Hr';
import { create } from 'react-test-renderer';
describe('Hr', () => {
it('renders with the right styles', () => {
const tree = create(<Hr fields={[]} />);
expect(tree).toMatchSnapshot();
});
});
| 193 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/IconWithTooltip.tsx | /*
* Copyright 2019 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import Tooltip from '@material-ui/core/Tooltip';
import { SvgIconProps } from '@material-ui/core/SvgIcon';
interface IconWithTooltipProps {
Icon: React.ComponentType<SvgIconProps>;
height?: number;
iconColor: string;
tooltip: string;
width?: number;
}
const IconWithTooltip = (props: IconWithTooltipProps) => {
const { height, Icon, iconColor, tooltip, width } = props;
return (
<Tooltip title={tooltip}>
<Icon
style={{
color: iconColor,
height: height || 16,
width: width || 16,
}}
/>
</Tooltip>
);
};
export default IconWithTooltip;
| 194 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/Hr.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import { color, spacing } from '../Css';
const style = {
border: '0px none transparent',
borderTop: `1px solid ${color.divider}`,
margin: `${spacing.base}px 0`,
};
const Hr = (props: any) => <hr style={style} {...props} />;
export default Hr;
| 195 |
0 | kubeflow_public_repos/pipelines/frontend/src | kubeflow_public_repos/pipelines/frontend/src/atoms/BusyButton.test.tsx | /*
* Copyright 2018 The Kubeflow Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import BusyButton from './BusyButton';
import TestIcon from '@material-ui/icons/Help';
import { create } from 'react-test-renderer';
describe('BusyButton', () => {
it('renders with just a title', () => {
const tree = create(<BusyButton title='test busy button' />);
expect(tree).toMatchSnapshot();
});
it('renders with a title and icon', () => {
const tree = create(<BusyButton title='test busy button' icon={TestIcon} />);
expect(tree).toMatchSnapshot();
});
it('renders with a title and icon, and busy', () => {
const tree = create(<BusyButton title='test busy button' icon={TestIcon} busy={true} />);
expect(tree).toMatchSnapshot();
});
it('renders disabled', () => {
const tree = create(<BusyButton title='test busy button' icon={TestIcon} disabled={true} />);
expect(tree).toMatchSnapshot();
});
it('renders a primary outlined buton', () => {
const tree = create(<BusyButton title='test busy button' outlined={true} />);
expect(tree).toMatchSnapshot();
});
});
| 196 |
0 | kubeflow_public_repos/pipelines/frontend/src/atoms | kubeflow_public_repos/pipelines/frontend/src/atoms/__snapshots__/Input.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Input accepts height and width as prop overrides 1`] = `
<TextField
className="textField"
required={false}
select={false}
spellCheck={false}
style={
Object {
"height": 123,
"maxWidth": 600,
"width": 456,
}
}
value="some input value"
variant="outlined"
/>
`;
exports[`Input renders with the right styles by default 1`] = `
<TextField
className="textField"
required={false}
select={false}
spellCheck={false}
style={
Object {
"height": 40,
"maxWidth": 600,
"width": "100%",
}
}
value="some input value"
variant="outlined"
/>
`;
| 197 |
0 | kubeflow_public_repos/pipelines/frontend/src/atoms | kubeflow_public_repos/pipelines/frontend/src/atoms/__snapshots__/BusyButton.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`BusyButton renders a primary outlined buton 1`] = `
<button
className="MuiButtonBase-root-27 MuiButton-root-1 MuiButton-text-3 MuiButton-textPrimary-4 MuiButton-flat-6 MuiButton-flatPrimary-7 root"
disabled={false}
onBlur={[Function]}
onContextMenu={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseLeave={[Function]}
onMouseUp={[Function]}
onTouchEnd={[Function]}
onTouchMove={[Function]}
onTouchStart={[Function]}
tabIndex="0"
type="button"
>
<span
className="MuiButton-label-2"
>
<span>
test busy button
</span>
</span>
<span
className="MuiTouchRipple-root-30"
/>
</button>
`;
exports[`BusyButton renders disabled 1`] = `
<button
className="MuiButtonBase-root-27 MuiButtonBase-disabled-28 MuiButton-root-1 MuiButton-text-3 MuiButton-textSecondary-5 MuiButton-flat-6 MuiButton-flatSecondary-8 MuiButton-disabled-21 root"
disabled={true}
onBlur={[Function]}
onContextMenu={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseLeave={[Function]}
onMouseUp={[Function]}
onTouchEnd={[Function]}
onTouchMove={[Function]}
onTouchStart={[Function]}
tabIndex="-1"
type="button"
>
<span
className="MuiButton-label-2"
>
<svg
aria-hidden="true"
className="MuiSvgIcon-root-37 icon"
focusable="false"
role="presentation"
viewBox="0 0 24 24"
>
<path
d="M0 0h24v24H0z"
fill="none"
/>
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"
/>
</svg>
<span>
test busy button
</span>
</span>
</button>
`;
exports[`BusyButton renders with a title and icon 1`] = `
<button
className="MuiButtonBase-root-27 MuiButton-root-1 MuiButton-text-3 MuiButton-textSecondary-5 MuiButton-flat-6 MuiButton-flatSecondary-8 root"
disabled={false}
onBlur={[Function]}
onContextMenu={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseLeave={[Function]}
onMouseUp={[Function]}
onTouchEnd={[Function]}
onTouchMove={[Function]}
onTouchStart={[Function]}
tabIndex="0"
type="button"
>
<span
className="MuiButton-label-2"
>
<svg
aria-hidden="true"
className="MuiSvgIcon-root-37 icon"
focusable="false"
role="presentation"
viewBox="0 0 24 24"
>
<path
d="M0 0h24v24H0z"
fill="none"
/>
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"
/>
</svg>
<span>
test busy button
</span>
</span>
<span
className="MuiTouchRipple-root-30"
/>
</button>
`;
exports[`BusyButton renders with a title and icon, and busy 1`] = `
<button
className="MuiButtonBase-root-27 MuiButtonBase-disabled-28 MuiButton-root-1 MuiButton-text-3 MuiButton-textSecondary-5 MuiButton-flat-6 MuiButton-flatSecondary-8 MuiButton-disabled-21 root rootBusy"
disabled={true}
onBlur={[Function]}
onContextMenu={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseLeave={[Function]}
onMouseUp={[Function]}
onTouchEnd={[Function]}
onTouchMove={[Function]}
onTouchStart={[Function]}
tabIndex="-1"
type="button"
>
<span
className="MuiButton-label-2"
>
<svg
aria-hidden="true"
className="MuiSvgIcon-root-37 icon"
focusable="false"
role="presentation"
viewBox="0 0 24 24"
>
<path
d="M0 0h24v24H0z"
fill="none"
/>
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"
/>
</svg>
<span>
test busy button
</span>
<div
className="MuiCircularProgress-root-46 MuiCircularProgress-colorPrimary-49 MuiCircularProgress-indeterminate-48 spinner spinnerBusy"
role="progressbar"
style={
Object {
"height": 15,
"width": 15,
}
}
>
<svg
className="MuiCircularProgress-svg-51"
viewBox="22 22 44 44"
>
<circle
className="MuiCircularProgress-circle-52 MuiCircularProgress-circleIndeterminate-54"
cx={44}
cy={44}
fill="none"
r={20.2}
strokeWidth={3.6}
style={Object {}}
/>
</svg>
</div>
</span>
</button>
`;
exports[`BusyButton renders with just a title 1`] = `
<button
className="MuiButtonBase-root-27 MuiButton-root-1 MuiButton-text-3 MuiButton-textSecondary-5 MuiButton-flat-6 MuiButton-flatSecondary-8 root"
disabled={false}
onBlur={[Function]}
onContextMenu={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseLeave={[Function]}
onMouseUp={[Function]}
onTouchEnd={[Function]}
onTouchMove={[Function]}
onTouchStart={[Function]}
tabIndex="0"
type="button"
>
<span
className="MuiButton-label-2"
>
<span>
test busy button
</span>
</span>
<span
className="MuiTouchRipple-root-30"
/>
</button>
`;
| 198 |
0 | kubeflow_public_repos/pipelines/frontend/src/atoms | kubeflow_public_repos/pipelines/frontend/src/atoms/__snapshots__/Hr.test.tsx.snap | // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Hr renders with the right styles 1`] = `
<hr
fields={Array []}
style={
Object {
"border": "0px none transparent",
"borderTop": "1px solid #e0e0e0",
"margin": "24px 0",
}
}
/>
`;
| 199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.