github.com/kubeflow/training-operator@v1.7.0/sdk/python/README.md (about) 1 # Kubeflow Training SDK 2 Python SDK for Training Operator 3 4 ## Requirements. 5 6 Python 2.7 and 3.5+ 7 8 ## Installation & Usage 9 ### pip install 10 11 ```sh 12 pip install kubeflow-training 13 ``` 14 15 Then import the package: 16 ```python 17 from kubeflow import training 18 ``` 19 20 ### Setuptools 21 22 Install via [Setuptools](http://pypi.python.org/pypi/setuptools). 23 24 ```sh 25 python setup.py install --user 26 ``` 27 (or `sudo python setup.py install` to install the package for all users) 28 29 30 ## Getting Started 31 32 Please follow the [sample](examples/kubeflow-tfjob-sdk.ipynb) to create, update and delete TFJob. 33 34 ## Documentation for API Endpoints 35 36 TODO(andreyvelich): These docs are outdated. Please track this issue for the status: 37 https://github.com/kubeflow/katib/issues/2081 38 39 Class | Method | Description 40 ------------ | ------------- | ------------- 41 [TFJobClient](docs/TFJobClient.md) | [create](docs/TFJobClient.md#create) | Create TFJob| 42 [TFJobClient](docs/TFJobClient.md) | [get](docs/TFJobClient.md#get) | Get or watch the specified TFJob or all TFJob in the namespace | 43 [TFJobClient](docs/TFJobClient.md) | [patch](docs/TFJobClient.md#patch) | Patch the specified TFJob| 44 [TFJobClient](docs/TFJobClient.md) | [delete](docs/TFJobClient.md#delete) | Delete the specified TFJob | 45 [TFJobClient](docs/TFJobClient.md) | [wait_for_job](docs/TFJobClient.md#wait_for_job) | Wait for the specified job to finish | 46 [TFJobClient](docs/TFJobClient.md) | [wait_for_condition](docs/TFJobClient.md#wait_for_condition) | Waits until any of the specified conditions occur | 47 [TFJobClient](docs/TFJobClient.md) | [get_job_status](docs/TFJobClient.md#get_job_status) | Get the TFJob status| 48 [TFJobClient](docs/TFJobClient.md) | [is_job_running](docs/TFJobClient.md#is_job_running) | Check if the TFJob status is Running | 49 [TFJobClient](docs/TFJobClient.md) | [is_job_succeeded](docs/TFJobClient.md#is_job_succeeded) | Check if the TFJob status is Succeeded | 50 [TFJobClient](docs/TFJobClient.md) | [get_pod_names](docs/TFJobClient.md#get_pod_names) | Get pod names of TFJob | 51 [TFJobClient](docs/TFJobClient.md) | [get_logs](docs/TFJobClient.md#get_logs) | Get training logs of the TFJob | 52 [PyTorchJobClient](docs/PyTorchJobClient.md) | [create](docs/PyTorchJobClient.md#create) | Create PyTorchJob| 53 [PyTorchJobClient](docs/PyTorchJobClient.md) | [get](docs/PyTorchJobClient.md#get) | Get the specified PyTorchJob or all PyTorchJob in the namespace | 54 [PyTorchJobClient](docs/PyTorchJobClient.md) | [patch](docs/PyTorchJobClient.md#patch) | Patch the specified PyTorchJob| 55 [PyTorchJobClient](docs/PyTorchJobClient.md) | [delete](docs/PyTorchJobClient.md#delete) | Delete the specified PyTorchJob | 56 [PyTorchJobClient](docs/PyTorchJobClient.md) | [wait_for_job](docs/PyTorchJobClient.md#wait_for_job) | Wait for the specified job to finish | 57 [PyTorchJobClient](docs/PyTorchJobClient.md) | [wait_for_condition](docs/PyTorchJobClient.md#wait_for_condition) | Waits until any of the specified conditions occur | 58 [PyTorchJobClient](docs/PyTorchJobClient.md) | [get_job_status](docs/PyTorchJobClient.md#get_job_status) | Get the PyTorchJob status| 59 [PyTorchJobClient](docs/PyTorchJobClient.md) | [is_job_running](docs/PyTorchJobClient.md#is_job_running) | Check if the PyTorchJob running | 60 [PyTorchJobClient](docs/PyTorchJobClient.md) | [is_job_succeeded](docs/PyTorchJobClient.md#is_job_succeeded) | Check if the PyTorchJob Succeeded | 61 [PyTorchJobClient](docs/PyTorchJobClient.md) | [get_pod_names](docs/PyTorchJobClient.md#get_pod_names) | Get pod names of PyTorchJob | 62 [PyTorchJobClient](docs/PyTorchJobClient.md)| [get_logs](docs/PyTorchJobClient.md#get_logs) | Get training logs of the PyTorchJob | 63 64 ## Documentation For Models 65 66 - [V1JobCondition](docs/V1JobCondition.md) 67 - [V1JobStatus](docs/V1JobStatus.md) 68 - [V1MXJob](docs/KubeflowOrgV1MXJob.md) 69 - [V1MXJobList](docs/KubeflowOrgV1MXJobList.md) 70 - [V1MXJobSpec](docs/KubeflowOrgV1MXJobSpec.md) 71 - [V1PyTorchJob](docs/KubeflowOrgV1PyTorchJob.md) 72 - [V1PyTorchJobList](docs/KubeflowOrgV1PyTorchJobList.md) 73 - [V1PyTorchJobSpec](docs/KubeflowOrgV1PyTorchJobSpec.md) 74 - [V1ReplicaSpec](docs/V1ReplicaSpec.md) 75 - [V1ReplicaStatus](docs/V1ReplicaStatus.md) 76 - [V1RunPolicy](docs/V1RunPolicy.md) 77 - [V1SchedulingPolicy](docs/V1SchedulingPolicy.md) 78 - [V1TFJob](docs/KubeflowOrgV1TFJob.md) 79 - [V1TFJobList](docs/KubeflowOrgV1TFJobList.md) 80 - [V1TFJobSpec](docs/KubeflowOrgV1TFJobSpec.md) 81 - [V1XGBoostJob](docs/KubeflowOrgV1XGBoostJob.md) 82 - [V1XGBoostJobList](docs/KubeflowOrgV1XGBoostJobList.md) 83 - [V1XGBoostJobSpec](docs/KubeflowOrgV1XGBoostJobSpec.md) 84 85 86 ## Building conformance tests 87 88 Run 89 ``` 90 docker build . -f Dockerfile.conformance -t <tag> 91 ```