diff --git a/hack/python-sdk/swagger.json b/hack/python-sdk/swagger.json index cdf90b7b1c..e5bbb35837 100644 --- a/hack/python-sdk/swagger.json +++ b/hack/python-sdk/swagger.json @@ -220,92 +220,6 @@ } } }, - "kubeflow.org.v1.MXJob": { - "description": "MXJob is the Schema for the mxjobs API", - "type": "object", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "default": {}, - "$ref": "#/definitions/v1.ObjectMeta" - }, - "spec": { - "default": {}, - "$ref": "#/definitions/kubeflow.org.v1.MXJobSpec" - }, - "status": { - "default": {}, - "$ref": "#/definitions/kubeflow.org.v1.JobStatus" - } - } - }, - "kubeflow.org.v1.MXJobList": { - "description": "MXJobList contains a list of MXJob", - "type": "object", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "items": { - "type": "array", - "items": { - "default": {}, - "$ref": "#/definitions/kubeflow.org.v1.MXJob" - } - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "default": {}, - "$ref": "#/definitions/v1.ListMeta" - } - } - }, - "kubeflow.org.v1.MXJobSpec": { - "description": "MXJobSpec defines the desired state of MXJob", - "type": "object", - "required": [ - "runPolicy", - "jobMode", - "mxReplicaSpecs" - ], - "properties": { - "jobMode": { - "description": "JobMode specify the kind of MXjob to do. Different mode may have different MXReplicaSpecs request", - "type": "string", - "default": "" - }, - "mxReplicaSpecs": { - "description": "MXReplicaSpecs is map of ReplicaType and ReplicaSpec specifies the MX replicas to run. For example,\n {\n \"Scheduler\": ReplicaSpec,\n \"Server\": ReplicaSpec,\n \"Worker\": ReplicaSpec,\n }", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/kubeflow.org.v1.ReplicaSpec" - } - }, - "runPolicy": { - "description": "RunPolicy encapsulates various runtime policies of the distributed training job, for example how to clean up resources and how long the job can stay active.", - "default": {}, - "$ref": "#/definitions/kubeflow.org.v1.RunPolicy" - } - } - }, - "kubeflow.org.v1.MXJobStatus": { - "description": "MXJobStatus defines the observed state of MXJob", - "type": "object" - }, "kubeflow.org.v1.PaddleElasticPolicy": { "type": "object", "properties": { diff --git a/pkg/apis/kubeflow.org/v1/openapi_generated.go b/pkg/apis/kubeflow.org/v1/openapi_generated.go index c1a49e2ae5..2c14365b47 100644 --- a/pkg/apis/kubeflow.org/v1/openapi_generated.go +++ b/pkg/apis/kubeflow.org/v1/openapi_generated.go @@ -34,10 +34,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MPIJob": schema_pkg_apis_kubefloworg_v1_MPIJob(ref), "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MPIJobList": schema_pkg_apis_kubefloworg_v1_MPIJobList(ref), "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MPIJobSpec": schema_pkg_apis_kubefloworg_v1_MPIJobSpec(ref), - "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJob": schema_pkg_apis_kubefloworg_v1_MXJob(ref), - "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJobList": schema_pkg_apis_kubefloworg_v1_MXJobList(ref), - "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJobSpec": schema_pkg_apis_kubefloworg_v1_MXJobSpec(ref), - "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJobStatus": schema_pkg_apis_kubefloworg_v1_MXJobStatus(ref), "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleElasticPolicy": schema_pkg_apis_kubefloworg_v1_PaddleElasticPolicy(ref), "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleJob": schema_pkg_apis_kubefloworg_v1_PaddleJob(ref), "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleJobList": schema_pkg_apis_kubefloworg_v1_PaddleJobList(ref), @@ -431,158 +427,6 @@ func schema_pkg_apis_kubefloworg_v1_MPIJobSpec(ref common.ReferenceCallback) com } } -func schema_pkg_apis_kubefloworg_v1_MXJob(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MXJob is the Schema for the mxjobs API", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJobSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_pkg_apis_kubefloworg_v1_MXJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MXJobList contains a list of MXJob", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJob"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_pkg_apis_kubefloworg_v1_MXJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MXJobSpec defines the desired state of MXJob", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "runPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "RunPolicy encapsulates various runtime policies of the distributed training job, for example how to clean up resources and how long the job can stay active.", - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"), - }, - }, - "jobMode": { - SchemaProps: spec.SchemaProps{ - Description: "JobMode specify the kind of MXjob to do. Different mode may have different MXReplicaSpecs request", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "mxReplicaSpecs": { - SchemaProps: spec.SchemaProps{ - Description: "MXReplicaSpecs is map of ReplicaType and ReplicaSpec specifies the MX replicas to run. For example,\n {\n \"Scheduler\": ReplicaSpec,\n \"Server\": ReplicaSpec,\n \"Worker\": ReplicaSpec,\n }", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec"), - }, - }, - }, - }, - }, - }, - Required: []string{"runPolicy", "jobMode", "mxReplicaSpecs"}, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"}, - } -} - -func schema_pkg_apis_kubefloworg_v1_MXJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MXJobStatus defines the observed state of MXJob", - Type: []string{"object"}, - }, - }, - } -} - func schema_pkg_apis_kubefloworg_v1_PaddleElasticPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/pkg/apis/kubeflow.org/v1/zz_generated.deepcopy.go b/pkg/apis/kubeflow.org/v1/zz_generated.deepcopy.go index 7bb7b8690a..945730a169 100644 --- a/pkg/apis/kubeflow.org/v1/zz_generated.deepcopy.go +++ b/pkg/apis/kubeflow.org/v1/zz_generated.deepcopy.go @@ -266,112 +266,6 @@ func (in *MPIJobSpec) DeepCopy() *MPIJobSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MXJob) DeepCopyInto(out *MXJob) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJob. -func (in *MXJob) DeepCopy() *MXJob { - if in == nil { - return nil - } - out := new(MXJob) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MXJob) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MXJobList) DeepCopyInto(out *MXJobList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MXJob, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJobList. -func (in *MXJobList) DeepCopy() *MXJobList { - if in == nil { - return nil - } - out := new(MXJobList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MXJobList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MXJobSpec) DeepCopyInto(out *MXJobSpec) { - *out = *in - in.RunPolicy.DeepCopyInto(&out.RunPolicy) - if in.MXReplicaSpecs != nil { - in, out := &in.MXReplicaSpecs, &out.MXReplicaSpecs - *out = make(map[ReplicaType]*ReplicaSpec, len(*in)) - for key, val := range *in { - var outVal *ReplicaSpec - if val == nil { - (*out)[key] = nil - } else { - inVal := (*in)[key] - in, out := &inVal, &outVal - *out = new(ReplicaSpec) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJobSpec. -func (in *MXJobSpec) DeepCopy() *MXJobSpec { - if in == nil { - return nil - } - out := new(MXJobSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MXJobStatus) DeepCopyInto(out *MXJobStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MXJobStatus. -func (in *MXJobStatus) DeepCopy() *MXJobStatus { - if in == nil { - return nil - } - out := new(MXJobStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PaddleElasticPolicy) DeepCopyInto(out *PaddleElasticPolicy) { *out = *in diff --git a/pkg/apis/kubeflow.org/v1/zz_generated.defaults.go b/pkg/apis/kubeflow.org/v1/zz_generated.defaults.go index 6cb9655f58..09d70ab1f0 100644 --- a/pkg/apis/kubeflow.org/v1/zz_generated.defaults.go +++ b/pkg/apis/kubeflow.org/v1/zz_generated.defaults.go @@ -29,8 +29,6 @@ import ( func RegisterDefaults(scheme *runtime.Scheme) error { scheme.AddTypeDefaultingFunc(&MPIJob{}, func(obj interface{}) { SetObjectDefaults_MPIJob(obj.(*MPIJob)) }) scheme.AddTypeDefaultingFunc(&MPIJobList{}, func(obj interface{}) { SetObjectDefaults_MPIJobList(obj.(*MPIJobList)) }) - scheme.AddTypeDefaultingFunc(&MXJob{}, func(obj interface{}) { SetObjectDefaults_MXJob(obj.(*MXJob)) }) - scheme.AddTypeDefaultingFunc(&MXJobList{}, func(obj interface{}) { SetObjectDefaults_MXJobList(obj.(*MXJobList)) }) scheme.AddTypeDefaultingFunc(&PaddleJob{}, func(obj interface{}) { SetObjectDefaults_PaddleJob(obj.(*PaddleJob)) }) scheme.AddTypeDefaultingFunc(&PaddleJobList{}, func(obj interface{}) { SetObjectDefaults_PaddleJobList(obj.(*PaddleJobList)) }) scheme.AddTypeDefaultingFunc(&PyTorchJob{}, func(obj interface{}) { SetObjectDefaults_PyTorchJob(obj.(*PyTorchJob)) }) @@ -53,17 +51,6 @@ func SetObjectDefaults_MPIJobList(in *MPIJobList) { } } -func SetObjectDefaults_MXJob(in *MXJob) { - SetDefaults_MXJob(in) -} - -func SetObjectDefaults_MXJobList(in *MXJobList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_MXJob(a) - } -} - func SetObjectDefaults_PaddleJob(in *PaddleJob) { SetDefaults_PaddleJob(in) } diff --git a/pkg/client/clientset/versioned/typed/kubeflow.org/v1/fake/fake_kubeflow.org_client.go b/pkg/client/clientset/versioned/typed/kubeflow.org/v1/fake/fake_kubeflow.org_client.go index e2d84ff667..bb630c7ab5 100644 --- a/pkg/client/clientset/versioned/typed/kubeflow.org/v1/fake/fake_kubeflow.org_client.go +++ b/pkg/client/clientset/versioned/typed/kubeflow.org/v1/fake/fake_kubeflow.org_client.go @@ -30,10 +30,6 @@ func (c *FakeKubeflowV1) MPIJobs(namespace string) v1.MPIJobInterface { return &FakeMPIJobs{c, namespace} } -func (c *FakeKubeflowV1) MXJobs(namespace string) v1.MXJobInterface { - return &FakeMXJobs{c, namespace} -} - func (c *FakeKubeflowV1) PaddleJobs(namespace string) v1.PaddleJobInterface { return &FakePaddleJobs{c, namespace} } diff --git a/pkg/client/clientset/versioned/typed/kubeflow.org/v1/fake/fake_mxjob.go b/pkg/client/clientset/versioned/typed/kubeflow.org/v1/fake/fake_mxjob.go deleted file mode 100644 index 124db2fe8a..0000000000 --- a/pkg/client/clientset/versioned/typed/kubeflow.org/v1/fake/fake_mxjob.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2023 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. - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeMXJobs implements MXJobInterface -type FakeMXJobs struct { - Fake *FakeKubeflowV1 - ns string -} - -var mxjobsResource = v1.SchemeGroupVersion.WithResource("mxjobs") - -var mxjobsKind = v1.SchemeGroupVersion.WithKind("MXJob") - -// Get takes name of the mXJob, and returns the corresponding mXJob object, and an error if there is any. -func (c *FakeMXJobs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MXJob, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(mxjobsResource, c.ns, name), &v1.MXJob{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.MXJob), err -} - -// List takes label and field selectors, and returns the list of MXJobs that match those selectors. -func (c *FakeMXJobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MXJobList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(mxjobsResource, mxjobsKind, c.ns, opts), &v1.MXJobList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.MXJobList{ListMeta: obj.(*v1.MXJobList).ListMeta} - for _, item := range obj.(*v1.MXJobList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested mXJobs. -func (c *FakeMXJobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(mxjobsResource, c.ns, opts)) - -} - -// Create takes the representation of a mXJob and creates it. Returns the server's representation of the mXJob, and an error, if there is any. -func (c *FakeMXJobs) Create(ctx context.Context, mXJob *v1.MXJob, opts metav1.CreateOptions) (result *v1.MXJob, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(mxjobsResource, c.ns, mXJob), &v1.MXJob{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.MXJob), err -} - -// Update takes the representation of a mXJob and updates it. Returns the server's representation of the mXJob, and an error, if there is any. -func (c *FakeMXJobs) Update(ctx context.Context, mXJob *v1.MXJob, opts metav1.UpdateOptions) (result *v1.MXJob, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(mxjobsResource, c.ns, mXJob), &v1.MXJob{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.MXJob), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMXJobs) UpdateStatus(ctx context.Context, mXJob *v1.MXJob, opts metav1.UpdateOptions) (*v1.MXJob, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(mxjobsResource, "status", c.ns, mXJob), &v1.MXJob{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.MXJob), err -} - -// Delete takes name of the mXJob and deletes it. Returns an error if one occurs. -func (c *FakeMXJobs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(mxjobsResource, c.ns, name, opts), &v1.MXJob{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMXJobs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionAction(mxjobsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1.MXJobList{}) - return err -} - -// Patch applies the patch and returns the patched mXJob. -func (c *FakeMXJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MXJob, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(mxjobsResource, c.ns, name, pt, data, subresources...), &v1.MXJob{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.MXJob), err -} diff --git a/pkg/client/clientset/versioned/typed/kubeflow.org/v1/generated_expansion.go b/pkg/client/clientset/versioned/typed/kubeflow.org/v1/generated_expansion.go index e0ad3bcd5c..6390ab7ec5 100644 --- a/pkg/client/clientset/versioned/typed/kubeflow.org/v1/generated_expansion.go +++ b/pkg/client/clientset/versioned/typed/kubeflow.org/v1/generated_expansion.go @@ -18,8 +18,6 @@ package v1 type MPIJobExpansion interface{} -type MXJobExpansion interface{} - type PaddleJobExpansion interface{} type PyTorchJobExpansion interface{} diff --git a/pkg/client/clientset/versioned/typed/kubeflow.org/v1/kubeflow.org_client.go b/pkg/client/clientset/versioned/typed/kubeflow.org/v1/kubeflow.org_client.go index 024ecc5f04..abbaf205d3 100644 --- a/pkg/client/clientset/versioned/typed/kubeflow.org/v1/kubeflow.org_client.go +++ b/pkg/client/clientset/versioned/typed/kubeflow.org/v1/kubeflow.org_client.go @@ -27,7 +27,6 @@ import ( type KubeflowV1Interface interface { RESTClient() rest.Interface MPIJobsGetter - MXJobsGetter PaddleJobsGetter PyTorchJobsGetter TFJobsGetter @@ -43,10 +42,6 @@ func (c *KubeflowV1Client) MPIJobs(namespace string) MPIJobInterface { return newMPIJobs(c, namespace) } -func (c *KubeflowV1Client) MXJobs(namespace string) MXJobInterface { - return newMXJobs(c, namespace) -} - func (c *KubeflowV1Client) PaddleJobs(namespace string) PaddleJobInterface { return newPaddleJobs(c, namespace) } diff --git a/pkg/client/clientset/versioned/typed/kubeflow.org/v1/mxjob.go b/pkg/client/clientset/versioned/typed/kubeflow.org/v1/mxjob.go deleted file mode 100644 index cf8fc64aed..0000000000 --- a/pkg/client/clientset/versioned/typed/kubeflow.org/v1/mxjob.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2023 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - v1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1" - scheme "github.com/kubeflow/training-operator/pkg/client/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// MXJobsGetter has a method to return a MXJobInterface. -// A group's client should implement this interface. -type MXJobsGetter interface { - MXJobs(namespace string) MXJobInterface -} - -// MXJobInterface has methods to work with MXJob resources. -type MXJobInterface interface { - Create(ctx context.Context, mXJob *v1.MXJob, opts metav1.CreateOptions) (*v1.MXJob, error) - Update(ctx context.Context, mXJob *v1.MXJob, opts metav1.UpdateOptions) (*v1.MXJob, error) - UpdateStatus(ctx context.Context, mXJob *v1.MXJob, opts metav1.UpdateOptions) (*v1.MXJob, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MXJob, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.MXJobList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MXJob, err error) - MXJobExpansion -} - -// mXJobs implements MXJobInterface -type mXJobs struct { - client rest.Interface - ns string -} - -// newMXJobs returns a MXJobs -func newMXJobs(c *KubeflowV1Client, namespace string) *mXJobs { - return &mXJobs{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the mXJob, and returns the corresponding mXJob object, and an error if there is any. -func (c *mXJobs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MXJob, err error) { - result = &v1.MXJob{} - err = c.client.Get(). - Namespace(c.ns). - Resource("mxjobs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of MXJobs that match those selectors. -func (c *mXJobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MXJobList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.MXJobList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("mxjobs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested mXJobs. -func (c *mXJobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("mxjobs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a mXJob and creates it. Returns the server's representation of the mXJob, and an error, if there is any. -func (c *mXJobs) Create(ctx context.Context, mXJob *v1.MXJob, opts metav1.CreateOptions) (result *v1.MXJob, err error) { - result = &v1.MXJob{} - err = c.client.Post(). - Namespace(c.ns). - Resource("mxjobs"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(mXJob). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a mXJob and updates it. Returns the server's representation of the mXJob, and an error, if there is any. -func (c *mXJobs) Update(ctx context.Context, mXJob *v1.MXJob, opts metav1.UpdateOptions) (result *v1.MXJob, err error) { - result = &v1.MXJob{} - err = c.client.Put(). - Namespace(c.ns). - Resource("mxjobs"). - Name(mXJob.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(mXJob). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *mXJobs) UpdateStatus(ctx context.Context, mXJob *v1.MXJob, opts metav1.UpdateOptions) (result *v1.MXJob, err error) { - result = &v1.MXJob{} - err = c.client.Put(). - Namespace(c.ns). - Resource("mxjobs"). - Name(mXJob.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(mXJob). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the mXJob and deletes it. Returns an error if one occurs. -func (c *mXJobs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("mxjobs"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *mXJobs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("mxjobs"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched mXJob. -func (c *mXJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MXJob, err error) { - result = &v1.MXJob{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("mxjobs"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index 70e2a3ee77..38feaee02f 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -53,8 +53,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=kubeflow.org, Version=v1 case v1.SchemeGroupVersion.WithResource("mpijobs"): return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeflow().V1().MPIJobs().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("mxjobs"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeflow().V1().MXJobs().Informer()}, nil case v1.SchemeGroupVersion.WithResource("paddlejobs"): return &genericInformer{resource: resource.GroupResource(), informer: f.Kubeflow().V1().PaddleJobs().Informer()}, nil case v1.SchemeGroupVersion.WithResource("pytorchjobs"): diff --git a/pkg/client/informers/externalversions/kubeflow.org/v1/interface.go b/pkg/client/informers/externalversions/kubeflow.org/v1/interface.go index ce068a90e9..d2087c13b7 100644 --- a/pkg/client/informers/externalversions/kubeflow.org/v1/interface.go +++ b/pkg/client/informers/externalversions/kubeflow.org/v1/interface.go @@ -24,8 +24,6 @@ import ( type Interface interface { // MPIJobs returns a MPIJobInformer. MPIJobs() MPIJobInformer - // MXJobs returns a MXJobInformer. - MXJobs() MXJobInformer // PaddleJobs returns a PaddleJobInformer. PaddleJobs() PaddleJobInformer // PyTorchJobs returns a PyTorchJobInformer. @@ -52,11 +50,6 @@ func (v *version) MPIJobs() MPIJobInformer { return &mPIJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// MXJobs returns a MXJobInformer. -func (v *version) MXJobs() MXJobInformer { - return &mXJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - // PaddleJobs returns a PaddleJobInformer. func (v *version) PaddleJobs() PaddleJobInformer { return &paddleJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} diff --git a/pkg/client/informers/externalversions/kubeflow.org/v1/mxjob.go b/pkg/client/informers/externalversions/kubeflow.org/v1/mxjob.go deleted file mode 100644 index c229899e52..0000000000 --- a/pkg/client/informers/externalversions/kubeflow.org/v1/mxjob.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2023 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - kubefloworgv1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1" - versioned "github.com/kubeflow/training-operator/pkg/client/clientset/versioned" - internalinterfaces "github.com/kubeflow/training-operator/pkg/client/informers/externalversions/internalinterfaces" - v1 "github.com/kubeflow/training-operator/pkg/client/listers/kubeflow.org/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// MXJobInformer provides access to a shared informer and lister for -// MXJobs. -type MXJobInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.MXJobLister -} - -type mXJobInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewMXJobInformer constructs a new informer for MXJob type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewMXJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredMXJobInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredMXJobInformer constructs a new informer for MXJob type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredMXJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeflowV1().MXJobs(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeflowV1().MXJobs(namespace).Watch(context.TODO(), options) - }, - }, - &kubefloworgv1.MXJob{}, - resyncPeriod, - indexers, - ) -} - -func (f *mXJobInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredMXJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *mXJobInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubefloworgv1.MXJob{}, f.defaultInformer) -} - -func (f *mXJobInformer) Lister() v1.MXJobLister { - return v1.NewMXJobLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/listers/kubeflow.org/v1/expansion_generated.go b/pkg/client/listers/kubeflow.org/v1/expansion_generated.go index 940f5207ed..9420bad086 100644 --- a/pkg/client/listers/kubeflow.org/v1/expansion_generated.go +++ b/pkg/client/listers/kubeflow.org/v1/expansion_generated.go @@ -24,14 +24,6 @@ type MPIJobListerExpansion interface{} // MPIJobNamespaceLister. type MPIJobNamespaceListerExpansion interface{} -// MXJobListerExpansion allows custom methods to be added to -// MXJobLister. -type MXJobListerExpansion interface{} - -// MXJobNamespaceListerExpansion allows custom methods to be added to -// MXJobNamespaceLister. -type MXJobNamespaceListerExpansion interface{} - // PaddleJobListerExpansion allows custom methods to be added to // PaddleJobLister. type PaddleJobListerExpansion interface{} diff --git a/pkg/client/listers/kubeflow.org/v1/mxjob.go b/pkg/client/listers/kubeflow.org/v1/mxjob.go deleted file mode 100644 index eb3cfd9104..0000000000 --- a/pkg/client/listers/kubeflow.org/v1/mxjob.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2023 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. - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// MXJobLister helps list MXJobs. -// All objects returned here must be treated as read-only. -type MXJobLister interface { - // List lists all MXJobs in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.MXJob, err error) - // MXJobs returns an object that can list and get MXJobs. - MXJobs(namespace string) MXJobNamespaceLister - MXJobListerExpansion -} - -// mXJobLister implements the MXJobLister interface. -type mXJobLister struct { - indexer cache.Indexer -} - -// NewMXJobLister returns a new MXJobLister. -func NewMXJobLister(indexer cache.Indexer) MXJobLister { - return &mXJobLister{indexer: indexer} -} - -// List lists all MXJobs in the indexer. -func (s *mXJobLister) List(selector labels.Selector) (ret []*v1.MXJob, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.MXJob)) - }) - return ret, err -} - -// MXJobs returns an object that can list and get MXJobs. -func (s *mXJobLister) MXJobs(namespace string) MXJobNamespaceLister { - return mXJobNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// MXJobNamespaceLister helps list and get MXJobs. -// All objects returned here must be treated as read-only. -type MXJobNamespaceLister interface { - // List lists all MXJobs in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.MXJob, err error) - // Get retrieves the MXJob from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.MXJob, error) - MXJobNamespaceListerExpansion -} - -// mXJobNamespaceLister implements the MXJobNamespaceLister -// interface. -type mXJobNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all MXJobs in the indexer for a given namespace. -func (s mXJobNamespaceLister) List(selector labels.Selector) (ret []*v1.MXJob, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.MXJob)) - }) - return ret, err -} - -// Get retrieves the MXJob from the indexer for a given namespace and name. -func (s mXJobNamespaceLister) Get(name string) (*v1.MXJob, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("mxjob"), name) - } - return obj.(*v1.MXJob), nil -} diff --git a/sdk/python/docs/KubeflowOrgV1ElasticPolicy.md b/sdk/python/docs/KubeflowOrgV1ElasticPolicy.md deleted file mode 100644 index c39927a013..0000000000 --- a/sdk/python/docs/KubeflowOrgV1ElasticPolicy.md +++ /dev/null @@ -1,20 +0,0 @@ -# KubeflowOrgV1ElasticPolicy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**max_replicas** | **int** | upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas, defaults to null. | [optional] -**max_restarts** | **int** | | [optional] -**metrics** | [**list[K8sIoApiAutoscalingV2MetricSpec]**](K8sIoApiAutoscalingV2MetricSpec.md) | Metrics contains the specifications which are used to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated with multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the HPA will not be created. | [optional] -**min_replicas** | **int** | minReplicas is the lower limit for the number of replicas to which the training job can scale down. It defaults to null. | [optional] -**n_proc_per_node** | **int** | Number of workers per node; supported values: [auto, cpu, gpu, int]. Deprecated: This API is deprecated in v1.7+ Use .spec.nprocPerNode instead. | [optional] -**rdzv_backend** | **str** | | [optional] -**rdzv_conf** | [**list[KubeflowOrgV1RDZVConf]**](KubeflowOrgV1RDZVConf.md) | RDZVConf contains additional rendezvous configuration (<key1>=<value1>,<key2>=<value2>,...). | [optional] -**rdzv_host** | **str** | | [optional] -**rdzv_id** | **str** | | [optional] -**rdzv_port** | **int** | | [optional] -**standalone** | **bool** | Start a local standalone rendezvous backend that is represented by a C10d TCP store on port 29400. Useful when launching single-node, multi-worker job. If specified --rdzv_backend, --rdzv_endpoint, --rdzv_id are auto-assigned; any explicitly set values are ignored. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1JobCondition.md b/sdk/python/docs/KubeflowOrgV1JobCondition.md deleted file mode 100644 index 9dabe76763..0000000000 --- a/sdk/python/docs/KubeflowOrgV1JobCondition.md +++ /dev/null @@ -1,16 +0,0 @@ -# KubeflowOrgV1JobCondition - -JobCondition describes the state of the job at a certain point. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**last_transition_time** | [**datetime**](V1Time.md) | | [optional] -**last_update_time** | [**datetime**](V1Time.md) | | [optional] -**message** | **str** | A human readable message indicating details about the transition. | [optional] -**reason** | **str** | The reason for the condition's last transition. | [optional] -**status** | **str** | Status of the condition, one of True, False, Unknown. | [default to ''] -**type** | **str** | Type of job condition. | [default to ''] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1JobStatus.md b/sdk/python/docs/KubeflowOrgV1JobStatus.md deleted file mode 100644 index 33fe6020bb..0000000000 --- a/sdk/python/docs/KubeflowOrgV1JobStatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# KubeflowOrgV1JobStatus - -JobStatus represents the current observed state of the training Job. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**completion_time** | [**datetime**](V1Time.md) | | [optional] -**conditions** | [**list[KubeflowOrgV1JobCondition]**](KubeflowOrgV1JobCondition.md) | Conditions is an array of current observed job conditions. | [optional] -**last_reconcile_time** | [**datetime**](V1Time.md) | | [optional] -**replica_statuses** | [**dict(str, KubeflowOrgV1ReplicaStatus)**](KubeflowOrgV1ReplicaStatus.md) | ReplicaStatuses is map of ReplicaType and ReplicaStatus, specifies the status of each replica. | [optional] -**start_time** | [**datetime**](V1Time.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1MPIJob.md b/sdk/python/docs/KubeflowOrgV1MPIJob.md deleted file mode 100644 index 74ce8e51ec..0000000000 --- a/sdk/python/docs/KubeflowOrgV1MPIJob.md +++ /dev/null @@ -1,14 +0,0 @@ -# KubeflowOrgV1MPIJob - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] -**spec** | [**KubeflowOrgV1MPIJobSpec**](KubeflowOrgV1MPIJobSpec.md) | | [optional] -**status** | [**KubeflowOrgV1JobStatus**](KubeflowOrgV1JobStatus.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1MPIJobList.md b/sdk/python/docs/KubeflowOrgV1MPIJobList.md deleted file mode 100644 index 5eb2500690..0000000000 --- a/sdk/python/docs/KubeflowOrgV1MPIJobList.md +++ /dev/null @@ -1,13 +0,0 @@ -# KubeflowOrgV1MPIJobList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**items** | [**list[KubeflowOrgV1MPIJob]**](KubeflowOrgV1MPIJob.md) | | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1MPIJobSpec.md b/sdk/python/docs/KubeflowOrgV1MPIJobSpec.md deleted file mode 100644 index 14c8d9ea6f..0000000000 --- a/sdk/python/docs/KubeflowOrgV1MPIJobSpec.md +++ /dev/null @@ -1,14 +0,0 @@ -# KubeflowOrgV1MPIJobSpec - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**clean_pod_policy** | **str** | CleanPodPolicy defines the policy that whether to kill pods after the job completes. Defaults to None. | [optional] -**main_container** | **str** | MainContainer specifies name of the main container which executes the MPI code. | [optional] -**mpi_replica_specs** | [**dict(str, KubeflowOrgV1ReplicaSpec)**](KubeflowOrgV1ReplicaSpec.md) | `MPIReplicaSpecs` contains maps from `MPIReplicaType` to `ReplicaSpec` that specify the MPI replicas to run. | -**run_policy** | [**KubeflowOrgV1RunPolicy**](KubeflowOrgV1RunPolicy.md) | | [optional] -**slots_per_worker** | **int** | Specifies the number of slots per worker used in hostfile. Defaults to 1. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1MXJob.md b/sdk/python/docs/KubeflowOrgV1MXJob.md deleted file mode 100644 index b0da6db1c5..0000000000 --- a/sdk/python/docs/KubeflowOrgV1MXJob.md +++ /dev/null @@ -1,15 +0,0 @@ -# KubeflowOrgV1MXJob - -MXJob is the Schema for the mxjobs API -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] -**spec** | [**KubeflowOrgV1MXJobSpec**](KubeflowOrgV1MXJobSpec.md) | | [optional] -**status** | [**KubeflowOrgV1JobStatus**](KubeflowOrgV1JobStatus.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1MXJobList.md b/sdk/python/docs/KubeflowOrgV1MXJobList.md deleted file mode 100644 index 535d8d99cd..0000000000 --- a/sdk/python/docs/KubeflowOrgV1MXJobList.md +++ /dev/null @@ -1,14 +0,0 @@ -# KubeflowOrgV1MXJobList - -MXJobList contains a list of MXJob -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**items** | [**list[KubeflowOrgV1MXJob]**](KubeflowOrgV1MXJob.md) | | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1MXJobSpec.md b/sdk/python/docs/KubeflowOrgV1MXJobSpec.md deleted file mode 100644 index 98583e12e9..0000000000 --- a/sdk/python/docs/KubeflowOrgV1MXJobSpec.md +++ /dev/null @@ -1,13 +0,0 @@ -# KubeflowOrgV1MXJobSpec - -MXJobSpec defines the desired state of MXJob -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**job_mode** | **str** | JobMode specify the kind of MXjob to do. Different mode may have different MXReplicaSpecs request | [default to ''] -**mx_replica_specs** | [**dict(str, KubeflowOrgV1ReplicaSpec)**](KubeflowOrgV1ReplicaSpec.md) | MXReplicaSpecs is map of ReplicaType and ReplicaSpec specifies the MX replicas to run. For example, { \"Scheduler\": ReplicaSpec, \"Server\": ReplicaSpec, \"Worker\": ReplicaSpec, } | -**run_policy** | [**KubeflowOrgV1RunPolicy**](KubeflowOrgV1RunPolicy.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1PaddleElasticPolicy.md b/sdk/python/docs/KubeflowOrgV1PaddleElasticPolicy.md deleted file mode 100644 index 4daf9ddacf..0000000000 --- a/sdk/python/docs/KubeflowOrgV1PaddleElasticPolicy.md +++ /dev/null @@ -1,13 +0,0 @@ -# KubeflowOrgV1PaddleElasticPolicy - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**max_replicas** | **int** | upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas, defaults to null. | [optional] -**max_restarts** | **int** | MaxRestarts is the limit for restart times of pods in elastic mode. | [optional] -**metrics** | [**list[K8sIoApiAutoscalingV2MetricSpec]**](K8sIoApiAutoscalingV2MetricSpec.md) | Metrics contains the specifications which are used to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated with multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the HPA will not be created. | [optional] -**min_replicas** | **int** | minReplicas is the lower limit for the number of replicas to which the training job can scale down. It defaults to null. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1PaddleJob.md b/sdk/python/docs/KubeflowOrgV1PaddleJob.md deleted file mode 100644 index 2688ec819a..0000000000 --- a/sdk/python/docs/KubeflowOrgV1PaddleJob.md +++ /dev/null @@ -1,15 +0,0 @@ -# KubeflowOrgV1PaddleJob - -PaddleJob Represents a PaddleJob resource. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] -**spec** | [**KubeflowOrgV1PaddleJobSpec**](KubeflowOrgV1PaddleJobSpec.md) | | [optional] -**status** | [**KubeflowOrgV1JobStatus**](KubeflowOrgV1JobStatus.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1PaddleJobList.md b/sdk/python/docs/KubeflowOrgV1PaddleJobList.md deleted file mode 100644 index 2ff4e534d1..0000000000 --- a/sdk/python/docs/KubeflowOrgV1PaddleJobList.md +++ /dev/null @@ -1,14 +0,0 @@ -# KubeflowOrgV1PaddleJobList - -PaddleJobList is a list of PaddleJobs. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**items** | [**list[KubeflowOrgV1PaddleJob]**](KubeflowOrgV1PaddleJob.md) | List of PaddleJobs. | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1PaddleJobSpec.md b/sdk/python/docs/KubeflowOrgV1PaddleJobSpec.md deleted file mode 100644 index 5060d38997..0000000000 --- a/sdk/python/docs/KubeflowOrgV1PaddleJobSpec.md +++ /dev/null @@ -1,13 +0,0 @@ -# KubeflowOrgV1PaddleJobSpec - -PaddleJobSpec is a desired state description of the PaddleJob. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**elastic_policy** | [**KubeflowOrgV1PaddleElasticPolicy**](KubeflowOrgV1PaddleElasticPolicy.md) | | [optional] -**paddle_replica_specs** | [**dict(str, KubeflowOrgV1ReplicaSpec)**](KubeflowOrgV1ReplicaSpec.md) | A map of PaddleReplicaType (type) to ReplicaSpec (value). Specifies the Paddle cluster configuration. For example, { \"Master\": PaddleReplicaSpec, \"Worker\": PaddleReplicaSpec, } | -**run_policy** | [**KubeflowOrgV1RunPolicy**](KubeflowOrgV1RunPolicy.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1PyTorchJob.md b/sdk/python/docs/KubeflowOrgV1PyTorchJob.md deleted file mode 100644 index b117b25d23..0000000000 --- a/sdk/python/docs/KubeflowOrgV1PyTorchJob.md +++ /dev/null @@ -1,15 +0,0 @@ -# KubeflowOrgV1PyTorchJob - -PyTorchJob Represents a PyTorchJob resource. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] -**spec** | [**KubeflowOrgV1PyTorchJobSpec**](KubeflowOrgV1PyTorchJobSpec.md) | | [optional] -**status** | [**KubeflowOrgV1JobStatus**](KubeflowOrgV1JobStatus.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1PyTorchJobList.md b/sdk/python/docs/KubeflowOrgV1PyTorchJobList.md deleted file mode 100644 index b352d4b5c7..0000000000 --- a/sdk/python/docs/KubeflowOrgV1PyTorchJobList.md +++ /dev/null @@ -1,14 +0,0 @@ -# KubeflowOrgV1PyTorchJobList - -PyTorchJobList is a list of PyTorchJobs. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**items** | [**list[KubeflowOrgV1PyTorchJob]**](KubeflowOrgV1PyTorchJob.md) | List of PyTorchJobs. | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1PyTorchJobSpec.md b/sdk/python/docs/KubeflowOrgV1PyTorchJobSpec.md deleted file mode 100644 index 6e24755a14..0000000000 --- a/sdk/python/docs/KubeflowOrgV1PyTorchJobSpec.md +++ /dev/null @@ -1,14 +0,0 @@ -# KubeflowOrgV1PyTorchJobSpec - -PyTorchJobSpec is a desired state description of the PyTorchJob. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**elastic_policy** | [**KubeflowOrgV1ElasticPolicy**](KubeflowOrgV1ElasticPolicy.md) | | [optional] -**nproc_per_node** | **str** | Number of workers per node; supported values: [auto, cpu, gpu, int]. For more, https://github.com/pytorch/pytorch/blob/26f7f470df64d90e092081e39507e4ac751f55d6/torch/distributed/run.py#L629-L658. Defaults to auto. | [optional] -**pytorch_replica_specs** | [**dict(str, KubeflowOrgV1ReplicaSpec)**](KubeflowOrgV1ReplicaSpec.md) | A map of PyTorchReplicaType (type) to ReplicaSpec (value). Specifies the PyTorch cluster configuration. For example, { \"Master\": PyTorchReplicaSpec, \"Worker\": PyTorchReplicaSpec, } | -**run_policy** | [**KubeflowOrgV1RunPolicy**](KubeflowOrgV1RunPolicy.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1RDZVConf.md b/sdk/python/docs/KubeflowOrgV1RDZVConf.md deleted file mode 100644 index 2dce54c9b3..0000000000 --- a/sdk/python/docs/KubeflowOrgV1RDZVConf.md +++ /dev/null @@ -1,11 +0,0 @@ -# KubeflowOrgV1RDZVConf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **str** | | [optional] -**value** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1ReplicaSpec.md b/sdk/python/docs/KubeflowOrgV1ReplicaSpec.md deleted file mode 100644 index ed9c8968f5..0000000000 --- a/sdk/python/docs/KubeflowOrgV1ReplicaSpec.md +++ /dev/null @@ -1,13 +0,0 @@ -# KubeflowOrgV1ReplicaSpec - -ReplicaSpec is a description of the replica -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**replicas** | **int** | Replicas is the desired number of replicas of the given template. If unspecified, defaults to 1. | [optional] -**restart_policy** | **str** | Restart policy for all replicas within the job. One of Always, OnFailure, Never and ExitCode. Default to Never. | [optional] -**template** | [**V1PodTemplateSpec**](V1PodTemplateSpec.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1ReplicaStatus.md b/sdk/python/docs/KubeflowOrgV1ReplicaStatus.md deleted file mode 100644 index 33b96c3639..0000000000 --- a/sdk/python/docs/KubeflowOrgV1ReplicaStatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# KubeflowOrgV1ReplicaStatus - -ReplicaStatus represents the current observed state of the replica. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active** | **int** | The number of actively running pods. | [optional] -**failed** | **int** | The number of pods which reached phase Failed. | [optional] -**label_selector** | [**V1LabelSelector**](V1LabelSelector.md) | | [optional] -**selector** | **str** | A Selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty Selector matches all objects. A null Selector matches no objects. | [optional] -**succeeded** | **int** | The number of pods which reached phase Succeeded. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1RunPolicy.md b/sdk/python/docs/KubeflowOrgV1RunPolicy.md deleted file mode 100644 index ce41fa09f6..0000000000 --- a/sdk/python/docs/KubeflowOrgV1RunPolicy.md +++ /dev/null @@ -1,16 +0,0 @@ -# KubeflowOrgV1RunPolicy - -RunPolicy encapsulates various runtime policies of the distributed training job, for example how to clean up resources and how long the job can stay active. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active_deadline_seconds** | **int** | Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. | [optional] -**backoff_limit** | **int** | Optional number of retries before marking this job failed. | [optional] -**clean_pod_policy** | **str** | CleanPodPolicy defines the policy to kill pods after the job completes. Default to None. | [optional] -**scheduling_policy** | [**KubeflowOrgV1SchedulingPolicy**](KubeflowOrgV1SchedulingPolicy.md) | | [optional] -**suspend** | **bool** | suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods and PodGroups associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job. Defaults to false. | [optional] -**ttl_seconds_after_finished** | **int** | TTLSecondsAfterFinished is the TTL to clean up jobs. It may take extra ReconcilePeriod seconds for the cleanup, since reconcile gets called periodically. Default to infinite. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1SchedulingPolicy.md b/sdk/python/docs/KubeflowOrgV1SchedulingPolicy.md deleted file mode 100644 index ca2c5070cc..0000000000 --- a/sdk/python/docs/KubeflowOrgV1SchedulingPolicy.md +++ /dev/null @@ -1,15 +0,0 @@ -# KubeflowOrgV1SchedulingPolicy - -SchedulingPolicy encapsulates various scheduling policies of the distributed training job, for example `minAvailable` for gang-scheduling. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**min_available** | **int** | | [optional] -**min_resources** | [**dict(str, Quantity)**](Quantity.md) | | [optional] -**priority_class** | **str** | | [optional] -**queue** | **str** | | [optional] -**schedule_timeout_seconds** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1TFJob.md b/sdk/python/docs/KubeflowOrgV1TFJob.md deleted file mode 100644 index 6e4389f046..0000000000 --- a/sdk/python/docs/KubeflowOrgV1TFJob.md +++ /dev/null @@ -1,15 +0,0 @@ -# KubeflowOrgV1TFJob - -TFJob represents a TFJob resource. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] -**spec** | [**KubeflowOrgV1TFJobSpec**](KubeflowOrgV1TFJobSpec.md) | | [optional] -**status** | [**KubeflowOrgV1JobStatus**](KubeflowOrgV1JobStatus.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1TFJobList.md b/sdk/python/docs/KubeflowOrgV1TFJobList.md deleted file mode 100644 index 73023fc7f3..0000000000 --- a/sdk/python/docs/KubeflowOrgV1TFJobList.md +++ /dev/null @@ -1,14 +0,0 @@ -# KubeflowOrgV1TFJobList - -TFJobList is a list of TFJobs. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**items** | [**list[KubeflowOrgV1TFJob]**](KubeflowOrgV1TFJob.md) | List of TFJobs. | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1TFJobSpec.md b/sdk/python/docs/KubeflowOrgV1TFJobSpec.md deleted file mode 100644 index cbea624dec..0000000000 --- a/sdk/python/docs/KubeflowOrgV1TFJobSpec.md +++ /dev/null @@ -1,14 +0,0 @@ -# KubeflowOrgV1TFJobSpec - -TFJobSpec is a desired state description of the TFJob. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enable_dynamic_worker** | **bool** | A switch to enable dynamic worker | [optional] -**run_policy** | [**KubeflowOrgV1RunPolicy**](KubeflowOrgV1RunPolicy.md) | | -**success_policy** | **str** | SuccessPolicy defines the policy to mark the TFJob as succeeded. Default to \"\", using the default rules. | [optional] -**tf_replica_specs** | [**dict(str, KubeflowOrgV1ReplicaSpec)**](KubeflowOrgV1ReplicaSpec.md) | A map of TFReplicaType (type) to ReplicaSpec (value). Specifies the TF cluster configuration. For example, { \"PS\": ReplicaSpec, \"Worker\": ReplicaSpec, } | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1XGBoostJob.md b/sdk/python/docs/KubeflowOrgV1XGBoostJob.md deleted file mode 100644 index b1d433f033..0000000000 --- a/sdk/python/docs/KubeflowOrgV1XGBoostJob.md +++ /dev/null @@ -1,15 +0,0 @@ -# KubeflowOrgV1XGBoostJob - -XGBoostJob is the Schema for the xgboostjobs API -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] -**spec** | [**KubeflowOrgV1XGBoostJobSpec**](KubeflowOrgV1XGBoostJobSpec.md) | | [optional] -**status** | [**KubeflowOrgV1JobStatus**](KubeflowOrgV1JobStatus.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1XGBoostJobList.md b/sdk/python/docs/KubeflowOrgV1XGBoostJobList.md deleted file mode 100644 index 2821faacb8..0000000000 --- a/sdk/python/docs/KubeflowOrgV1XGBoostJobList.md +++ /dev/null @@ -1,14 +0,0 @@ -# KubeflowOrgV1XGBoostJobList - -XGBoostJobList contains a list of XGBoostJob -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] -**items** | [**list[KubeflowOrgV1XGBoostJob]**](KubeflowOrgV1XGBoostJob.md) | | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/docs/KubeflowOrgV1XGBoostJobSpec.md b/sdk/python/docs/KubeflowOrgV1XGBoostJobSpec.md deleted file mode 100644 index e42d004652..0000000000 --- a/sdk/python/docs/KubeflowOrgV1XGBoostJobSpec.md +++ /dev/null @@ -1,12 +0,0 @@ -# KubeflowOrgV1XGBoostJobSpec - -XGBoostJobSpec defines the desired state of XGBoostJob -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**run_policy** | [**KubeflowOrgV1RunPolicy**](KubeflowOrgV1RunPolicy.md) | | -**xgb_replica_specs** | [**dict(str, KubeflowOrgV1ReplicaSpec)**](KubeflowOrgV1ReplicaSpec.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdk/python/kubeflow/training/__init__.py b/sdk/python/kubeflow/training/__init__.py deleted file mode 100644 index e1176ab041..0000000000 --- a/sdk/python/kubeflow/training/__init__.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -__version__ = "1.7.0" - -# import apis into sdk package - -# import ApiClient -from kubeflow.training.api_client import ApiClient -from kubeflow.training.configuration import Configuration -from kubeflow.training.exceptions import OpenApiException -from kubeflow.training.exceptions import ApiTypeError -from kubeflow.training.exceptions import ApiValueError -from kubeflow.training.exceptions import ApiKeyError -from kubeflow.training.exceptions import ApiException -# import models into sdk package -from kubeflow.training.models.kubeflow_org_v1_elastic_policy import KubeflowOrgV1ElasticPolicy -from kubeflow.training.models.kubeflow_org_v1_job_condition import KubeflowOrgV1JobCondition -from kubeflow.training.models.kubeflow_org_v1_job_status import KubeflowOrgV1JobStatus -from kubeflow.training.models.kubeflow_org_v1_mpi_job import KubeflowOrgV1MPIJob -from kubeflow.training.models.kubeflow_org_v1_mpi_job_list import KubeflowOrgV1MPIJobList -from kubeflow.training.models.kubeflow_org_v1_mpi_job_spec import KubeflowOrgV1MPIJobSpec -from kubeflow.training.models.kubeflow_org_v1_mx_job import KubeflowOrgV1MXJob -from kubeflow.training.models.kubeflow_org_v1_mx_job_list import KubeflowOrgV1MXJobList -from kubeflow.training.models.kubeflow_org_v1_mx_job_spec import KubeflowOrgV1MXJobSpec -from kubeflow.training.models.kubeflow_org_v1_paddle_elastic_policy import KubeflowOrgV1PaddleElasticPolicy -from kubeflow.training.models.kubeflow_org_v1_paddle_job import KubeflowOrgV1PaddleJob -from kubeflow.training.models.kubeflow_org_v1_paddle_job_list import KubeflowOrgV1PaddleJobList -from kubeflow.training.models.kubeflow_org_v1_paddle_job_spec import KubeflowOrgV1PaddleJobSpec -from kubeflow.training.models.kubeflow_org_v1_py_torch_job import KubeflowOrgV1PyTorchJob -from kubeflow.training.models.kubeflow_org_v1_py_torch_job_list import KubeflowOrgV1PyTorchJobList -from kubeflow.training.models.kubeflow_org_v1_py_torch_job_spec import KubeflowOrgV1PyTorchJobSpec -from kubeflow.training.models.kubeflow_org_v1_rdzv_conf import KubeflowOrgV1RDZVConf -from kubeflow.training.models.kubeflow_org_v1_replica_spec import KubeflowOrgV1ReplicaSpec -from kubeflow.training.models.kubeflow_org_v1_replica_status import KubeflowOrgV1ReplicaStatus -from kubeflow.training.models.kubeflow_org_v1_run_policy import KubeflowOrgV1RunPolicy -from kubeflow.training.models.kubeflow_org_v1_scheduling_policy import KubeflowOrgV1SchedulingPolicy -from kubeflow.training.models.kubeflow_org_v1_tf_job import KubeflowOrgV1TFJob -from kubeflow.training.models.kubeflow_org_v1_tf_job_list import KubeflowOrgV1TFJobList -from kubeflow.training.models.kubeflow_org_v1_tf_job_spec import KubeflowOrgV1TFJobSpec -from kubeflow.training.models.kubeflow_org_v1_xg_boost_job import KubeflowOrgV1XGBoostJob -from kubeflow.training.models.kubeflow_org_v1_xg_boost_job_list import KubeflowOrgV1XGBoostJobList -from kubeflow.training.models.kubeflow_org_v1_xg_boost_job_spec import KubeflowOrgV1XGBoostJobSpec - -from kubeflow.training.api.training_client import TrainingClient -from kubeflow.training.constants import constants diff --git a/sdk/python/kubeflow/training/api_client.py b/sdk/python/kubeflow/training/api_client.py deleted file mode 100644 index 52d67804b0..0000000000 --- a/sdk/python/kubeflow/training/api_client.py +++ /dev/null @@ -1,666 +0,0 @@ -# coding: utf-8 -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - -from __future__ import absolute_import - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from kubeflow.training.configuration import Configuration -import kubeflow.training.models -from kubeflow.training import rest -from kubeflow.training.exceptions import ApiValueError, ApiException - - -class ApiClient(object): - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): - if configuration is None: - configuration = Configuration.get_default_copy() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.7.0/python' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - try: - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - except ApiException as e: - e.body = e.body.decode('utf-8') if six.PY3 else e.body - raise e - - content_type = response_data.getheader('content-type') - - self.last_response = response_data - - return_data = response_data - - if not _preload_content: - return return_data - - if six.PY3 and response_type not in ["file", "bytes"]: - match = None - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_data.data = response_data.data.decode(encoding) - - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.openapi_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(kubeflow.training.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - has_discriminator = False - if (hasattr(klass, 'get_real_child_model') - and klass.discriminator_value_class_map): - has_discriminator = True - - if not klass.openapi_types and has_discriminator is False: - return data - - kwargs = {} - if (data is not None and - klass.openapi_types is not None and - isinstance(data, (list, dict))): - for attr, attr_type in six.iteritems(klass.openapi_types): - if klass.attribute_map[attr] in data: - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if has_discriminator: - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/sdk/python/kubeflow/training/configuration.py b/sdk/python/kubeflow/training/configuration.py deleted file mode 100644 index 123d843fef..0000000000 --- a/sdk/python/kubeflow/training/configuration.py +++ /dev/null @@ -1,376 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - - """ - - _default = None - - def __init__(self, host="http://localhost", - api_key=None, api_key_prefix=None, - username=None, password=None, - discard_unknown_keys=False, - ): - """Constructor - """ - self.host = host - """Default Base url - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.discard_unknown_keys = discard_unknown_keys - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("kubeflow.training") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Disable client side validation - self.client_side_validation = True - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = copy.deepcopy(default) - - @classmethod - def get_default_copy(cls): - """Return new instance of configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration passed by the set_default method. - - :return: The configuration object. - """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: v1.7.0\n"\ - "SDK Package Version: 1.7.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "/", - 'description': "No description provided", - } - ] - - def get_host_from_settings(self, index, variables=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :return: URL based on host settings - """ - variables = {} if variables is None else variables - servers = self.get_host_settings() - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server['variables'].items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url diff --git a/sdk/python/kubeflow/training/exceptions.py b/sdk/python/kubeflow/training/exceptions.py deleted file mode 100644 index b3377179b2..0000000000 --- a/sdk/python/kubeflow/training/exceptions.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import six - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, six.integer_types): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/sdk/python/kubeflow/training/models/__init__.py b/sdk/python/kubeflow/training/models/__init__.py deleted file mode 100644 index e0090af024..0000000000 --- a/sdk/python/kubeflow/training/models/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -# Import Kubernetes models. -from kubernetes.client import * - -# import models into model package -from kubeflow.training.models.kubeflow_org_v1_elastic_policy import KubeflowOrgV1ElasticPolicy -from kubeflow.training.models.kubeflow_org_v1_job_condition import KubeflowOrgV1JobCondition -from kubeflow.training.models.kubeflow_org_v1_job_status import KubeflowOrgV1JobStatus -from kubeflow.training.models.kubeflow_org_v1_mpi_job import KubeflowOrgV1MPIJob -from kubeflow.training.models.kubeflow_org_v1_mpi_job_list import KubeflowOrgV1MPIJobList -from kubeflow.training.models.kubeflow_org_v1_mpi_job_spec import KubeflowOrgV1MPIJobSpec -from kubeflow.training.models.kubeflow_org_v1_mx_job import KubeflowOrgV1MXJob -from kubeflow.training.models.kubeflow_org_v1_mx_job_list import KubeflowOrgV1MXJobList -from kubeflow.training.models.kubeflow_org_v1_mx_job_spec import KubeflowOrgV1MXJobSpec -from kubeflow.training.models.kubeflow_org_v1_paddle_elastic_policy import KubeflowOrgV1PaddleElasticPolicy -from kubeflow.training.models.kubeflow_org_v1_paddle_job import KubeflowOrgV1PaddleJob -from kubeflow.training.models.kubeflow_org_v1_paddle_job_list import KubeflowOrgV1PaddleJobList -from kubeflow.training.models.kubeflow_org_v1_paddle_job_spec import KubeflowOrgV1PaddleJobSpec -from kubeflow.training.models.kubeflow_org_v1_py_torch_job import KubeflowOrgV1PyTorchJob -from kubeflow.training.models.kubeflow_org_v1_py_torch_job_list import KubeflowOrgV1PyTorchJobList -from kubeflow.training.models.kubeflow_org_v1_py_torch_job_spec import KubeflowOrgV1PyTorchJobSpec -from kubeflow.training.models.kubeflow_org_v1_rdzv_conf import KubeflowOrgV1RDZVConf -from kubeflow.training.models.kubeflow_org_v1_replica_spec import KubeflowOrgV1ReplicaSpec -from kubeflow.training.models.kubeflow_org_v1_replica_status import KubeflowOrgV1ReplicaStatus -from kubeflow.training.models.kubeflow_org_v1_run_policy import KubeflowOrgV1RunPolicy -from kubeflow.training.models.kubeflow_org_v1_scheduling_policy import KubeflowOrgV1SchedulingPolicy -from kubeflow.training.models.kubeflow_org_v1_tf_job import KubeflowOrgV1TFJob -from kubeflow.training.models.kubeflow_org_v1_tf_job_list import KubeflowOrgV1TFJobList -from kubeflow.training.models.kubeflow_org_v1_tf_job_spec import KubeflowOrgV1TFJobSpec -from kubeflow.training.models.kubeflow_org_v1_xg_boost_job import KubeflowOrgV1XGBoostJob -from kubeflow.training.models.kubeflow_org_v1_xg_boost_job_list import KubeflowOrgV1XGBoostJobList -from kubeflow.training.models.kubeflow_org_v1_xg_boost_job_spec import KubeflowOrgV1XGBoostJobSpec diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_elastic_policy.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_elastic_policy.py deleted file mode 100644 index 8f8b49dc6a..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_elastic_policy.py +++ /dev/null @@ -1,392 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1ElasticPolicy(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'max_replicas': 'int', - 'max_restarts': 'int', - 'metrics': 'list[K8sIoApiAutoscalingV2MetricSpec]', - 'min_replicas': 'int', - 'n_proc_per_node': 'int', - 'rdzv_backend': 'str', - 'rdzv_conf': 'list[KubeflowOrgV1RDZVConf]', - 'rdzv_host': 'str', - 'rdzv_id': 'str', - 'rdzv_port': 'int', - 'standalone': 'bool' - } - - attribute_map = { - 'max_replicas': 'maxReplicas', - 'max_restarts': 'maxRestarts', - 'metrics': 'metrics', - 'min_replicas': 'minReplicas', - 'n_proc_per_node': 'nProcPerNode', - 'rdzv_backend': 'rdzvBackend', - 'rdzv_conf': 'rdzvConf', - 'rdzv_host': 'rdzvHost', - 'rdzv_id': 'rdzvId', - 'rdzv_port': 'rdzvPort', - 'standalone': 'standalone' - } - - def __init__(self, max_replicas=None, max_restarts=None, metrics=None, min_replicas=None, n_proc_per_node=None, rdzv_backend=None, rdzv_conf=None, rdzv_host=None, rdzv_id=None, rdzv_port=None, standalone=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1ElasticPolicy - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._max_replicas = None - self._max_restarts = None - self._metrics = None - self._min_replicas = None - self._n_proc_per_node = None - self._rdzv_backend = None - self._rdzv_conf = None - self._rdzv_host = None - self._rdzv_id = None - self._rdzv_port = None - self._standalone = None - self.discriminator = None - - if max_replicas is not None: - self.max_replicas = max_replicas - if max_restarts is not None: - self.max_restarts = max_restarts - if metrics is not None: - self.metrics = metrics - if min_replicas is not None: - self.min_replicas = min_replicas - if n_proc_per_node is not None: - self.n_proc_per_node = n_proc_per_node - if rdzv_backend is not None: - self.rdzv_backend = rdzv_backend - if rdzv_conf is not None: - self.rdzv_conf = rdzv_conf - if rdzv_host is not None: - self.rdzv_host = rdzv_host - if rdzv_id is not None: - self.rdzv_id = rdzv_id - if rdzv_port is not None: - self.rdzv_port = rdzv_port - if standalone is not None: - self.standalone = standalone - - @property - def max_replicas(self): - """Gets the max_replicas of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - - upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas, defaults to null. # noqa: E501 - - :return: The max_replicas of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :rtype: int - """ - return self._max_replicas - - @max_replicas.setter - def max_replicas(self, max_replicas): - """Sets the max_replicas of this KubeflowOrgV1ElasticPolicy. - - upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas, defaults to null. # noqa: E501 - - :param max_replicas: The max_replicas of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :type: int - """ - - self._max_replicas = max_replicas - - @property - def max_restarts(self): - """Gets the max_restarts of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - - - :return: The max_restarts of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :rtype: int - """ - return self._max_restarts - - @max_restarts.setter - def max_restarts(self, max_restarts): - """Sets the max_restarts of this KubeflowOrgV1ElasticPolicy. - - - :param max_restarts: The max_restarts of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :type: int - """ - - self._max_restarts = max_restarts - - @property - def metrics(self): - """Gets the metrics of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - - Metrics contains the specifications which are used to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated with multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the HPA will not be created. # noqa: E501 - - :return: The metrics of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :rtype: list[K8sIoApiAutoscalingV2MetricSpec] - """ - return self._metrics - - @metrics.setter - def metrics(self, metrics): - """Sets the metrics of this KubeflowOrgV1ElasticPolicy. - - Metrics contains the specifications which are used to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated with multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the HPA will not be created. # noqa: E501 - - :param metrics: The metrics of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :type: list[K8sIoApiAutoscalingV2MetricSpec] - """ - - self._metrics = metrics - - @property - def min_replicas(self): - """Gets the min_replicas of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - - minReplicas is the lower limit for the number of replicas to which the training job can scale down. It defaults to null. # noqa: E501 - - :return: The min_replicas of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :rtype: int - """ - return self._min_replicas - - @min_replicas.setter - def min_replicas(self, min_replicas): - """Sets the min_replicas of this KubeflowOrgV1ElasticPolicy. - - minReplicas is the lower limit for the number of replicas to which the training job can scale down. It defaults to null. # noqa: E501 - - :param min_replicas: The min_replicas of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :type: int - """ - - self._min_replicas = min_replicas - - @property - def n_proc_per_node(self): - """Gets the n_proc_per_node of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - - Number of workers per node; supported values: [auto, cpu, gpu, int]. Deprecated: This API is deprecated in v1.7+ Use .spec.nprocPerNode instead. # noqa: E501 - - :return: The n_proc_per_node of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :rtype: int - """ - return self._n_proc_per_node - - @n_proc_per_node.setter - def n_proc_per_node(self, n_proc_per_node): - """Sets the n_proc_per_node of this KubeflowOrgV1ElasticPolicy. - - Number of workers per node; supported values: [auto, cpu, gpu, int]. Deprecated: This API is deprecated in v1.7+ Use .spec.nprocPerNode instead. # noqa: E501 - - :param n_proc_per_node: The n_proc_per_node of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :type: int - """ - - self._n_proc_per_node = n_proc_per_node - - @property - def rdzv_backend(self): - """Gets the rdzv_backend of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - - - :return: The rdzv_backend of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :rtype: str - """ - return self._rdzv_backend - - @rdzv_backend.setter - def rdzv_backend(self, rdzv_backend): - """Sets the rdzv_backend of this KubeflowOrgV1ElasticPolicy. - - - :param rdzv_backend: The rdzv_backend of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :type: str - """ - - self._rdzv_backend = rdzv_backend - - @property - def rdzv_conf(self): - """Gets the rdzv_conf of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - - RDZVConf contains additional rendezvous configuration (=,=,...). # noqa: E501 - - :return: The rdzv_conf of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :rtype: list[KubeflowOrgV1RDZVConf] - """ - return self._rdzv_conf - - @rdzv_conf.setter - def rdzv_conf(self, rdzv_conf): - """Sets the rdzv_conf of this KubeflowOrgV1ElasticPolicy. - - RDZVConf contains additional rendezvous configuration (=,=,...). # noqa: E501 - - :param rdzv_conf: The rdzv_conf of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :type: list[KubeflowOrgV1RDZVConf] - """ - - self._rdzv_conf = rdzv_conf - - @property - def rdzv_host(self): - """Gets the rdzv_host of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - - - :return: The rdzv_host of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :rtype: str - """ - return self._rdzv_host - - @rdzv_host.setter - def rdzv_host(self, rdzv_host): - """Sets the rdzv_host of this KubeflowOrgV1ElasticPolicy. - - - :param rdzv_host: The rdzv_host of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :type: str - """ - - self._rdzv_host = rdzv_host - - @property - def rdzv_id(self): - """Gets the rdzv_id of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - - - :return: The rdzv_id of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :rtype: str - """ - return self._rdzv_id - - @rdzv_id.setter - def rdzv_id(self, rdzv_id): - """Sets the rdzv_id of this KubeflowOrgV1ElasticPolicy. - - - :param rdzv_id: The rdzv_id of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :type: str - """ - - self._rdzv_id = rdzv_id - - @property - def rdzv_port(self): - """Gets the rdzv_port of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - - - :return: The rdzv_port of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :rtype: int - """ - return self._rdzv_port - - @rdzv_port.setter - def rdzv_port(self, rdzv_port): - """Sets the rdzv_port of this KubeflowOrgV1ElasticPolicy. - - - :param rdzv_port: The rdzv_port of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :type: int - """ - - self._rdzv_port = rdzv_port - - @property - def standalone(self): - """Gets the standalone of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - - Start a local standalone rendezvous backend that is represented by a C10d TCP store on port 29400. Useful when launching single-node, multi-worker job. If specified --rdzv_backend, --rdzv_endpoint, --rdzv_id are auto-assigned; any explicitly set values are ignored. # noqa: E501 - - :return: The standalone of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :rtype: bool - """ - return self._standalone - - @standalone.setter - def standalone(self, standalone): - """Sets the standalone of this KubeflowOrgV1ElasticPolicy. - - Start a local standalone rendezvous backend that is represented by a C10d TCP store on port 29400. Useful when launching single-node, multi-worker job. If specified --rdzv_backend, --rdzv_endpoint, --rdzv_id are auto-assigned; any explicitly set values are ignored. # noqa: E501 - - :param standalone: The standalone of this KubeflowOrgV1ElasticPolicy. # noqa: E501 - :type: bool - """ - - self._standalone = standalone - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1ElasticPolicy): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1ElasticPolicy): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_job_condition.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_job_condition.py deleted file mode 100644 index 2000f8ca2e..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_job_condition.py +++ /dev/null @@ -1,260 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1JobCondition(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'last_transition_time': 'datetime', - 'last_update_time': 'datetime', - 'message': 'str', - 'reason': 'str', - 'status': 'str', - 'type': 'str' - } - - attribute_map = { - 'last_transition_time': 'lastTransitionTime', - 'last_update_time': 'lastUpdateTime', - 'message': 'message', - 'reason': 'reason', - 'status': 'status', - 'type': 'type' - } - - def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status='', type='', local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1JobCondition - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._last_transition_time = None - self._last_update_time = None - self._message = None - self._reason = None - self._status = None - self._type = None - self.discriminator = None - - if last_transition_time is not None: - self.last_transition_time = last_transition_time - if last_update_time is not None: - self.last_update_time = last_update_time - if message is not None: - self.message = message - if reason is not None: - self.reason = reason - self.status = status - self.type = type - - @property - def last_transition_time(self): - """Gets the last_transition_time of this KubeflowOrgV1JobCondition. # noqa: E501 - - - :return: The last_transition_time of this KubeflowOrgV1JobCondition. # noqa: E501 - :rtype: datetime - """ - return self._last_transition_time - - @last_transition_time.setter - def last_transition_time(self, last_transition_time): - """Sets the last_transition_time of this KubeflowOrgV1JobCondition. - - - :param last_transition_time: The last_transition_time of this KubeflowOrgV1JobCondition. # noqa: E501 - :type: datetime - """ - - self._last_transition_time = last_transition_time - - @property - def last_update_time(self): - """Gets the last_update_time of this KubeflowOrgV1JobCondition. # noqa: E501 - - - :return: The last_update_time of this KubeflowOrgV1JobCondition. # noqa: E501 - :rtype: datetime - """ - return self._last_update_time - - @last_update_time.setter - def last_update_time(self, last_update_time): - """Sets the last_update_time of this KubeflowOrgV1JobCondition. - - - :param last_update_time: The last_update_time of this KubeflowOrgV1JobCondition. # noqa: E501 - :type: datetime - """ - - self._last_update_time = last_update_time - - @property - def message(self): - """Gets the message of this KubeflowOrgV1JobCondition. # noqa: E501 - - A human readable message indicating details about the transition. # noqa: E501 - - :return: The message of this KubeflowOrgV1JobCondition. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this KubeflowOrgV1JobCondition. - - A human readable message indicating details about the transition. # noqa: E501 - - :param message: The message of this KubeflowOrgV1JobCondition. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def reason(self): - """Gets the reason of this KubeflowOrgV1JobCondition. # noqa: E501 - - The reason for the condition's last transition. # noqa: E501 - - :return: The reason of this KubeflowOrgV1JobCondition. # noqa: E501 - :rtype: str - """ - return self._reason - - @reason.setter - def reason(self, reason): - """Sets the reason of this KubeflowOrgV1JobCondition. - - The reason for the condition's last transition. # noqa: E501 - - :param reason: The reason of this KubeflowOrgV1JobCondition. # noqa: E501 - :type: str - """ - - self._reason = reason - - @property - def status(self): - """Gets the status of this KubeflowOrgV1JobCondition. # noqa: E501 - - Status of the condition, one of True, False, Unknown. # noqa: E501 - - :return: The status of this KubeflowOrgV1JobCondition. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this KubeflowOrgV1JobCondition. - - Status of the condition, one of True, False, Unknown. # noqa: E501 - - :param status: The status of this KubeflowOrgV1JobCondition. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - - self._status = status - - @property - def type(self): - """Gets the type of this KubeflowOrgV1JobCondition. # noqa: E501 - - Type of job condition. # noqa: E501 - - :return: The type of this KubeflowOrgV1JobCondition. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this KubeflowOrgV1JobCondition. - - Type of job condition. # noqa: E501 - - :param type: The type of this KubeflowOrgV1JobCondition. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - - self._type = type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1JobCondition): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1JobCondition): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_job_status.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_job_status.py deleted file mode 100644 index 3b1bf12573..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_job_status.py +++ /dev/null @@ -1,228 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1JobStatus(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'completion_time': 'datetime', - 'conditions': 'list[KubeflowOrgV1JobCondition]', - 'last_reconcile_time': 'datetime', - 'replica_statuses': 'dict(str, KubeflowOrgV1ReplicaStatus)', - 'start_time': 'datetime' - } - - attribute_map = { - 'completion_time': 'completionTime', - 'conditions': 'conditions', - 'last_reconcile_time': 'lastReconcileTime', - 'replica_statuses': 'replicaStatuses', - 'start_time': 'startTime' - } - - def __init__(self, completion_time=None, conditions=None, last_reconcile_time=None, replica_statuses=None, start_time=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1JobStatus - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._completion_time = None - self._conditions = None - self._last_reconcile_time = None - self._replica_statuses = None - self._start_time = None - self.discriminator = None - - if completion_time is not None: - self.completion_time = completion_time - if conditions is not None: - self.conditions = conditions - if last_reconcile_time is not None: - self.last_reconcile_time = last_reconcile_time - if replica_statuses is not None: - self.replica_statuses = replica_statuses - if start_time is not None: - self.start_time = start_time - - @property - def completion_time(self): - """Gets the completion_time of this KubeflowOrgV1JobStatus. # noqa: E501 - - - :return: The completion_time of this KubeflowOrgV1JobStatus. # noqa: E501 - :rtype: datetime - """ - return self._completion_time - - @completion_time.setter - def completion_time(self, completion_time): - """Sets the completion_time of this KubeflowOrgV1JobStatus. - - - :param completion_time: The completion_time of this KubeflowOrgV1JobStatus. # noqa: E501 - :type: datetime - """ - - self._completion_time = completion_time - - @property - def conditions(self): - """Gets the conditions of this KubeflowOrgV1JobStatus. # noqa: E501 - - Conditions is an array of current observed job conditions. # noqa: E501 - - :return: The conditions of this KubeflowOrgV1JobStatus. # noqa: E501 - :rtype: list[KubeflowOrgV1JobCondition] - """ - return self._conditions - - @conditions.setter - def conditions(self, conditions): - """Sets the conditions of this KubeflowOrgV1JobStatus. - - Conditions is an array of current observed job conditions. # noqa: E501 - - :param conditions: The conditions of this KubeflowOrgV1JobStatus. # noqa: E501 - :type: list[KubeflowOrgV1JobCondition] - """ - - self._conditions = conditions - - @property - def last_reconcile_time(self): - """Gets the last_reconcile_time of this KubeflowOrgV1JobStatus. # noqa: E501 - - - :return: The last_reconcile_time of this KubeflowOrgV1JobStatus. # noqa: E501 - :rtype: datetime - """ - return self._last_reconcile_time - - @last_reconcile_time.setter - def last_reconcile_time(self, last_reconcile_time): - """Sets the last_reconcile_time of this KubeflowOrgV1JobStatus. - - - :param last_reconcile_time: The last_reconcile_time of this KubeflowOrgV1JobStatus. # noqa: E501 - :type: datetime - """ - - self._last_reconcile_time = last_reconcile_time - - @property - def replica_statuses(self): - """Gets the replica_statuses of this KubeflowOrgV1JobStatus. # noqa: E501 - - ReplicaStatuses is map of ReplicaType and ReplicaStatus, specifies the status of each replica. # noqa: E501 - - :return: The replica_statuses of this KubeflowOrgV1JobStatus. # noqa: E501 - :rtype: dict(str, KubeflowOrgV1ReplicaStatus) - """ - return self._replica_statuses - - @replica_statuses.setter - def replica_statuses(self, replica_statuses): - """Sets the replica_statuses of this KubeflowOrgV1JobStatus. - - ReplicaStatuses is map of ReplicaType and ReplicaStatus, specifies the status of each replica. # noqa: E501 - - :param replica_statuses: The replica_statuses of this KubeflowOrgV1JobStatus. # noqa: E501 - :type: dict(str, KubeflowOrgV1ReplicaStatus) - """ - - self._replica_statuses = replica_statuses - - @property - def start_time(self): - """Gets the start_time of this KubeflowOrgV1JobStatus. # noqa: E501 - - - :return: The start_time of this KubeflowOrgV1JobStatus. # noqa: E501 - :rtype: datetime - """ - return self._start_time - - @start_time.setter - def start_time(self, start_time): - """Sets the start_time of this KubeflowOrgV1JobStatus. - - - :param start_time: The start_time of this KubeflowOrgV1JobStatus. # noqa: E501 - :type: datetime - """ - - self._start_time = start_time - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1JobStatus): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1JobStatus): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mpi_job.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_mpi_job.py deleted file mode 100644 index ecfe6a0e77..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mpi_job.py +++ /dev/null @@ -1,228 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1MPIJob(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'kind': 'str', - 'metadata': 'V1ObjectMeta', - 'spec': 'KubeflowOrgV1MPIJobSpec', - 'status': 'KubeflowOrgV1JobStatus' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'kind': 'kind', - 'metadata': 'metadata', - 'spec': 'spec', - 'status': 'status' - } - - def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1MPIJob - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._kind = None - self._metadata = None - self._spec = None - self._status = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - if spec is not None: - self.spec = spec - if status is not None: - self.status = status - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1MPIJob. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1MPIJob. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1MPIJob. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1MPIJob. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1MPIJob. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1MPIJob. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1MPIJob. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1MPIJob. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1MPIJob. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1MPIJob. # noqa: E501 - :rtype: V1ObjectMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1MPIJob. - - - :param metadata: The metadata of this KubeflowOrgV1MPIJob. # noqa: E501 - :type: V1ObjectMeta - """ - - self._metadata = metadata - - @property - def spec(self): - """Gets the spec of this KubeflowOrgV1MPIJob. # noqa: E501 - - - :return: The spec of this KubeflowOrgV1MPIJob. # noqa: E501 - :rtype: KubeflowOrgV1MPIJobSpec - """ - return self._spec - - @spec.setter - def spec(self, spec): - """Sets the spec of this KubeflowOrgV1MPIJob. - - - :param spec: The spec of this KubeflowOrgV1MPIJob. # noqa: E501 - :type: KubeflowOrgV1MPIJobSpec - """ - - self._spec = spec - - @property - def status(self): - """Gets the status of this KubeflowOrgV1MPIJob. # noqa: E501 - - - :return: The status of this KubeflowOrgV1MPIJob. # noqa: E501 - :rtype: KubeflowOrgV1JobStatus - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this KubeflowOrgV1MPIJob. - - - :param status: The status of this KubeflowOrgV1MPIJob. # noqa: E501 - :type: KubeflowOrgV1JobStatus - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1MPIJob): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1MPIJob): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mpi_job_list.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_mpi_job_list.py deleted file mode 100644 index eeff6bb7ab..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mpi_job_list.py +++ /dev/null @@ -1,203 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1MPIJobList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'items': 'list[KubeflowOrgV1MPIJob]', - 'kind': 'str', - 'metadata': 'V1ListMeta' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'items': 'items', - 'kind': 'kind', - 'metadata': 'metadata' - } - - def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1MPIJobList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._items = None - self._kind = None - self._metadata = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - self.items = items - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1MPIJobList. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1MPIJobList. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1MPIJobList. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1MPIJobList. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def items(self): - """Gets the items of this KubeflowOrgV1MPIJobList. # noqa: E501 - - - :return: The items of this KubeflowOrgV1MPIJobList. # noqa: E501 - :rtype: list[KubeflowOrgV1MPIJob] - """ - return self._items - - @items.setter - def items(self, items): - """Sets the items of this KubeflowOrgV1MPIJobList. - - - :param items: The items of this KubeflowOrgV1MPIJobList. # noqa: E501 - :type: list[KubeflowOrgV1MPIJob] - """ - if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 - raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 - - self._items = items - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1MPIJobList. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1MPIJobList. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1MPIJobList. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1MPIJobList. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1MPIJobList. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1MPIJobList. # noqa: E501 - :rtype: V1ListMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1MPIJobList. - - - :param metadata: The metadata of this KubeflowOrgV1MPIJobList. # noqa: E501 - :type: V1ListMeta - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1MPIJobList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1MPIJobList): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mpi_job_spec.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_mpi_job_spec.py deleted file mode 100644 index 7ad3bba6e8..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mpi_job_spec.py +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1MPIJobSpec(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'clean_pod_policy': 'str', - 'main_container': 'str', - 'mpi_replica_specs': 'dict(str, KubeflowOrgV1ReplicaSpec)', - 'run_policy': 'KubeflowOrgV1RunPolicy', - 'slots_per_worker': 'int' - } - - attribute_map = { - 'clean_pod_policy': 'cleanPodPolicy', - 'main_container': 'mainContainer', - 'mpi_replica_specs': 'mpiReplicaSpecs', - 'run_policy': 'runPolicy', - 'slots_per_worker': 'slotsPerWorker' - } - - def __init__(self, clean_pod_policy=None, main_container=None, mpi_replica_specs=None, run_policy=None, slots_per_worker=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1MPIJobSpec - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._clean_pod_policy = None - self._main_container = None - self._mpi_replica_specs = None - self._run_policy = None - self._slots_per_worker = None - self.discriminator = None - - if clean_pod_policy is not None: - self.clean_pod_policy = clean_pod_policy - if main_container is not None: - self.main_container = main_container - self.mpi_replica_specs = mpi_replica_specs - if run_policy is not None: - self.run_policy = run_policy - if slots_per_worker is not None: - self.slots_per_worker = slots_per_worker - - @property - def clean_pod_policy(self): - """Gets the clean_pod_policy of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - - CleanPodPolicy defines the policy that whether to kill pods after the job completes. Defaults to None. # noqa: E501 - - :return: The clean_pod_policy of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - :rtype: str - """ - return self._clean_pod_policy - - @clean_pod_policy.setter - def clean_pod_policy(self, clean_pod_policy): - """Sets the clean_pod_policy of this KubeflowOrgV1MPIJobSpec. - - CleanPodPolicy defines the policy that whether to kill pods after the job completes. Defaults to None. # noqa: E501 - - :param clean_pod_policy: The clean_pod_policy of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - :type: str - """ - - self._clean_pod_policy = clean_pod_policy - - @property - def main_container(self): - """Gets the main_container of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - - MainContainer specifies name of the main container which executes the MPI code. # noqa: E501 - - :return: The main_container of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - :rtype: str - """ - return self._main_container - - @main_container.setter - def main_container(self, main_container): - """Sets the main_container of this KubeflowOrgV1MPIJobSpec. - - MainContainer specifies name of the main container which executes the MPI code. # noqa: E501 - - :param main_container: The main_container of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - :type: str - """ - - self._main_container = main_container - - @property - def mpi_replica_specs(self): - """Gets the mpi_replica_specs of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - - `MPIReplicaSpecs` contains maps from `MPIReplicaType` to `ReplicaSpec` that specify the MPI replicas to run. # noqa: E501 - - :return: The mpi_replica_specs of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - :rtype: dict(str, KubeflowOrgV1ReplicaSpec) - """ - return self._mpi_replica_specs - - @mpi_replica_specs.setter - def mpi_replica_specs(self, mpi_replica_specs): - """Sets the mpi_replica_specs of this KubeflowOrgV1MPIJobSpec. - - `MPIReplicaSpecs` contains maps from `MPIReplicaType` to `ReplicaSpec` that specify the MPI replicas to run. # noqa: E501 - - :param mpi_replica_specs: The mpi_replica_specs of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - :type: dict(str, KubeflowOrgV1ReplicaSpec) - """ - if self.local_vars_configuration.client_side_validation and mpi_replica_specs is None: # noqa: E501 - raise ValueError("Invalid value for `mpi_replica_specs`, must not be `None`") # noqa: E501 - - self._mpi_replica_specs = mpi_replica_specs - - @property - def run_policy(self): - """Gets the run_policy of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - - - :return: The run_policy of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - :rtype: KubeflowOrgV1RunPolicy - """ - return self._run_policy - - @run_policy.setter - def run_policy(self, run_policy): - """Sets the run_policy of this KubeflowOrgV1MPIJobSpec. - - - :param run_policy: The run_policy of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - :type: KubeflowOrgV1RunPolicy - """ - - self._run_policy = run_policy - - @property - def slots_per_worker(self): - """Gets the slots_per_worker of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - - Specifies the number of slots per worker used in hostfile. Defaults to 1. # noqa: E501 - - :return: The slots_per_worker of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - :rtype: int - """ - return self._slots_per_worker - - @slots_per_worker.setter - def slots_per_worker(self, slots_per_worker): - """Sets the slots_per_worker of this KubeflowOrgV1MPIJobSpec. - - Specifies the number of slots per worker used in hostfile. Defaults to 1. # noqa: E501 - - :param slots_per_worker: The slots_per_worker of this KubeflowOrgV1MPIJobSpec. # noqa: E501 - :type: int - """ - - self._slots_per_worker = slots_per_worker - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1MPIJobSpec): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1MPIJobSpec): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mx_job.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_mx_job.py deleted file mode 100644 index 2b64c7c5a5..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mx_job.py +++ /dev/null @@ -1,228 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1MXJob(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'kind': 'str', - 'metadata': 'V1ObjectMeta', - 'spec': 'KubeflowOrgV1MXJobSpec', - 'status': 'KubeflowOrgV1JobStatus' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'kind': 'kind', - 'metadata': 'metadata', - 'spec': 'spec', - 'status': 'status' - } - - def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1MXJob - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._kind = None - self._metadata = None - self._spec = None - self._status = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - if spec is not None: - self.spec = spec - if status is not None: - self.status = status - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1MXJob. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1MXJob. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1MXJob. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1MXJob. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1MXJob. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1MXJob. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1MXJob. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1MXJob. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1MXJob. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1MXJob. # noqa: E501 - :rtype: V1ObjectMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1MXJob. - - - :param metadata: The metadata of this KubeflowOrgV1MXJob. # noqa: E501 - :type: V1ObjectMeta - """ - - self._metadata = metadata - - @property - def spec(self): - """Gets the spec of this KubeflowOrgV1MXJob. # noqa: E501 - - - :return: The spec of this KubeflowOrgV1MXJob. # noqa: E501 - :rtype: KubeflowOrgV1MXJobSpec - """ - return self._spec - - @spec.setter - def spec(self, spec): - """Sets the spec of this KubeflowOrgV1MXJob. - - - :param spec: The spec of this KubeflowOrgV1MXJob. # noqa: E501 - :type: KubeflowOrgV1MXJobSpec - """ - - self._spec = spec - - @property - def status(self): - """Gets the status of this KubeflowOrgV1MXJob. # noqa: E501 - - - :return: The status of this KubeflowOrgV1MXJob. # noqa: E501 - :rtype: KubeflowOrgV1JobStatus - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this KubeflowOrgV1MXJob. - - - :param status: The status of this KubeflowOrgV1MXJob. # noqa: E501 - :type: KubeflowOrgV1JobStatus - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1MXJob): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1MXJob): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mx_job_list.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_mx_job_list.py deleted file mode 100644 index 70a00fcd82..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mx_job_list.py +++ /dev/null @@ -1,203 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1MXJobList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'items': 'list[KubeflowOrgV1MXJob]', - 'kind': 'str', - 'metadata': 'V1ListMeta' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'items': 'items', - 'kind': 'kind', - 'metadata': 'metadata' - } - - def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1MXJobList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._items = None - self._kind = None - self._metadata = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - self.items = items - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1MXJobList. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1MXJobList. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1MXJobList. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1MXJobList. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def items(self): - """Gets the items of this KubeflowOrgV1MXJobList. # noqa: E501 - - - :return: The items of this KubeflowOrgV1MXJobList. # noqa: E501 - :rtype: list[KubeflowOrgV1MXJob] - """ - return self._items - - @items.setter - def items(self, items): - """Sets the items of this KubeflowOrgV1MXJobList. - - - :param items: The items of this KubeflowOrgV1MXJobList. # noqa: E501 - :type: list[KubeflowOrgV1MXJob] - """ - if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 - raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 - - self._items = items - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1MXJobList. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1MXJobList. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1MXJobList. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1MXJobList. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1MXJobList. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1MXJobList. # noqa: E501 - :rtype: V1ListMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1MXJobList. - - - :param metadata: The metadata of this KubeflowOrgV1MXJobList. # noqa: E501 - :type: V1ListMeta - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1MXJobList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1MXJobList): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mx_job_spec.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_mx_job_spec.py deleted file mode 100644 index aa880a7a48..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_mx_job_spec.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1MXJobSpec(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'job_mode': 'str', - 'mx_replica_specs': 'dict(str, KubeflowOrgV1ReplicaSpec)', - 'run_policy': 'KubeflowOrgV1RunPolicy' - } - - attribute_map = { - 'job_mode': 'jobMode', - 'mx_replica_specs': 'mxReplicaSpecs', - 'run_policy': 'runPolicy' - } - - def __init__(self, job_mode='', mx_replica_specs=None, run_policy=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1MXJobSpec - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._job_mode = None - self._mx_replica_specs = None - self._run_policy = None - self.discriminator = None - - self.job_mode = job_mode - self.mx_replica_specs = mx_replica_specs - self.run_policy = run_policy - - @property - def job_mode(self): - """Gets the job_mode of this KubeflowOrgV1MXJobSpec. # noqa: E501 - - JobMode specify the kind of MXjob to do. Different mode may have different MXReplicaSpecs request # noqa: E501 - - :return: The job_mode of this KubeflowOrgV1MXJobSpec. # noqa: E501 - :rtype: str - """ - return self._job_mode - - @job_mode.setter - def job_mode(self, job_mode): - """Sets the job_mode of this KubeflowOrgV1MXJobSpec. - - JobMode specify the kind of MXjob to do. Different mode may have different MXReplicaSpecs request # noqa: E501 - - :param job_mode: The job_mode of this KubeflowOrgV1MXJobSpec. # noqa: E501 - :type: str - """ - if self.local_vars_configuration.client_side_validation and job_mode is None: # noqa: E501 - raise ValueError("Invalid value for `job_mode`, must not be `None`") # noqa: E501 - - self._job_mode = job_mode - - @property - def mx_replica_specs(self): - """Gets the mx_replica_specs of this KubeflowOrgV1MXJobSpec. # noqa: E501 - - MXReplicaSpecs is map of ReplicaType and ReplicaSpec specifies the MX replicas to run. For example, { \"Scheduler\": ReplicaSpec, \"Server\": ReplicaSpec, \"Worker\": ReplicaSpec, } # noqa: E501 - - :return: The mx_replica_specs of this KubeflowOrgV1MXJobSpec. # noqa: E501 - :rtype: dict(str, KubeflowOrgV1ReplicaSpec) - """ - return self._mx_replica_specs - - @mx_replica_specs.setter - def mx_replica_specs(self, mx_replica_specs): - """Sets the mx_replica_specs of this KubeflowOrgV1MXJobSpec. - - MXReplicaSpecs is map of ReplicaType and ReplicaSpec specifies the MX replicas to run. For example, { \"Scheduler\": ReplicaSpec, \"Server\": ReplicaSpec, \"Worker\": ReplicaSpec, } # noqa: E501 - - :param mx_replica_specs: The mx_replica_specs of this KubeflowOrgV1MXJobSpec. # noqa: E501 - :type: dict(str, KubeflowOrgV1ReplicaSpec) - """ - if self.local_vars_configuration.client_side_validation and mx_replica_specs is None: # noqa: E501 - raise ValueError("Invalid value for `mx_replica_specs`, must not be `None`") # noqa: E501 - - self._mx_replica_specs = mx_replica_specs - - @property - def run_policy(self): - """Gets the run_policy of this KubeflowOrgV1MXJobSpec. # noqa: E501 - - - :return: The run_policy of this KubeflowOrgV1MXJobSpec. # noqa: E501 - :rtype: KubeflowOrgV1RunPolicy - """ - return self._run_policy - - @run_policy.setter - def run_policy(self, run_policy): - """Sets the run_policy of this KubeflowOrgV1MXJobSpec. - - - :param run_policy: The run_policy of this KubeflowOrgV1MXJobSpec. # noqa: E501 - :type: KubeflowOrgV1RunPolicy - """ - if self.local_vars_configuration.client_side_validation and run_policy is None: # noqa: E501 - raise ValueError("Invalid value for `run_policy`, must not be `None`") # noqa: E501 - - self._run_policy = run_policy - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1MXJobSpec): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1MXJobSpec): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_elastic_policy.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_elastic_policy.py deleted file mode 100644 index e6b9b37e00..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_elastic_policy.py +++ /dev/null @@ -1,206 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1PaddleElasticPolicy(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'max_replicas': 'int', - 'max_restarts': 'int', - 'metrics': 'list[K8sIoApiAutoscalingV2MetricSpec]', - 'min_replicas': 'int' - } - - attribute_map = { - 'max_replicas': 'maxReplicas', - 'max_restarts': 'maxRestarts', - 'metrics': 'metrics', - 'min_replicas': 'minReplicas' - } - - def __init__(self, max_replicas=None, max_restarts=None, metrics=None, min_replicas=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1PaddleElasticPolicy - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._max_replicas = None - self._max_restarts = None - self._metrics = None - self._min_replicas = None - self.discriminator = None - - if max_replicas is not None: - self.max_replicas = max_replicas - if max_restarts is not None: - self.max_restarts = max_restarts - if metrics is not None: - self.metrics = metrics - if min_replicas is not None: - self.min_replicas = min_replicas - - @property - def max_replicas(self): - """Gets the max_replicas of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - - upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas, defaults to null. # noqa: E501 - - :return: The max_replicas of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - :rtype: int - """ - return self._max_replicas - - @max_replicas.setter - def max_replicas(self, max_replicas): - """Sets the max_replicas of this KubeflowOrgV1PaddleElasticPolicy. - - upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas, defaults to null. # noqa: E501 - - :param max_replicas: The max_replicas of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - :type: int - """ - - self._max_replicas = max_replicas - - @property - def max_restarts(self): - """Gets the max_restarts of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - - MaxRestarts is the limit for restart times of pods in elastic mode. # noqa: E501 - - :return: The max_restarts of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - :rtype: int - """ - return self._max_restarts - - @max_restarts.setter - def max_restarts(self, max_restarts): - """Sets the max_restarts of this KubeflowOrgV1PaddleElasticPolicy. - - MaxRestarts is the limit for restart times of pods in elastic mode. # noqa: E501 - - :param max_restarts: The max_restarts of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - :type: int - """ - - self._max_restarts = max_restarts - - @property - def metrics(self): - """Gets the metrics of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - - Metrics contains the specifications which are used to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated with multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the HPA will not be created. # noqa: E501 - - :return: The metrics of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - :rtype: list[K8sIoApiAutoscalingV2MetricSpec] - """ - return self._metrics - - @metrics.setter - def metrics(self, metrics): - """Sets the metrics of this KubeflowOrgV1PaddleElasticPolicy. - - Metrics contains the specifications which are used to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated with multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the HPA will not be created. # noqa: E501 - - :param metrics: The metrics of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - :type: list[K8sIoApiAutoscalingV2MetricSpec] - """ - - self._metrics = metrics - - @property - def min_replicas(self): - """Gets the min_replicas of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - - minReplicas is the lower limit for the number of replicas to which the training job can scale down. It defaults to null. # noqa: E501 - - :return: The min_replicas of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - :rtype: int - """ - return self._min_replicas - - @min_replicas.setter - def min_replicas(self, min_replicas): - """Sets the min_replicas of this KubeflowOrgV1PaddleElasticPolicy. - - minReplicas is the lower limit for the number of replicas to which the training job can scale down. It defaults to null. # noqa: E501 - - :param min_replicas: The min_replicas of this KubeflowOrgV1PaddleElasticPolicy. # noqa: E501 - :type: int - """ - - self._min_replicas = min_replicas - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1PaddleElasticPolicy): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1PaddleElasticPolicy): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_job.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_job.py deleted file mode 100644 index d02cd42bc0..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_job.py +++ /dev/null @@ -1,228 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1PaddleJob(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'kind': 'str', - 'metadata': 'V1ObjectMeta', - 'spec': 'KubeflowOrgV1PaddleJobSpec', - 'status': 'KubeflowOrgV1JobStatus' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'kind': 'kind', - 'metadata': 'metadata', - 'spec': 'spec', - 'status': 'status' - } - - def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1PaddleJob - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._kind = None - self._metadata = None - self._spec = None - self._status = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - if spec is not None: - self.spec = spec - if status is not None: - self.status = status - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1PaddleJob. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1PaddleJob. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1PaddleJob. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1PaddleJob. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1PaddleJob. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1PaddleJob. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1PaddleJob. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1PaddleJob. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1PaddleJob. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1PaddleJob. # noqa: E501 - :rtype: V1ObjectMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1PaddleJob. - - - :param metadata: The metadata of this KubeflowOrgV1PaddleJob. # noqa: E501 - :type: V1ObjectMeta - """ - - self._metadata = metadata - - @property - def spec(self): - """Gets the spec of this KubeflowOrgV1PaddleJob. # noqa: E501 - - - :return: The spec of this KubeflowOrgV1PaddleJob. # noqa: E501 - :rtype: KubeflowOrgV1PaddleJobSpec - """ - return self._spec - - @spec.setter - def spec(self, spec): - """Sets the spec of this KubeflowOrgV1PaddleJob. - - - :param spec: The spec of this KubeflowOrgV1PaddleJob. # noqa: E501 - :type: KubeflowOrgV1PaddleJobSpec - """ - - self._spec = spec - - @property - def status(self): - """Gets the status of this KubeflowOrgV1PaddleJob. # noqa: E501 - - - :return: The status of this KubeflowOrgV1PaddleJob. # noqa: E501 - :rtype: KubeflowOrgV1JobStatus - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this KubeflowOrgV1PaddleJob. - - - :param status: The status of this KubeflowOrgV1PaddleJob. # noqa: E501 - :type: KubeflowOrgV1JobStatus - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1PaddleJob): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1PaddleJob): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_job_list.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_job_list.py deleted file mode 100644 index 0633c15e34..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_job_list.py +++ /dev/null @@ -1,205 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1PaddleJobList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'items': 'list[KubeflowOrgV1PaddleJob]', - 'kind': 'str', - 'metadata': 'V1ListMeta' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'items': 'items', - 'kind': 'kind', - 'metadata': 'metadata' - } - - def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1PaddleJobList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._items = None - self._kind = None - self._metadata = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - self.items = items - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1PaddleJobList. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1PaddleJobList. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1PaddleJobList. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1PaddleJobList. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def items(self): - """Gets the items of this KubeflowOrgV1PaddleJobList. # noqa: E501 - - List of PaddleJobs. # noqa: E501 - - :return: The items of this KubeflowOrgV1PaddleJobList. # noqa: E501 - :rtype: list[KubeflowOrgV1PaddleJob] - """ - return self._items - - @items.setter - def items(self, items): - """Sets the items of this KubeflowOrgV1PaddleJobList. - - List of PaddleJobs. # noqa: E501 - - :param items: The items of this KubeflowOrgV1PaddleJobList. # noqa: E501 - :type: list[KubeflowOrgV1PaddleJob] - """ - if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 - raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 - - self._items = items - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1PaddleJobList. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1PaddleJobList. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1PaddleJobList. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1PaddleJobList. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1PaddleJobList. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1PaddleJobList. # noqa: E501 - :rtype: V1ListMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1PaddleJobList. - - - :param metadata: The metadata of this KubeflowOrgV1PaddleJobList. # noqa: E501 - :type: V1ListMeta - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1PaddleJobList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1PaddleJobList): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_job_spec.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_job_spec.py deleted file mode 100644 index 3d897fbf92..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_paddle_job_spec.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1PaddleJobSpec(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'elastic_policy': 'KubeflowOrgV1PaddleElasticPolicy', - 'paddle_replica_specs': 'dict(str, KubeflowOrgV1ReplicaSpec)', - 'run_policy': 'KubeflowOrgV1RunPolicy' - } - - attribute_map = { - 'elastic_policy': 'elasticPolicy', - 'paddle_replica_specs': 'paddleReplicaSpecs', - 'run_policy': 'runPolicy' - } - - def __init__(self, elastic_policy=None, paddle_replica_specs=None, run_policy=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1PaddleJobSpec - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._elastic_policy = None - self._paddle_replica_specs = None - self._run_policy = None - self.discriminator = None - - if elastic_policy is not None: - self.elastic_policy = elastic_policy - self.paddle_replica_specs = paddle_replica_specs - self.run_policy = run_policy - - @property - def elastic_policy(self): - """Gets the elastic_policy of this KubeflowOrgV1PaddleJobSpec. # noqa: E501 - - - :return: The elastic_policy of this KubeflowOrgV1PaddleJobSpec. # noqa: E501 - :rtype: KubeflowOrgV1PaddleElasticPolicy - """ - return self._elastic_policy - - @elastic_policy.setter - def elastic_policy(self, elastic_policy): - """Sets the elastic_policy of this KubeflowOrgV1PaddleJobSpec. - - - :param elastic_policy: The elastic_policy of this KubeflowOrgV1PaddleJobSpec. # noqa: E501 - :type: KubeflowOrgV1PaddleElasticPolicy - """ - - self._elastic_policy = elastic_policy - - @property - def paddle_replica_specs(self): - """Gets the paddle_replica_specs of this KubeflowOrgV1PaddleJobSpec. # noqa: E501 - - A map of PaddleReplicaType (type) to ReplicaSpec (value). Specifies the Paddle cluster configuration. For example, { \"Master\": PaddleReplicaSpec, \"Worker\": PaddleReplicaSpec, } # noqa: E501 - - :return: The paddle_replica_specs of this KubeflowOrgV1PaddleJobSpec. # noqa: E501 - :rtype: dict(str, KubeflowOrgV1ReplicaSpec) - """ - return self._paddle_replica_specs - - @paddle_replica_specs.setter - def paddle_replica_specs(self, paddle_replica_specs): - """Sets the paddle_replica_specs of this KubeflowOrgV1PaddleJobSpec. - - A map of PaddleReplicaType (type) to ReplicaSpec (value). Specifies the Paddle cluster configuration. For example, { \"Master\": PaddleReplicaSpec, \"Worker\": PaddleReplicaSpec, } # noqa: E501 - - :param paddle_replica_specs: The paddle_replica_specs of this KubeflowOrgV1PaddleJobSpec. # noqa: E501 - :type: dict(str, KubeflowOrgV1ReplicaSpec) - """ - if self.local_vars_configuration.client_side_validation and paddle_replica_specs is None: # noqa: E501 - raise ValueError("Invalid value for `paddle_replica_specs`, must not be `None`") # noqa: E501 - - self._paddle_replica_specs = paddle_replica_specs - - @property - def run_policy(self): - """Gets the run_policy of this KubeflowOrgV1PaddleJobSpec. # noqa: E501 - - - :return: The run_policy of this KubeflowOrgV1PaddleJobSpec. # noqa: E501 - :rtype: KubeflowOrgV1RunPolicy - """ - return self._run_policy - - @run_policy.setter - def run_policy(self, run_policy): - """Sets the run_policy of this KubeflowOrgV1PaddleJobSpec. - - - :param run_policy: The run_policy of this KubeflowOrgV1PaddleJobSpec. # noqa: E501 - :type: KubeflowOrgV1RunPolicy - """ - if self.local_vars_configuration.client_side_validation and run_policy is None: # noqa: E501 - raise ValueError("Invalid value for `run_policy`, must not be `None`") # noqa: E501 - - self._run_policy = run_policy - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1PaddleJobSpec): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1PaddleJobSpec): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_py_torch_job.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_py_torch_job.py deleted file mode 100644 index b901b1d1d7..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_py_torch_job.py +++ /dev/null @@ -1,228 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1PyTorchJob(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'kind': 'str', - 'metadata': 'V1ObjectMeta', - 'spec': 'KubeflowOrgV1PyTorchJobSpec', - 'status': 'KubeflowOrgV1JobStatus' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'kind': 'kind', - 'metadata': 'metadata', - 'spec': 'spec', - 'status': 'status' - } - - def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1PyTorchJob - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._kind = None - self._metadata = None - self._spec = None - self._status = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - if spec is not None: - self.spec = spec - if status is not None: - self.status = status - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1PyTorchJob. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1PyTorchJob. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1PyTorchJob. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1PyTorchJob. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1PyTorchJob. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1PyTorchJob. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1PyTorchJob. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1PyTorchJob. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1PyTorchJob. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1PyTorchJob. # noqa: E501 - :rtype: V1ObjectMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1PyTorchJob. - - - :param metadata: The metadata of this KubeflowOrgV1PyTorchJob. # noqa: E501 - :type: V1ObjectMeta - """ - - self._metadata = metadata - - @property - def spec(self): - """Gets the spec of this KubeflowOrgV1PyTorchJob. # noqa: E501 - - - :return: The spec of this KubeflowOrgV1PyTorchJob. # noqa: E501 - :rtype: KubeflowOrgV1PyTorchJobSpec - """ - return self._spec - - @spec.setter - def spec(self, spec): - """Sets the spec of this KubeflowOrgV1PyTorchJob. - - - :param spec: The spec of this KubeflowOrgV1PyTorchJob. # noqa: E501 - :type: KubeflowOrgV1PyTorchJobSpec - """ - - self._spec = spec - - @property - def status(self): - """Gets the status of this KubeflowOrgV1PyTorchJob. # noqa: E501 - - - :return: The status of this KubeflowOrgV1PyTorchJob. # noqa: E501 - :rtype: KubeflowOrgV1JobStatus - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this KubeflowOrgV1PyTorchJob. - - - :param status: The status of this KubeflowOrgV1PyTorchJob. # noqa: E501 - :type: KubeflowOrgV1JobStatus - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1PyTorchJob): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1PyTorchJob): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_py_torch_job_list.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_py_torch_job_list.py deleted file mode 100644 index 650c15e8c4..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_py_torch_job_list.py +++ /dev/null @@ -1,205 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1PyTorchJobList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'items': 'list[KubeflowOrgV1PyTorchJob]', - 'kind': 'str', - 'metadata': 'V1ListMeta' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'items': 'items', - 'kind': 'kind', - 'metadata': 'metadata' - } - - def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1PyTorchJobList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._items = None - self._kind = None - self._metadata = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - self.items = items - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1PyTorchJobList. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def items(self): - """Gets the items of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - - List of PyTorchJobs. # noqa: E501 - - :return: The items of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - :rtype: list[KubeflowOrgV1PyTorchJob] - """ - return self._items - - @items.setter - def items(self, items): - """Sets the items of this KubeflowOrgV1PyTorchJobList. - - List of PyTorchJobs. # noqa: E501 - - :param items: The items of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - :type: list[KubeflowOrgV1PyTorchJob] - """ - if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 - raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 - - self._items = items - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1PyTorchJobList. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - :rtype: V1ListMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1PyTorchJobList. - - - :param metadata: The metadata of this KubeflowOrgV1PyTorchJobList. # noqa: E501 - :type: V1ListMeta - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1PyTorchJobList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1PyTorchJobList): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_py_torch_job_spec.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_py_torch_job_spec.py deleted file mode 100644 index 9dedaca76a..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_py_torch_job_spec.py +++ /dev/null @@ -1,204 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1PyTorchJobSpec(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'elastic_policy': 'KubeflowOrgV1ElasticPolicy', - 'nproc_per_node': 'str', - 'pytorch_replica_specs': 'dict(str, KubeflowOrgV1ReplicaSpec)', - 'run_policy': 'KubeflowOrgV1RunPolicy' - } - - attribute_map = { - 'elastic_policy': 'elasticPolicy', - 'nproc_per_node': 'nprocPerNode', - 'pytorch_replica_specs': 'pytorchReplicaSpecs', - 'run_policy': 'runPolicy' - } - - def __init__(self, elastic_policy=None, nproc_per_node=None, pytorch_replica_specs=None, run_policy=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1PyTorchJobSpec - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._elastic_policy = None - self._nproc_per_node = None - self._pytorch_replica_specs = None - self._run_policy = None - self.discriminator = None - - if elastic_policy is not None: - self.elastic_policy = elastic_policy - if nproc_per_node is not None: - self.nproc_per_node = nproc_per_node - self.pytorch_replica_specs = pytorch_replica_specs - self.run_policy = run_policy - - @property - def elastic_policy(self): - """Gets the elastic_policy of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - - - :return: The elastic_policy of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - :rtype: KubeflowOrgV1ElasticPolicy - """ - return self._elastic_policy - - @elastic_policy.setter - def elastic_policy(self, elastic_policy): - """Sets the elastic_policy of this KubeflowOrgV1PyTorchJobSpec. - - - :param elastic_policy: The elastic_policy of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - :type: KubeflowOrgV1ElasticPolicy - """ - - self._elastic_policy = elastic_policy - - @property - def nproc_per_node(self): - """Gets the nproc_per_node of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - - Number of workers per node; supported values: [auto, cpu, gpu, int]. For more, https://github.com/pytorch/pytorch/blob/26f7f470df64d90e092081e39507e4ac751f55d6/torch/distributed/run.py#L629-L658. Defaults to auto. # noqa: E501 - - :return: The nproc_per_node of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - :rtype: str - """ - return self._nproc_per_node - - @nproc_per_node.setter - def nproc_per_node(self, nproc_per_node): - """Sets the nproc_per_node of this KubeflowOrgV1PyTorchJobSpec. - - Number of workers per node; supported values: [auto, cpu, gpu, int]. For more, https://github.com/pytorch/pytorch/blob/26f7f470df64d90e092081e39507e4ac751f55d6/torch/distributed/run.py#L629-L658. Defaults to auto. # noqa: E501 - - :param nproc_per_node: The nproc_per_node of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - :type: str - """ - - self._nproc_per_node = nproc_per_node - - @property - def pytorch_replica_specs(self): - """Gets the pytorch_replica_specs of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - - A map of PyTorchReplicaType (type) to ReplicaSpec (value). Specifies the PyTorch cluster configuration. For example, { \"Master\": PyTorchReplicaSpec, \"Worker\": PyTorchReplicaSpec, } # noqa: E501 - - :return: The pytorch_replica_specs of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - :rtype: dict(str, KubeflowOrgV1ReplicaSpec) - """ - return self._pytorch_replica_specs - - @pytorch_replica_specs.setter - def pytorch_replica_specs(self, pytorch_replica_specs): - """Sets the pytorch_replica_specs of this KubeflowOrgV1PyTorchJobSpec. - - A map of PyTorchReplicaType (type) to ReplicaSpec (value). Specifies the PyTorch cluster configuration. For example, { \"Master\": PyTorchReplicaSpec, \"Worker\": PyTorchReplicaSpec, } # noqa: E501 - - :param pytorch_replica_specs: The pytorch_replica_specs of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - :type: dict(str, KubeflowOrgV1ReplicaSpec) - """ - if self.local_vars_configuration.client_side_validation and pytorch_replica_specs is None: # noqa: E501 - raise ValueError("Invalid value for `pytorch_replica_specs`, must not be `None`") # noqa: E501 - - self._pytorch_replica_specs = pytorch_replica_specs - - @property - def run_policy(self): - """Gets the run_policy of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - - - :return: The run_policy of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - :rtype: KubeflowOrgV1RunPolicy - """ - return self._run_policy - - @run_policy.setter - def run_policy(self, run_policy): - """Sets the run_policy of this KubeflowOrgV1PyTorchJobSpec. - - - :param run_policy: The run_policy of this KubeflowOrgV1PyTorchJobSpec. # noqa: E501 - :type: KubeflowOrgV1RunPolicy - """ - if self.local_vars_configuration.client_side_validation and run_policy is None: # noqa: E501 - raise ValueError("Invalid value for `run_policy`, must not be `None`") # noqa: E501 - - self._run_policy = run_policy - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1PyTorchJobSpec): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1PyTorchJobSpec): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_rdzv_conf.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_rdzv_conf.py deleted file mode 100644 index fd95efe18c..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_rdzv_conf.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1RDZVConf(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'key': 'str', - 'value': 'str' - } - - attribute_map = { - 'key': 'key', - 'value': 'value' - } - - def __init__(self, key=None, value=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1RDZVConf - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._key = None - self._value = None - self.discriminator = None - - if key is not None: - self.key = key - if value is not None: - self.value = value - - @property - def key(self): - """Gets the key of this KubeflowOrgV1RDZVConf. # noqa: E501 - - - :return: The key of this KubeflowOrgV1RDZVConf. # noqa: E501 - :rtype: str - """ - return self._key - - @key.setter - def key(self, key): - """Sets the key of this KubeflowOrgV1RDZVConf. - - - :param key: The key of this KubeflowOrgV1RDZVConf. # noqa: E501 - :type: str - """ - - self._key = key - - @property - def value(self): - """Gets the value of this KubeflowOrgV1RDZVConf. # noqa: E501 - - - :return: The value of this KubeflowOrgV1RDZVConf. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this KubeflowOrgV1RDZVConf. - - - :param value: The value of this KubeflowOrgV1RDZVConf. # noqa: E501 - :type: str - """ - - self._value = value - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1RDZVConf): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1RDZVConf): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_replica_spec.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_replica_spec.py deleted file mode 100644 index c71a94955b..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_replica_spec.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1ReplicaSpec(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'replicas': 'int', - 'restart_policy': 'str', - 'template': 'V1PodTemplateSpec' - } - - attribute_map = { - 'replicas': 'replicas', - 'restart_policy': 'restartPolicy', - 'template': 'template' - } - - def __init__(self, replicas=None, restart_policy=None, template=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1ReplicaSpec - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._replicas = None - self._restart_policy = None - self._template = None - self.discriminator = None - - if replicas is not None: - self.replicas = replicas - if restart_policy is not None: - self.restart_policy = restart_policy - if template is not None: - self.template = template - - @property - def replicas(self): - """Gets the replicas of this KubeflowOrgV1ReplicaSpec. # noqa: E501 - - Replicas is the desired number of replicas of the given template. If unspecified, defaults to 1. # noqa: E501 - - :return: The replicas of this KubeflowOrgV1ReplicaSpec. # noqa: E501 - :rtype: int - """ - return self._replicas - - @replicas.setter - def replicas(self, replicas): - """Sets the replicas of this KubeflowOrgV1ReplicaSpec. - - Replicas is the desired number of replicas of the given template. If unspecified, defaults to 1. # noqa: E501 - - :param replicas: The replicas of this KubeflowOrgV1ReplicaSpec. # noqa: E501 - :type: int - """ - - self._replicas = replicas - - @property - def restart_policy(self): - """Gets the restart_policy of this KubeflowOrgV1ReplicaSpec. # noqa: E501 - - Restart policy for all replicas within the job. One of Always, OnFailure, Never and ExitCode. Default to Never. # noqa: E501 - - :return: The restart_policy of this KubeflowOrgV1ReplicaSpec. # noqa: E501 - :rtype: str - """ - return self._restart_policy - - @restart_policy.setter - def restart_policy(self, restart_policy): - """Sets the restart_policy of this KubeflowOrgV1ReplicaSpec. - - Restart policy for all replicas within the job. One of Always, OnFailure, Never and ExitCode. Default to Never. # noqa: E501 - - :param restart_policy: The restart_policy of this KubeflowOrgV1ReplicaSpec. # noqa: E501 - :type: str - """ - - self._restart_policy = restart_policy - - @property - def template(self): - """Gets the template of this KubeflowOrgV1ReplicaSpec. # noqa: E501 - - - :return: The template of this KubeflowOrgV1ReplicaSpec. # noqa: E501 - :rtype: V1PodTemplateSpec - """ - return self._template - - @template.setter - def template(self, template): - """Sets the template of this KubeflowOrgV1ReplicaSpec. - - - :param template: The template of this KubeflowOrgV1ReplicaSpec. # noqa: E501 - :type: V1PodTemplateSpec - """ - - self._template = template - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1ReplicaSpec): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1ReplicaSpec): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_replica_status.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_replica_status.py deleted file mode 100644 index 0f960a2070..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_replica_status.py +++ /dev/null @@ -1,232 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1ReplicaStatus(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'active': 'int', - 'failed': 'int', - 'label_selector': 'V1LabelSelector', - 'selector': 'str', - 'succeeded': 'int' - } - - attribute_map = { - 'active': 'active', - 'failed': 'failed', - 'label_selector': 'labelSelector', - 'selector': 'selector', - 'succeeded': 'succeeded' - } - - def __init__(self, active=None, failed=None, label_selector=None, selector=None, succeeded=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1ReplicaStatus - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._active = None - self._failed = None - self._label_selector = None - self._selector = None - self._succeeded = None - self.discriminator = None - - if active is not None: - self.active = active - if failed is not None: - self.failed = failed - if label_selector is not None: - self.label_selector = label_selector - if selector is not None: - self.selector = selector - if succeeded is not None: - self.succeeded = succeeded - - @property - def active(self): - """Gets the active of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - - The number of actively running pods. # noqa: E501 - - :return: The active of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - :rtype: int - """ - return self._active - - @active.setter - def active(self, active): - """Sets the active of this KubeflowOrgV1ReplicaStatus. - - The number of actively running pods. # noqa: E501 - - :param active: The active of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - :type: int - """ - - self._active = active - - @property - def failed(self): - """Gets the failed of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - - The number of pods which reached phase Failed. # noqa: E501 - - :return: The failed of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - :rtype: int - """ - return self._failed - - @failed.setter - def failed(self, failed): - """Sets the failed of this KubeflowOrgV1ReplicaStatus. - - The number of pods which reached phase Failed. # noqa: E501 - - :param failed: The failed of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - :type: int - """ - - self._failed = failed - - @property - def label_selector(self): - """Gets the label_selector of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - - - :return: The label_selector of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - :rtype: V1LabelSelector - """ - return self._label_selector - - @label_selector.setter - def label_selector(self, label_selector): - """Sets the label_selector of this KubeflowOrgV1ReplicaStatus. - - - :param label_selector: The label_selector of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - :type: V1LabelSelector - """ - - self._label_selector = label_selector - - @property - def selector(self): - """Gets the selector of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - - A Selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty Selector matches all objects. A null Selector matches no objects. # noqa: E501 - - :return: The selector of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - :rtype: str - """ - return self._selector - - @selector.setter - def selector(self, selector): - """Sets the selector of this KubeflowOrgV1ReplicaStatus. - - A Selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty Selector matches all objects. A null Selector matches no objects. # noqa: E501 - - :param selector: The selector of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - :type: str - """ - - self._selector = selector - - @property - def succeeded(self): - """Gets the succeeded of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - - The number of pods which reached phase Succeeded. # noqa: E501 - - :return: The succeeded of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - :rtype: int - """ - return self._succeeded - - @succeeded.setter - def succeeded(self, succeeded): - """Sets the succeeded of this KubeflowOrgV1ReplicaStatus. - - The number of pods which reached phase Succeeded. # noqa: E501 - - :param succeeded: The succeeded of this KubeflowOrgV1ReplicaStatus. # noqa: E501 - :type: int - """ - - self._succeeded = succeeded - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1ReplicaStatus): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1ReplicaStatus): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_run_policy.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_run_policy.py deleted file mode 100644 index c5fd48bc9a..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_run_policy.py +++ /dev/null @@ -1,260 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1RunPolicy(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'active_deadline_seconds': 'int', - 'backoff_limit': 'int', - 'clean_pod_policy': 'str', - 'scheduling_policy': 'KubeflowOrgV1SchedulingPolicy', - 'suspend': 'bool', - 'ttl_seconds_after_finished': 'int' - } - - attribute_map = { - 'active_deadline_seconds': 'activeDeadlineSeconds', - 'backoff_limit': 'backoffLimit', - 'clean_pod_policy': 'cleanPodPolicy', - 'scheduling_policy': 'schedulingPolicy', - 'suspend': 'suspend', - 'ttl_seconds_after_finished': 'ttlSecondsAfterFinished' - } - - def __init__(self, active_deadline_seconds=None, backoff_limit=None, clean_pod_policy=None, scheduling_policy=None, suspend=None, ttl_seconds_after_finished=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1RunPolicy - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._active_deadline_seconds = None - self._backoff_limit = None - self._clean_pod_policy = None - self._scheduling_policy = None - self._suspend = None - self._ttl_seconds_after_finished = None - self.discriminator = None - - if active_deadline_seconds is not None: - self.active_deadline_seconds = active_deadline_seconds - if backoff_limit is not None: - self.backoff_limit = backoff_limit - if clean_pod_policy is not None: - self.clean_pod_policy = clean_pod_policy - if scheduling_policy is not None: - self.scheduling_policy = scheduling_policy - if suspend is not None: - self.suspend = suspend - if ttl_seconds_after_finished is not None: - self.ttl_seconds_after_finished = ttl_seconds_after_finished - - @property - def active_deadline_seconds(self): - """Gets the active_deadline_seconds of this KubeflowOrgV1RunPolicy. # noqa: E501 - - Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. # noqa: E501 - - :return: The active_deadline_seconds of this KubeflowOrgV1RunPolicy. # noqa: E501 - :rtype: int - """ - return self._active_deadline_seconds - - @active_deadline_seconds.setter - def active_deadline_seconds(self, active_deadline_seconds): - """Sets the active_deadline_seconds of this KubeflowOrgV1RunPolicy. - - Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. # noqa: E501 - - :param active_deadline_seconds: The active_deadline_seconds of this KubeflowOrgV1RunPolicy. # noqa: E501 - :type: int - """ - - self._active_deadline_seconds = active_deadline_seconds - - @property - def backoff_limit(self): - """Gets the backoff_limit of this KubeflowOrgV1RunPolicy. # noqa: E501 - - Optional number of retries before marking this job failed. # noqa: E501 - - :return: The backoff_limit of this KubeflowOrgV1RunPolicy. # noqa: E501 - :rtype: int - """ - return self._backoff_limit - - @backoff_limit.setter - def backoff_limit(self, backoff_limit): - """Sets the backoff_limit of this KubeflowOrgV1RunPolicy. - - Optional number of retries before marking this job failed. # noqa: E501 - - :param backoff_limit: The backoff_limit of this KubeflowOrgV1RunPolicy. # noqa: E501 - :type: int - """ - - self._backoff_limit = backoff_limit - - @property - def clean_pod_policy(self): - """Gets the clean_pod_policy of this KubeflowOrgV1RunPolicy. # noqa: E501 - - CleanPodPolicy defines the policy to kill pods after the job completes. Default to None. # noqa: E501 - - :return: The clean_pod_policy of this KubeflowOrgV1RunPolicy. # noqa: E501 - :rtype: str - """ - return self._clean_pod_policy - - @clean_pod_policy.setter - def clean_pod_policy(self, clean_pod_policy): - """Sets the clean_pod_policy of this KubeflowOrgV1RunPolicy. - - CleanPodPolicy defines the policy to kill pods after the job completes. Default to None. # noqa: E501 - - :param clean_pod_policy: The clean_pod_policy of this KubeflowOrgV1RunPolicy. # noqa: E501 - :type: str - """ - - self._clean_pod_policy = clean_pod_policy - - @property - def scheduling_policy(self): - """Gets the scheduling_policy of this KubeflowOrgV1RunPolicy. # noqa: E501 - - - :return: The scheduling_policy of this KubeflowOrgV1RunPolicy. # noqa: E501 - :rtype: KubeflowOrgV1SchedulingPolicy - """ - return self._scheduling_policy - - @scheduling_policy.setter - def scheduling_policy(self, scheduling_policy): - """Sets the scheduling_policy of this KubeflowOrgV1RunPolicy. - - - :param scheduling_policy: The scheduling_policy of this KubeflowOrgV1RunPolicy. # noqa: E501 - :type: KubeflowOrgV1SchedulingPolicy - """ - - self._scheduling_policy = scheduling_policy - - @property - def suspend(self): - """Gets the suspend of this KubeflowOrgV1RunPolicy. # noqa: E501 - - suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods and PodGroups associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job. Defaults to false. # noqa: E501 - - :return: The suspend of this KubeflowOrgV1RunPolicy. # noqa: E501 - :rtype: bool - """ - return self._suspend - - @suspend.setter - def suspend(self, suspend): - """Sets the suspend of this KubeflowOrgV1RunPolicy. - - suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods and PodGroups associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job. Defaults to false. # noqa: E501 - - :param suspend: The suspend of this KubeflowOrgV1RunPolicy. # noqa: E501 - :type: bool - """ - - self._suspend = suspend - - @property - def ttl_seconds_after_finished(self): - """Gets the ttl_seconds_after_finished of this KubeflowOrgV1RunPolicy. # noqa: E501 - - TTLSecondsAfterFinished is the TTL to clean up jobs. It may take extra ReconcilePeriod seconds for the cleanup, since reconcile gets called periodically. Default to infinite. # noqa: E501 - - :return: The ttl_seconds_after_finished of this KubeflowOrgV1RunPolicy. # noqa: E501 - :rtype: int - """ - return self._ttl_seconds_after_finished - - @ttl_seconds_after_finished.setter - def ttl_seconds_after_finished(self, ttl_seconds_after_finished): - """Sets the ttl_seconds_after_finished of this KubeflowOrgV1RunPolicy. - - TTLSecondsAfterFinished is the TTL to clean up jobs. It may take extra ReconcilePeriod seconds for the cleanup, since reconcile gets called periodically. Default to infinite. # noqa: E501 - - :param ttl_seconds_after_finished: The ttl_seconds_after_finished of this KubeflowOrgV1RunPolicy. # noqa: E501 - :type: int - """ - - self._ttl_seconds_after_finished = ttl_seconds_after_finished - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1RunPolicy): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1RunPolicy): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_scheduling_policy.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_scheduling_policy.py deleted file mode 100644 index 16a1d9acdd..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_scheduling_policy.py +++ /dev/null @@ -1,224 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1SchedulingPolicy(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'min_available': 'int', - 'min_resources': 'dict(str, Quantity)', - 'priority_class': 'str', - 'queue': 'str', - 'schedule_timeout_seconds': 'int' - } - - attribute_map = { - 'min_available': 'minAvailable', - 'min_resources': 'minResources', - 'priority_class': 'priorityClass', - 'queue': 'queue', - 'schedule_timeout_seconds': 'scheduleTimeoutSeconds' - } - - def __init__(self, min_available=None, min_resources=None, priority_class=None, queue=None, schedule_timeout_seconds=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1SchedulingPolicy - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._min_available = None - self._min_resources = None - self._priority_class = None - self._queue = None - self._schedule_timeout_seconds = None - self.discriminator = None - - if min_available is not None: - self.min_available = min_available - if min_resources is not None: - self.min_resources = min_resources - if priority_class is not None: - self.priority_class = priority_class - if queue is not None: - self.queue = queue - if schedule_timeout_seconds is not None: - self.schedule_timeout_seconds = schedule_timeout_seconds - - @property - def min_available(self): - """Gets the min_available of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - - - :return: The min_available of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - :rtype: int - """ - return self._min_available - - @min_available.setter - def min_available(self, min_available): - """Sets the min_available of this KubeflowOrgV1SchedulingPolicy. - - - :param min_available: The min_available of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - :type: int - """ - - self._min_available = min_available - - @property - def min_resources(self): - """Gets the min_resources of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - - - :return: The min_resources of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - :rtype: dict(str, Quantity) - """ - return self._min_resources - - @min_resources.setter - def min_resources(self, min_resources): - """Sets the min_resources of this KubeflowOrgV1SchedulingPolicy. - - - :param min_resources: The min_resources of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - :type: dict(str, Quantity) - """ - - self._min_resources = min_resources - - @property - def priority_class(self): - """Gets the priority_class of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - - - :return: The priority_class of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - :rtype: str - """ - return self._priority_class - - @priority_class.setter - def priority_class(self, priority_class): - """Sets the priority_class of this KubeflowOrgV1SchedulingPolicy. - - - :param priority_class: The priority_class of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - :type: str - """ - - self._priority_class = priority_class - - @property - def queue(self): - """Gets the queue of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - - - :return: The queue of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - :rtype: str - """ - return self._queue - - @queue.setter - def queue(self, queue): - """Sets the queue of this KubeflowOrgV1SchedulingPolicy. - - - :param queue: The queue of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - :type: str - """ - - self._queue = queue - - @property - def schedule_timeout_seconds(self): - """Gets the schedule_timeout_seconds of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - - - :return: The schedule_timeout_seconds of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - :rtype: int - """ - return self._schedule_timeout_seconds - - @schedule_timeout_seconds.setter - def schedule_timeout_seconds(self, schedule_timeout_seconds): - """Sets the schedule_timeout_seconds of this KubeflowOrgV1SchedulingPolicy. - - - :param schedule_timeout_seconds: The schedule_timeout_seconds of this KubeflowOrgV1SchedulingPolicy. # noqa: E501 - :type: int - """ - - self._schedule_timeout_seconds = schedule_timeout_seconds - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1SchedulingPolicy): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1SchedulingPolicy): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_tf_job.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_tf_job.py deleted file mode 100644 index b8e4508db5..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_tf_job.py +++ /dev/null @@ -1,228 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1TFJob(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'kind': 'str', - 'metadata': 'V1ObjectMeta', - 'spec': 'KubeflowOrgV1TFJobSpec', - 'status': 'KubeflowOrgV1JobStatus' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'kind': 'kind', - 'metadata': 'metadata', - 'spec': 'spec', - 'status': 'status' - } - - def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1TFJob - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._kind = None - self._metadata = None - self._spec = None - self._status = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - if spec is not None: - self.spec = spec - if status is not None: - self.status = status - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1TFJob. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1TFJob. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1TFJob. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1TFJob. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1TFJob. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1TFJob. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1TFJob. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1TFJob. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1TFJob. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1TFJob. # noqa: E501 - :rtype: V1ObjectMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1TFJob. - - - :param metadata: The metadata of this KubeflowOrgV1TFJob. # noqa: E501 - :type: V1ObjectMeta - """ - - self._metadata = metadata - - @property - def spec(self): - """Gets the spec of this KubeflowOrgV1TFJob. # noqa: E501 - - - :return: The spec of this KubeflowOrgV1TFJob. # noqa: E501 - :rtype: KubeflowOrgV1TFJobSpec - """ - return self._spec - - @spec.setter - def spec(self, spec): - """Sets the spec of this KubeflowOrgV1TFJob. - - - :param spec: The spec of this KubeflowOrgV1TFJob. # noqa: E501 - :type: KubeflowOrgV1TFJobSpec - """ - - self._spec = spec - - @property - def status(self): - """Gets the status of this KubeflowOrgV1TFJob. # noqa: E501 - - - :return: The status of this KubeflowOrgV1TFJob. # noqa: E501 - :rtype: KubeflowOrgV1JobStatus - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this KubeflowOrgV1TFJob. - - - :param status: The status of this KubeflowOrgV1TFJob. # noqa: E501 - :type: KubeflowOrgV1JobStatus - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1TFJob): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1TFJob): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_tf_job_list.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_tf_job_list.py deleted file mode 100644 index dfaf863b7a..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_tf_job_list.py +++ /dev/null @@ -1,205 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1TFJobList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'items': 'list[KubeflowOrgV1TFJob]', - 'kind': 'str', - 'metadata': 'V1ListMeta' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'items': 'items', - 'kind': 'kind', - 'metadata': 'metadata' - } - - def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1TFJobList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._items = None - self._kind = None - self._metadata = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - self.items = items - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1TFJobList. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1TFJobList. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1TFJobList. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1TFJobList. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def items(self): - """Gets the items of this KubeflowOrgV1TFJobList. # noqa: E501 - - List of TFJobs. # noqa: E501 - - :return: The items of this KubeflowOrgV1TFJobList. # noqa: E501 - :rtype: list[KubeflowOrgV1TFJob] - """ - return self._items - - @items.setter - def items(self, items): - """Sets the items of this KubeflowOrgV1TFJobList. - - List of TFJobs. # noqa: E501 - - :param items: The items of this KubeflowOrgV1TFJobList. # noqa: E501 - :type: list[KubeflowOrgV1TFJob] - """ - if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 - raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 - - self._items = items - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1TFJobList. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1TFJobList. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1TFJobList. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1TFJobList. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1TFJobList. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1TFJobList. # noqa: E501 - :rtype: V1ListMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1TFJobList. - - - :param metadata: The metadata of this KubeflowOrgV1TFJobList. # noqa: E501 - :type: V1ListMeta - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1TFJobList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1TFJobList): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_tf_job_spec.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_tf_job_spec.py deleted file mode 100644 index 60076a0a86..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_tf_job_spec.py +++ /dev/null @@ -1,206 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1TFJobSpec(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'enable_dynamic_worker': 'bool', - 'run_policy': 'KubeflowOrgV1RunPolicy', - 'success_policy': 'str', - 'tf_replica_specs': 'dict(str, KubeflowOrgV1ReplicaSpec)' - } - - attribute_map = { - 'enable_dynamic_worker': 'enableDynamicWorker', - 'run_policy': 'runPolicy', - 'success_policy': 'successPolicy', - 'tf_replica_specs': 'tfReplicaSpecs' - } - - def __init__(self, enable_dynamic_worker=None, run_policy=None, success_policy=None, tf_replica_specs=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1TFJobSpec - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._enable_dynamic_worker = None - self._run_policy = None - self._success_policy = None - self._tf_replica_specs = None - self.discriminator = None - - if enable_dynamic_worker is not None: - self.enable_dynamic_worker = enable_dynamic_worker - self.run_policy = run_policy - if success_policy is not None: - self.success_policy = success_policy - self.tf_replica_specs = tf_replica_specs - - @property - def enable_dynamic_worker(self): - """Gets the enable_dynamic_worker of this KubeflowOrgV1TFJobSpec. # noqa: E501 - - A switch to enable dynamic worker # noqa: E501 - - :return: The enable_dynamic_worker of this KubeflowOrgV1TFJobSpec. # noqa: E501 - :rtype: bool - """ - return self._enable_dynamic_worker - - @enable_dynamic_worker.setter - def enable_dynamic_worker(self, enable_dynamic_worker): - """Sets the enable_dynamic_worker of this KubeflowOrgV1TFJobSpec. - - A switch to enable dynamic worker # noqa: E501 - - :param enable_dynamic_worker: The enable_dynamic_worker of this KubeflowOrgV1TFJobSpec. # noqa: E501 - :type: bool - """ - - self._enable_dynamic_worker = enable_dynamic_worker - - @property - def run_policy(self): - """Gets the run_policy of this KubeflowOrgV1TFJobSpec. # noqa: E501 - - - :return: The run_policy of this KubeflowOrgV1TFJobSpec. # noqa: E501 - :rtype: KubeflowOrgV1RunPolicy - """ - return self._run_policy - - @run_policy.setter - def run_policy(self, run_policy): - """Sets the run_policy of this KubeflowOrgV1TFJobSpec. - - - :param run_policy: The run_policy of this KubeflowOrgV1TFJobSpec. # noqa: E501 - :type: KubeflowOrgV1RunPolicy - """ - if self.local_vars_configuration.client_side_validation and run_policy is None: # noqa: E501 - raise ValueError("Invalid value for `run_policy`, must not be `None`") # noqa: E501 - - self._run_policy = run_policy - - @property - def success_policy(self): - """Gets the success_policy of this KubeflowOrgV1TFJobSpec. # noqa: E501 - - SuccessPolicy defines the policy to mark the TFJob as succeeded. Default to \"\", using the default rules. # noqa: E501 - - :return: The success_policy of this KubeflowOrgV1TFJobSpec. # noqa: E501 - :rtype: str - """ - return self._success_policy - - @success_policy.setter - def success_policy(self, success_policy): - """Sets the success_policy of this KubeflowOrgV1TFJobSpec. - - SuccessPolicy defines the policy to mark the TFJob as succeeded. Default to \"\", using the default rules. # noqa: E501 - - :param success_policy: The success_policy of this KubeflowOrgV1TFJobSpec. # noqa: E501 - :type: str - """ - - self._success_policy = success_policy - - @property - def tf_replica_specs(self): - """Gets the tf_replica_specs of this KubeflowOrgV1TFJobSpec. # noqa: E501 - - A map of TFReplicaType (type) to ReplicaSpec (value). Specifies the TF cluster configuration. For example, { \"PS\": ReplicaSpec, \"Worker\": ReplicaSpec, } # noqa: E501 - - :return: The tf_replica_specs of this KubeflowOrgV1TFJobSpec. # noqa: E501 - :rtype: dict(str, KubeflowOrgV1ReplicaSpec) - """ - return self._tf_replica_specs - - @tf_replica_specs.setter - def tf_replica_specs(self, tf_replica_specs): - """Sets the tf_replica_specs of this KubeflowOrgV1TFJobSpec. - - A map of TFReplicaType (type) to ReplicaSpec (value). Specifies the TF cluster configuration. For example, { \"PS\": ReplicaSpec, \"Worker\": ReplicaSpec, } # noqa: E501 - - :param tf_replica_specs: The tf_replica_specs of this KubeflowOrgV1TFJobSpec. # noqa: E501 - :type: dict(str, KubeflowOrgV1ReplicaSpec) - """ - if self.local_vars_configuration.client_side_validation and tf_replica_specs is None: # noqa: E501 - raise ValueError("Invalid value for `tf_replica_specs`, must not be `None`") # noqa: E501 - - self._tf_replica_specs = tf_replica_specs - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1TFJobSpec): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1TFJobSpec): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_xg_boost_job.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_xg_boost_job.py deleted file mode 100644 index c644e56cb8..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_xg_boost_job.py +++ /dev/null @@ -1,228 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1XGBoostJob(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'kind': 'str', - 'metadata': 'V1ObjectMeta', - 'spec': 'KubeflowOrgV1XGBoostJobSpec', - 'status': 'KubeflowOrgV1JobStatus' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'kind': 'kind', - 'metadata': 'metadata', - 'spec': 'spec', - 'status': 'status' - } - - def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1XGBoostJob - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._kind = None - self._metadata = None - self._spec = None - self._status = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - if spec is not None: - self.spec = spec - if status is not None: - self.status = status - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1XGBoostJob. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1XGBoostJob. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1XGBoostJob. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1XGBoostJob. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1XGBoostJob. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1XGBoostJob. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1XGBoostJob. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1XGBoostJob. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1XGBoostJob. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1XGBoostJob. # noqa: E501 - :rtype: V1ObjectMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1XGBoostJob. - - - :param metadata: The metadata of this KubeflowOrgV1XGBoostJob. # noqa: E501 - :type: V1ObjectMeta - """ - - self._metadata = metadata - - @property - def spec(self): - """Gets the spec of this KubeflowOrgV1XGBoostJob. # noqa: E501 - - - :return: The spec of this KubeflowOrgV1XGBoostJob. # noqa: E501 - :rtype: KubeflowOrgV1XGBoostJobSpec - """ - return self._spec - - @spec.setter - def spec(self, spec): - """Sets the spec of this KubeflowOrgV1XGBoostJob. - - - :param spec: The spec of this KubeflowOrgV1XGBoostJob. # noqa: E501 - :type: KubeflowOrgV1XGBoostJobSpec - """ - - self._spec = spec - - @property - def status(self): - """Gets the status of this KubeflowOrgV1XGBoostJob. # noqa: E501 - - - :return: The status of this KubeflowOrgV1XGBoostJob. # noqa: E501 - :rtype: KubeflowOrgV1JobStatus - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this KubeflowOrgV1XGBoostJob. - - - :param status: The status of this KubeflowOrgV1XGBoostJob. # noqa: E501 - :type: KubeflowOrgV1JobStatus - """ - - self._status = status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1XGBoostJob): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1XGBoostJob): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_xg_boost_job_list.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_xg_boost_job_list.py deleted file mode 100644 index 83c017c2cf..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_xg_boost_job_list.py +++ /dev/null @@ -1,203 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1XGBoostJobList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'items': 'list[KubeflowOrgV1XGBoostJob]', - 'kind': 'str', - 'metadata': 'V1ListMeta' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'items': 'items', - 'kind': 'kind', - 'metadata': 'metadata' - } - - def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1XGBoostJobList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._api_version = None - self._items = None - self._kind = None - self._metadata = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - self.items = items - if kind is not None: - self.kind = kind - if metadata is not None: - self.metadata = metadata - - @property - def api_version(self): - """Gets the api_version of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :return: The api_version of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this KubeflowOrgV1XGBoostJobList. - - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 - - :param api_version: The api_version of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - :type: str - """ - - self._api_version = api_version - - @property - def items(self): - """Gets the items of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - - - :return: The items of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - :rtype: list[KubeflowOrgV1XGBoostJob] - """ - return self._items - - @items.setter - def items(self, items): - """Sets the items of this KubeflowOrgV1XGBoostJobList. - - - :param items: The items of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - :type: list[KubeflowOrgV1XGBoostJob] - """ - if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 - raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 - - self._items = items - - @property - def kind(self): - """Gets the kind of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :return: The kind of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this KubeflowOrgV1XGBoostJobList. - - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 - - :param kind: The kind of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - :type: str - """ - - self._kind = kind - - @property - def metadata(self): - """Gets the metadata of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - - - :return: The metadata of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - :rtype: V1ListMeta - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this KubeflowOrgV1XGBoostJobList. - - - :param metadata: The metadata of this KubeflowOrgV1XGBoostJobList. # noqa: E501 - :type: V1ListMeta - """ - - self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1XGBoostJobList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1XGBoostJobList): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/models/kubeflow_org_v1_xg_boost_job_spec.py b/sdk/python/kubeflow/training/models/kubeflow_org_v1_xg_boost_job_spec.py deleted file mode 100644 index 05e3c2e476..0000000000 --- a/sdk/python/kubeflow/training/models/kubeflow_org_v1_xg_boost_job_spec.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubeflow.training.configuration import Configuration - - -class KubeflowOrgV1XGBoostJobSpec(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'run_policy': 'KubeflowOrgV1RunPolicy', - 'xgb_replica_specs': 'dict(str, KubeflowOrgV1ReplicaSpec)' - } - - attribute_map = { - 'run_policy': 'runPolicy', - 'xgb_replica_specs': 'xgbReplicaSpecs' - } - - def __init__(self, run_policy=None, xgb_replica_specs=None, local_vars_configuration=None): # noqa: E501 - """KubeflowOrgV1XGBoostJobSpec - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._run_policy = None - self._xgb_replica_specs = None - self.discriminator = None - - self.run_policy = run_policy - self.xgb_replica_specs = xgb_replica_specs - - @property - def run_policy(self): - """Gets the run_policy of this KubeflowOrgV1XGBoostJobSpec. # noqa: E501 - - - :return: The run_policy of this KubeflowOrgV1XGBoostJobSpec. # noqa: E501 - :rtype: KubeflowOrgV1RunPolicy - """ - return self._run_policy - - @run_policy.setter - def run_policy(self, run_policy): - """Sets the run_policy of this KubeflowOrgV1XGBoostJobSpec. - - - :param run_policy: The run_policy of this KubeflowOrgV1XGBoostJobSpec. # noqa: E501 - :type: KubeflowOrgV1RunPolicy - """ - if self.local_vars_configuration.client_side_validation and run_policy is None: # noqa: E501 - raise ValueError("Invalid value for `run_policy`, must not be `None`") # noqa: E501 - - self._run_policy = run_policy - - @property - def xgb_replica_specs(self): - """Gets the xgb_replica_specs of this KubeflowOrgV1XGBoostJobSpec. # noqa: E501 - - - :return: The xgb_replica_specs of this KubeflowOrgV1XGBoostJobSpec. # noqa: E501 - :rtype: dict(str, KubeflowOrgV1ReplicaSpec) - """ - return self._xgb_replica_specs - - @xgb_replica_specs.setter - def xgb_replica_specs(self, xgb_replica_specs): - """Sets the xgb_replica_specs of this KubeflowOrgV1XGBoostJobSpec. - - - :param xgb_replica_specs: The xgb_replica_specs of this KubeflowOrgV1XGBoostJobSpec. # noqa: E501 - :type: dict(str, KubeflowOrgV1ReplicaSpec) - """ - if self.local_vars_configuration.client_side_validation and xgb_replica_specs is None: # noqa: E501 - raise ValueError("Invalid value for `xgb_replica_specs`, must not be `None`") # noqa: E501 - - self._xgb_replica_specs = xgb_replica_specs - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KubeflowOrgV1XGBoostJobSpec): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KubeflowOrgV1XGBoostJobSpec): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/kubeflow/training/rest.py b/sdk/python/kubeflow/training/rest.py deleted file mode 100644 index 65e51c9c43..0000000000 --- a/sdk/python/kubeflow/training/rest.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode -import urllib3 - -from kubeflow.training.exceptions import ApiException, ApiValueError - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) diff --git a/sdk/python/test/test_kubeflow_org_v1_elastic_policy.py b/sdk/python/test/test_kubeflow_org_v1_elastic_policy.py deleted file mode 100644 index a8de375c50..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_elastic_policy.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_elastic_policy import KubeflowOrgV1ElasticPolicy # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1ElasticPolicy(unittest.TestCase): - """KubeflowOrgV1ElasticPolicy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1ElasticPolicy - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_elastic_policy.KubeflowOrgV1ElasticPolicy() # noqa: E501 - if include_optional : - return KubeflowOrgV1ElasticPolicy( - max_replicas = 56, - max_restarts = 56, - metrics = [ - None - ], - min_replicas = 56, - n_proc_per_node = 56, - rdzv_backend = '0', - rdzv_conf = [ - kubeflow_org_v1_rdzv_conf.KubeflowOrgV1RDZVConf( - key = '0', - value = '0', ) - ], - rdzv_host = '0', - rdzv_id = '0', - rdzv_port = 56, - standalone = True - ) - else : - return KubeflowOrgV1ElasticPolicy( - ) - - def testKubeflowOrgV1ElasticPolicy(self): - """Test KubeflowOrgV1ElasticPolicy""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_job_condition.py b/sdk/python/test/test_kubeflow_org_v1_job_condition.py deleted file mode 100644 index 1ba03361c3..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_job_condition.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_job_condition import KubeflowOrgV1JobCondition # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1JobCondition(unittest.TestCase): - """KubeflowOrgV1JobCondition unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1JobCondition - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition() # noqa: E501 - if include_optional : - return KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0' - ) - else : - return KubeflowOrgV1JobCondition( - status = '0', - type = '0', - ) - - def testKubeflowOrgV1JobCondition(self): - """Test KubeflowOrgV1JobCondition""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_job_status.py b/sdk/python/test/test_kubeflow_org_v1_job_status.py deleted file mode 100644 index 60ec83d080..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_job_status.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_job_status import KubeflowOrgV1JobStatus # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1JobStatus(unittest.TestCase): - """KubeflowOrgV1JobStatus unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1JobStatus - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus() # noqa: E501 - if include_optional : - return KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None - ) - else : - return KubeflowOrgV1JobStatus( - ) - - def testKubeflowOrgV1JobStatus(self): - """Test KubeflowOrgV1JobStatus""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_mpi_job.py b/sdk/python/test/test_kubeflow_org_v1_mpi_job.py deleted file mode 100644 index 1f8f164cf9..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_mpi_job.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_mpi_job import KubeflowOrgV1MPIJob # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1MPIJob(unittest.TestCase): - """KubeflowOrgV1MPIJob unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1MPIJob - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_mpi_job.KubeflowOrgV1MPIJob() # noqa: E501 - if include_optional : - return KubeflowOrgV1MPIJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_mpi_job_spec.KubeflowOrgV1MPIJobSpec( - clean_pod_policy = '0', - main_container = '0', - mpi_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - slots_per_worker = 56, ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ) - ) - else : - return KubeflowOrgV1MPIJob( - ) - - def testKubeflowOrgV1MPIJob(self): - """Test KubeflowOrgV1MPIJob""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_mpi_job_list.py b/sdk/python/test/test_kubeflow_org_v1_mpi_job_list.py deleted file mode 100644 index 4406dc67e1..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_mpi_job_list.py +++ /dev/null @@ -1,156 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_mpi_job_list import KubeflowOrgV1MPIJobList # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1MPIJobList(unittest.TestCase): - """KubeflowOrgV1MPIJobList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1MPIJobList - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_mpi_job_list.KubeflowOrgV1MPIJobList() # noqa: E501 - if include_optional : - return KubeflowOrgV1MPIJobList( - api_version = '0', - items = [ - kubeflow_org_v1_mpi_job.KubeflowOrgV1MPIJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_mpi_job_spec.KubeflowOrgV1MPIJobSpec( - clean_pod_policy = '0', - main_container = '0', - mpi_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - slots_per_worker = 56, ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ), ) - ], - kind = '0', - metadata = None - ) - else : - return KubeflowOrgV1MPIJobList( - items = [ - kubeflow_org_v1_mpi_job.KubeflowOrgV1MPIJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_mpi_job_spec.KubeflowOrgV1MPIJobSpec( - clean_pod_policy = '0', - main_container = '0', - mpi_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - slots_per_worker = 56, ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ), ) - ], - ) - - def testKubeflowOrgV1MPIJobList(self): - """Test KubeflowOrgV1MPIJobList""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_mpi_job_spec.py b/sdk/python/test/test_kubeflow_org_v1_mpi_job_spec.py deleted file mode 100644 index c042104169..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_mpi_job_spec.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_mpi_job_spec import KubeflowOrgV1MPIJobSpec # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1MPIJobSpec(unittest.TestCase): - """KubeflowOrgV1MPIJobSpec unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1MPIJobSpec - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_mpi_job_spec.KubeflowOrgV1MPIJobSpec() # noqa: E501 - if include_optional : - return KubeflowOrgV1MPIJobSpec( - clean_pod_policy = '0', - main_container = '0', - mpi_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - slots_per_worker = 56 - ) - else : - return KubeflowOrgV1MPIJobSpec( - mpi_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - ) - - def testKubeflowOrgV1MPIJobSpec(self): - """Test KubeflowOrgV1MPIJobSpec""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_paddle_elastic_policy.py b/sdk/python/test/test_kubeflow_org_v1_paddle_elastic_policy.py deleted file mode 100644 index cacbd900d7..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_paddle_elastic_policy.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_paddle_elastic_policy import KubeflowOrgV1PaddleElasticPolicy # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1PaddleElasticPolicy(unittest.TestCase): - """KubeflowOrgV1PaddleElasticPolicy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1PaddleElasticPolicy - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_paddle_elastic_policy.KubeflowOrgV1PaddleElasticPolicy() # noqa: E501 - if include_optional : - return KubeflowOrgV1PaddleElasticPolicy( - max_replicas = 56, - max_restarts = 56, - metrics = [ - None - ], - min_replicas = 56 - ) - else : - return KubeflowOrgV1PaddleElasticPolicy( - ) - - def testKubeflowOrgV1PaddleElasticPolicy(self): - """Test KubeflowOrgV1PaddleElasticPolicy""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_paddle_job.py b/sdk/python/test/test_kubeflow_org_v1_paddle_job.py deleted file mode 100644 index 17759aa30a..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_paddle_job.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_paddle_job import KubeflowOrgV1PaddleJob # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1PaddleJob(unittest.TestCase): - """KubeflowOrgV1PaddleJob unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1PaddleJob - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_paddle_job.KubeflowOrgV1PaddleJob() # noqa: E501 - if include_optional : - return KubeflowOrgV1PaddleJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_paddle_job_spec.KubeflowOrgV1PaddleJobSpec( - elastic_policy = kubeflow_org_v1_paddle_elastic_policy.KubeflowOrgV1PaddleElasticPolicy( - max_replicas = 56, - max_restarts = 56, - metrics = [ - None - ], - min_replicas = 56, ), - paddle_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ) - ) - else : - return KubeflowOrgV1PaddleJob( - ) - - def testKubeflowOrgV1PaddleJob(self): - """Test KubeflowOrgV1PaddleJob""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_paddle_job_list.py b/sdk/python/test/test_kubeflow_org_v1_paddle_job_list.py deleted file mode 100644 index e82d533a1f..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_paddle_job_list.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_paddle_job_list import KubeflowOrgV1PaddleJobList # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1PaddleJobList(unittest.TestCase): - """KubeflowOrgV1PaddleJobList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1PaddleJobList - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_paddle_job_list.KubeflowOrgV1PaddleJobList() # noqa: E501 - if include_optional : - return KubeflowOrgV1PaddleJobList( - api_version = '0', - items = [ - kubeflow_org_v1_paddle_job.KubeflowOrgV1PaddleJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_paddle_job_spec.KubeflowOrgV1PaddleJobSpec( - elastic_policy = kubeflow_org_v1_paddle_elastic_policy.KubeflowOrgV1PaddleElasticPolicy( - max_replicas = 56, - max_restarts = 56, - metrics = [ - None - ], - min_replicas = 56, ), - paddle_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ), ) - ], - kind = '0', - metadata = None - ) - else : - return KubeflowOrgV1PaddleJobList( - items = [ - kubeflow_org_v1_paddle_job.KubeflowOrgV1PaddleJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_paddle_job_spec.KubeflowOrgV1PaddleJobSpec( - elastic_policy = kubeflow_org_v1_paddle_elastic_policy.KubeflowOrgV1PaddleElasticPolicy( - max_replicas = 56, - max_restarts = 56, - metrics = [ - None - ], - min_replicas = 56, ), - paddle_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ), ) - ], - ) - - def testKubeflowOrgV1PaddleJobList(self): - """Test KubeflowOrgV1PaddleJobList""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_paddle_job_spec.py b/sdk/python/test/test_kubeflow_org_v1_paddle_job_spec.py deleted file mode 100644 index 71029311b3..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_paddle_job_spec.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_paddle_job_spec import KubeflowOrgV1PaddleJobSpec # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1PaddleJobSpec(unittest.TestCase): - """KubeflowOrgV1PaddleJobSpec unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1PaddleJobSpec - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_paddle_job_spec.KubeflowOrgV1PaddleJobSpec() # noqa: E501 - if include_optional : - return KubeflowOrgV1PaddleJobSpec( - elastic_policy = kubeflow_org_v1_paddle_elastic_policy.KubeflowOrgV1PaddleElasticPolicy( - max_replicas = 56, - max_restarts = 56, - metrics = [ - None - ], - min_replicas = 56, ), - paddle_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ) - ) - else : - return KubeflowOrgV1PaddleJobSpec( - paddle_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - ) - - def testKubeflowOrgV1PaddleJobSpec(self): - """Test KubeflowOrgV1PaddleJobSpec""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_py_torch_job.py b/sdk/python/test/test_kubeflow_org_v1_py_torch_job.py deleted file mode 100644 index 4a85f5ed46..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_py_torch_job.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_py_torch_job import KubeflowOrgV1PyTorchJob # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1PyTorchJob(unittest.TestCase): - """KubeflowOrgV1PyTorchJob unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1PyTorchJob - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_py_torch_job.KubeflowOrgV1PyTorchJob() # noqa: E501 - if include_optional : - return KubeflowOrgV1PyTorchJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_py_torch_job_spec.KubeflowOrgV1PyTorchJobSpec( - elastic_policy = kubeflow_org_v1_elastic_policy.KubeflowOrgV1ElasticPolicy( - max_replicas = 56, - max_restarts = 56, - metrics = [ - None - ], - min_replicas = 56, - n_proc_per_node = 56, - rdzv_backend = '0', - rdzv_conf = [ - kubeflow_org_v1_rdzv_conf.KubeflowOrgV1RDZVConf( - key = '0', - value = '0', ) - ], - rdzv_host = '0', - rdzv_id = '0', - rdzv_port = 56, - standalone = True, ), - nproc_per_node = '0', - pytorch_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ) - ) - else : - return KubeflowOrgV1PyTorchJob( - ) - - def testKubeflowOrgV1PyTorchJob(self): - """Test KubeflowOrgV1PyTorchJob""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_py_torch_job_list.py b/sdk/python/test/test_kubeflow_org_v1_py_torch_job_list.py deleted file mode 100644 index 2cbafc65de..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_py_torch_job_list.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_py_torch_job_list import KubeflowOrgV1PyTorchJobList # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1PyTorchJobList(unittest.TestCase): - """KubeflowOrgV1PyTorchJobList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1PyTorchJobList - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_py_torch_job_list.KubeflowOrgV1PyTorchJobList() # noqa: E501 - if include_optional : - return KubeflowOrgV1PyTorchJobList( - api_version = '0', - items = [ - kubeflow_org_v1_py_torch_job.KubeflowOrgV1PyTorchJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_py_torch_job_spec.KubeflowOrgV1PyTorchJobSpec( - elastic_policy = kubeflow_org_v1_elastic_policy.KubeflowOrgV1ElasticPolicy( - max_replicas = 56, - max_restarts = 56, - metrics = [ - None - ], - min_replicas = 56, - n_proc_per_node = 56, - rdzv_backend = '0', - rdzv_conf = [ - kubeflow_org_v1_rdzv_conf.KubeflowOrgV1RDZVConf( - key = '0', - value = '0', ) - ], - rdzv_host = '0', - rdzv_id = '0', - rdzv_port = 56, - standalone = True, ), - nproc_per_node = '0', - pytorch_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ), ) - ], - kind = '0', - metadata = None - ) - else : - return KubeflowOrgV1PyTorchJobList( - items = [ - kubeflow_org_v1_py_torch_job.KubeflowOrgV1PyTorchJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_py_torch_job_spec.KubeflowOrgV1PyTorchJobSpec( - elastic_policy = kubeflow_org_v1_elastic_policy.KubeflowOrgV1ElasticPolicy( - max_replicas = 56, - max_restarts = 56, - metrics = [ - None - ], - min_replicas = 56, - n_proc_per_node = 56, - rdzv_backend = '0', - rdzv_conf = [ - kubeflow_org_v1_rdzv_conf.KubeflowOrgV1RDZVConf( - key = '0', - value = '0', ) - ], - rdzv_host = '0', - rdzv_id = '0', - rdzv_port = 56, - standalone = True, ), - nproc_per_node = '0', - pytorch_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ), ) - ], - ) - - def testKubeflowOrgV1PyTorchJobList(self): - """Test KubeflowOrgV1PyTorchJobList""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_py_torch_job_spec.py b/sdk/python/test/test_kubeflow_org_v1_py_torch_job_spec.py deleted file mode 100644 index f19f3f2fd1..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_py_torch_job_spec.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_py_torch_job_spec import KubeflowOrgV1PyTorchJobSpec # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1PyTorchJobSpec(unittest.TestCase): - """KubeflowOrgV1PyTorchJobSpec unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1PyTorchJobSpec - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_py_torch_job_spec.KubeflowOrgV1PyTorchJobSpec() # noqa: E501 - if include_optional : - return KubeflowOrgV1PyTorchJobSpec( - elastic_policy = kubeflow_org_v1_elastic_policy.KubeflowOrgV1ElasticPolicy( - max_replicas = 56, - max_restarts = 56, - metrics = [ - None - ], - min_replicas = 56, - n_proc_per_node = 56, - rdzv_backend = '0', - rdzv_conf = [ - kubeflow_org_v1_rdzv_conf.KubeflowOrgV1RDZVConf( - key = '0', - value = '0', ) - ], - rdzv_host = '0', - rdzv_id = '0', - rdzv_port = 56, - standalone = True, ), - nproc_per_node = '0', - pytorch_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ) - ) - else : - return KubeflowOrgV1PyTorchJobSpec( - pytorch_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - ) - - def testKubeflowOrgV1PyTorchJobSpec(self): - """Test KubeflowOrgV1PyTorchJobSpec""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_rdzv_conf.py b/sdk/python/test/test_kubeflow_org_v1_rdzv_conf.py deleted file mode 100644 index 86359946fe..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_rdzv_conf.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_rdzv_conf import KubeflowOrgV1RDZVConf # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1RDZVConf(unittest.TestCase): - """KubeflowOrgV1RDZVConf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1RDZVConf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_rdzv_conf.KubeflowOrgV1RDZVConf() # noqa: E501 - if include_optional : - return KubeflowOrgV1RDZVConf( - key = '0', - value = '0' - ) - else : - return KubeflowOrgV1RDZVConf( - ) - - def testKubeflowOrgV1RDZVConf(self): - """Test KubeflowOrgV1RDZVConf""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_replica_spec.py b/sdk/python/test/test_kubeflow_org_v1_replica_spec.py deleted file mode 100644 index e8540038c0..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_replica_spec.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_replica_spec import KubeflowOrgV1ReplicaSpec # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1ReplicaSpec(unittest.TestCase): - """KubeflowOrgV1ReplicaSpec unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1ReplicaSpec - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec() # noqa: E501 - if include_optional : - return KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None - ) - else : - return KubeflowOrgV1ReplicaSpec( - ) - - def testKubeflowOrgV1ReplicaSpec(self): - """Test KubeflowOrgV1ReplicaSpec""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_replica_status.py b/sdk/python/test/test_kubeflow_org_v1_replica_status.py deleted file mode 100644 index ddddf75a91..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_replica_status.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_replica_status import KubeflowOrgV1ReplicaStatus # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1ReplicaStatus(unittest.TestCase): - """KubeflowOrgV1ReplicaStatus unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1ReplicaStatus - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus() # noqa: E501 - if include_optional : - return KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56 - ) - else : - return KubeflowOrgV1ReplicaStatus( - ) - - def testKubeflowOrgV1ReplicaStatus(self): - """Test KubeflowOrgV1ReplicaStatus""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_run_policy.py b/sdk/python/test/test_kubeflow_org_v1_run_policy.py deleted file mode 100644 index 525be1d785..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_run_policy.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_run_policy import KubeflowOrgV1RunPolicy # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1RunPolicy(unittest.TestCase): - """KubeflowOrgV1RunPolicy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1RunPolicy - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy() # noqa: E501 - if include_optional : - return KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56 - ) - else : - return KubeflowOrgV1RunPolicy( - ) - - def testKubeflowOrgV1RunPolicy(self): - """Test KubeflowOrgV1RunPolicy""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_scheduling_policy.py b/sdk/python/test/test_kubeflow_org_v1_scheduling_policy.py deleted file mode 100644 index f824265467..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_scheduling_policy.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_scheduling_policy import KubeflowOrgV1SchedulingPolicy # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1SchedulingPolicy(unittest.TestCase): - """KubeflowOrgV1SchedulingPolicy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1SchedulingPolicy - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy() # noqa: E501 - if include_optional : - return KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56 - ) - else : - return KubeflowOrgV1SchedulingPolicy( - ) - - def testKubeflowOrgV1SchedulingPolicy(self): - """Test KubeflowOrgV1SchedulingPolicy""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_tf_job.py b/sdk/python/test/test_kubeflow_org_v1_tf_job.py deleted file mode 100644 index fa1cf4a6bc..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_tf_job.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_tf_job import KubeflowOrgV1TFJob # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1TFJob(unittest.TestCase): - """KubeflowOrgV1TFJob unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1TFJob - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_tf_job.KubeflowOrgV1TFJob() # noqa: E501 - if include_optional : - return KubeflowOrgV1TFJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_tf_job_spec.KubeflowOrgV1TFJobSpec( - enable_dynamic_worker = True, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - success_policy = '0', - tf_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ) - ) - else : - return KubeflowOrgV1TFJob( - ) - - def testKubeflowOrgV1TFJob(self): - """Test KubeflowOrgV1TFJob""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_tf_job_list.py b/sdk/python/test/test_kubeflow_org_v1_tf_job_list.py deleted file mode 100644 index 6f7c46d212..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_tf_job_list.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_tf_job_list import KubeflowOrgV1TFJobList # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1TFJobList(unittest.TestCase): - """KubeflowOrgV1TFJobList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1TFJobList - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_tf_job_list.KubeflowOrgV1TFJobList() # noqa: E501 - if include_optional : - return KubeflowOrgV1TFJobList( - api_version = '0', - items = [ - kubeflow_org_v1_tf_job.KubeflowOrgV1TFJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_tf_job_spec.KubeflowOrgV1TFJobSpec( - enable_dynamic_worker = True, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - success_policy = '0', - tf_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ), ) - ], - kind = '0', - metadata = None - ) - else : - return KubeflowOrgV1TFJobList( - items = [ - kubeflow_org_v1_tf_job.KubeflowOrgV1TFJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_tf_job_spec.KubeflowOrgV1TFJobSpec( - enable_dynamic_worker = True, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - success_policy = '0', - tf_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ), ) - ], - ) - - def testKubeflowOrgV1TFJobList(self): - """Test KubeflowOrgV1TFJobList""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_tf_job_spec.py b/sdk/python/test/test_kubeflow_org_v1_tf_job_spec.py deleted file mode 100644 index 892fb43578..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_tf_job_spec.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_tf_job_spec import KubeflowOrgV1TFJobSpec # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1TFJobSpec(unittest.TestCase): - """KubeflowOrgV1TFJobSpec unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1TFJobSpec - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_tf_job_spec.KubeflowOrgV1TFJobSpec() # noqa: E501 - if include_optional : - return KubeflowOrgV1TFJobSpec( - enable_dynamic_worker = True, - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - success_policy = '0', - tf_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - } - ) - else : - return KubeflowOrgV1TFJobSpec( - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - tf_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - ) - - def testKubeflowOrgV1TFJobSpec(self): - """Test KubeflowOrgV1TFJobSpec""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_xg_boost_job.py b/sdk/python/test/test_kubeflow_org_v1_xg_boost_job.py deleted file mode 100644 index 88e6de1793..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_xg_boost_job.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_xg_boost_job import KubeflowOrgV1XGBoostJob # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1XGBoostJob(unittest.TestCase): - """KubeflowOrgV1XGBoostJob unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1XGBoostJob - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_xg_boost_job.KubeflowOrgV1XGBoostJob() # noqa: E501 - if include_optional : - return KubeflowOrgV1XGBoostJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_xg_boost_job_spec.KubeflowOrgV1XGBoostJobSpec( - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - xgb_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ) - ) - else : - return KubeflowOrgV1XGBoostJob( - ) - - def testKubeflowOrgV1XGBoostJob(self): - """Test KubeflowOrgV1XGBoostJob""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_xg_boost_job_list.py b/sdk/python/test/test_kubeflow_org_v1_xg_boost_job_list.py deleted file mode 100644 index 5cdfdd931d..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_xg_boost_job_list.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_xg_boost_job_list import KubeflowOrgV1XGBoostJobList # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1XGBoostJobList(unittest.TestCase): - """KubeflowOrgV1XGBoostJobList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1XGBoostJobList - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_xg_boost_job_list.KubeflowOrgV1XGBoostJobList() # noqa: E501 - if include_optional : - return KubeflowOrgV1XGBoostJobList( - api_version = '0', - items = [ - kubeflow_org_v1_xg_boost_job.KubeflowOrgV1XGBoostJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_xg_boost_job_spec.KubeflowOrgV1XGBoostJobSpec( - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - xgb_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ), ) - ], - kind = '0', - metadata = None - ) - else : - return KubeflowOrgV1XGBoostJobList( - items = [ - kubeflow_org_v1_xg_boost_job.KubeflowOrgV1XGBoostJob( - api_version = '0', - kind = '0', - metadata = None, - spec = kubeflow_org_v1_xg_boost_job_spec.KubeflowOrgV1XGBoostJobSpec( - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - xgb_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, ), - status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus( - completion_time = None, - conditions = [ - kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition( - last_transition_time = None, - last_update_time = None, - message = '0', - reason = '0', - status = '0', - type = '0', ) - ], - last_reconcile_time = None, - replica_statuses = { - 'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus( - active = 56, - failed = 56, - label_selector = None, - selector = '0', - succeeded = 56, ) - }, - start_time = None, ), ) - ], - ) - - def testKubeflowOrgV1XGBoostJobList(self): - """Test KubeflowOrgV1XGBoostJobList""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_kubeflow_org_v1_xg_boost_job_spec.py b/sdk/python/test/test_kubeflow_org_v1_xg_boost_job_spec.py deleted file mode 100644 index 222f29f84a..0000000000 --- a/sdk/python/test/test_kubeflow_org_v1_xg_boost_job_spec.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Kubeflow Training SDK - - Python SDK for Kubeflow Training # noqa: E501 - - The version of the OpenAPI document: v1.7.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -from kubeflow.training.models import * -from kubeflow.training.models.kubeflow_org_v1_xg_boost_job_spec import KubeflowOrgV1XGBoostJobSpec # noqa: E501 -from kubeflow.training.rest import ApiException - -class TestKubeflowOrgV1XGBoostJobSpec(unittest.TestCase): - """KubeflowOrgV1XGBoostJobSpec unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test KubeflowOrgV1XGBoostJobSpec - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = kubeflow.training.models.kubeflow_org_v1_xg_boost_job_spec.KubeflowOrgV1XGBoostJobSpec() # noqa: E501 - if include_optional : - return KubeflowOrgV1XGBoostJobSpec( - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - xgb_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - } - ) - else : - return KubeflowOrgV1XGBoostJobSpec( - run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy( - active_deadline_seconds = 56, - backoff_limit = 56, - clean_pod_policy = '0', - scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy( - min_available = 56, - min_resources = { - 'key' : None - }, - priority_class = '0', - queue = '0', - schedule_timeout_seconds = 56, ), - suspend = True, - ttl_seconds_after_finished = 56, ), - xgb_replica_specs = { - 'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec( - replicas = 56, - restart_policy = '0', - template = None, ) - }, - ) - - def testKubeflowOrgV1XGBoostJobSpec(self): - """Test KubeflowOrgV1XGBoostJobSpec""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main()