Commit Graph
38 Commits
Author SHA1 Message Date
Andrey VelichkevichandGitHub e051fe09da KEP-2170: [SDK] Initial implementation of the Kubeflow Training V2 Python SDK (#2324)
* Init commit

Signed-off-by: Andrey Velichkevich <[email protected]>

* Implement SDK APIs

Signed-off-by: Andrey Velichkevich <[email protected]>

* Update __init__ file

Signed-off-by: Andrey Velichkevich <[email protected]>

* Add model and dataset configs

Signed-off-by: Andrey Velichkevich <[email protected]>

* Remove print

Signed-off-by: Andrey Velichkevich <[email protected]>

* Add status to TrainJob

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix sed for Linux

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix PHASE_POST_TRAINING const

Signed-off-by: Andrey Velichkevich <[email protected]>

* Add device labels for the runtimes

Signed-off-by: Andrey Velichkevich <[email protected]>

* Add Components to the TrainJob type

Signed-off-by: Andrey Velichkevich <[email protected]>

* Get container devices util

Signed-off-by: Andrey Velichkevich <[email protected]>

* Use SDK assets in initializer

Signed-off-by: Andrey Velichkevich <[email protected]>

* Add the runtime_ref to the list_jobs() API

Signed-off-by: Andrey Velichkevich <[email protected]>

* Check if runtime label presents

Signed-off-by: Andrey Velichkevich <[email protected]>

* Add Trainer arg as part of train API

Signed-off-by: Andrey Velichkevich <[email protected]>

* Rename lora to peft config

Signed-off-by: Andrey Velichkevich <[email protected]>

* Using global prop to remove SDK tests

Signed-off-by: Andrey Velichkevich <[email protected]>

* Fix type for lora_dropout

Signed-off-by: Andrey Velichkevich <[email protected]>

* Import the JobSet models
Use kube-openapi generator to remove unnecessary models from apimachinery

Signed-off-by: Andrey Velichkevich <[email protected]>

* Parse runtime as object

Signed-off-by: Andrey Velichkevich <[email protected]>

* Remove old gen_openapi

Signed-off-by: Andrey Velichkevich <[email protected]>

* Rename GPU_DEVICE_LABEL to NVIDIA_GPU_DEVICE_LABEL

Signed-off-by: Andrey Velichkevich <[email protected]>

* Run codegen

Signed-off-by: Andrey Velichkevich <[email protected]>

* Install git on initializer images

Signed-off-by: Andrey Velichkevich <[email protected]>

* Rename device to accelerator for Runtime class

Signed-off-by: Andrey Velichkevich <[email protected]>

---------

Signed-off-by: Andrey Velichkevich <[email protected]>
2024-12-13 16:59:06 +00:00
Antonin StefanuttiandGitHub 7b68a4458c Upgrade Kubernetes to v1.31.3 (#2330)
* Upgrade Kubernetes to v1.31.3

Signed-off-by: Antonin Stefanutti <[email protected]>

* Skip controller names uniqueness check for tests

Signed-off-by: Antonin Stefanutti <[email protected]>

* Move cache argument from Registry to ReconcilerBuilder API

Signed-off-by: Antonin Stefanutti <[email protected]>

---------

Signed-off-by: Antonin Stefanutti <[email protected]>
2024-12-09 18:17:04 +00:00
Antonin StefanuttiandGitHub 3801b090d6 Upgrade Kubernetes to v1.30.7 (#2332)
* Upgrade Kubernetes to v1.30.7

Signed-off-by: Antonin Stefanutti <[email protected]>

* Use typed event handlers and predicates in job controllers

Signed-off-by: Antonin Stefanutti <[email protected]>

* Re-organize pkg/common/util/reconciler.go

Signed-off-by: Antonin Stefanutti <[email protected]>

* Update installation instructions in README

Signed-off-by: Antonin Stefanutti <[email protected]>

---------

Signed-off-by: Antonin Stefanutti <[email protected]>
2024-11-27 15:05:54 +00:00
Michał SzadkowskiandGitHub 26c9112c07 [Feature] Support managed by external controller (#2203)
* Introduce ManagedBy field to RunPolicy that is used by each Kubeflow Job Spec

Signed-off-by: Michal Szadkowski <[email protected]>

* Update Kubeflow JOb manifests

Signed-off-by: Michal Szadkowski <[email protected]>

* Update Kubeflow Jobs Reconcile to use ManagedBy field to decide if skip the process

Signed-off-by: Michal Szadkowski <[email protected]>

* job controller test

Signed-off-by: Michal Szadkowski <[email protected]>

* spec validation webhook

Signed-off-by: Michal Szadkowski <[email protected]>

* add manageBy maxLenght const

Signed-off-by: Michal Szadkowski <[email protected]>

* generate new manifest

Signed-off-by: Michal Szadkowski <[email protected]>

* revert webhook formatting

Signed-off-by: Michal Szadkowski <[email protected]>

* Move allowed controllers constants in one place

Signed-off-by: Michal Szadkowski <[email protected]>

* Make validatation for allowed managedBy values

Signed-off-by: Michal Szadkowski <[email protected]>

* Update after controllers constants move

Signed-off-by: Michal Szadkowski <[email protected]>

* Update jobs controller tests

Signed-off-by: Michal Szadkowski <[email protected]>

* Update validateManagedBy webhook

Signed-off-by: Michal Szadkowski <[email protected]>

* Remove validation for the length of ManagedBy field

Signed-off-by: Michal Szadkowski <[email protected]>

* Update after code review

Signed-off-by: Michal Szadkowski <[email protected]>

* Update ManagedBy comment

Signed-off-by: Michal Szadkowski <[email protected]>

* E2E tests for managedBy

Signed-off-by: Michal Szadkowski <[email protected]>

* Update generated files and manifests

Signed-off-by: Michal Szadkowski <[email protected]>

* Rework after code review

Signed-off-by: Michal Szadkowski <[email protected]>

* Revert kustomization change

Signed-off-by: Michal Szadkowski <[email protected]>

* Update job_test and logging

Signed-off-by: Michal Szadkowski <[email protected]>

* Provide immutability check for ManagedBy

Signed-off-by: Michal Szadkowski <[email protected]>

* Avoid making copy of runPolicy

Signed-off-by: Michal Szadkowski <[email protected]>

* Split RunPolicy validators to Update and Create

Signed-off-by: Michal Szadkowski <[email protected]>

* Fix the naming and call validate always

Signed-off-by: Michal Szadkowski <[email protected]>

* Update tests

Signed-off-by: Michal Szadkowski <[email protected]>

---------

Signed-off-by: Michal Szadkowski <[email protected]>
2024-09-18 18:09:27 +00:00
AlexandGitHub 7c3307701e Implement pre-commit hooks (#2184)
* Implement pre-commit hooks

Signed-off-by: droctothorpe <[email protected]>

* Fix broken file links and update reqs

Signed-off-by: droctothorpe <[email protected]>

* Add examples folder

Signed-off-by: droctothorpe <[email protected]>

* Remove black instructions from developer guide

Signed-off-by: droctothorpe <[email protected]>

---------

Signed-off-by: droctothorpe <[email protected]>
2024-08-05 17:03:39 +00:00
Sandipan PandaandGitHub 08fb25f8a0 Add JAX API (#2163)
Support JAXJob

Signed-off-by: Sandipan Panda <[email protected]>
2024-08-02 03:58:07 +00:00
Tariq HasanandGitHub a2812b5fb4 Remove support for MXJob (#2150)
Signed-off-by: tariq-hasan <[email protected]>
2024-07-28 10:37:56 +00:00
Yuki IwaiandGitHub 7b09fd0449 Support K8s v1.29 and Drop K8s v1.26 (#2039)
Signed-off-by: Yuki Iwai <[email protected]>
2024-03-28 21:02:18 +00:00
deepanker13andGitHub 240e547c41 Training operator SDK unit test (#1938)
* adding bug fix in gen-sdk.sh and unit test for create_job function in training client

* code reformatted using black

* move unittest to a different folder

* code review comments changes

* adding pytest github action

* removing 3rd party github pytest action
2023-11-21 09:25:10 +00:00
Johnu GeorgeandGitHub 051a68a3b0 Merge v1.7 branch changes to Main (#1940)
* Update latest training operator images in v1.7 branch (#1881)

* Removing dead code

* Update monitoring guide

* Update latest training operator image

* Update sdk to v1.7.0rc0 (#1882)

* Removing dead code

* Update monitoring guide

* Update latest training operator image

* Update SDK version to v1.7.0rc0

* Update sdk to v1.7.0 (#1939)
2023-11-01 12:31:57 +00:00
af15b0d553 [SDK] Consolidate Naming for CRUD APIs (#1907)
* Add Flake and Black Lint

* Change SDK APIs

* Update E2E tests

* Fix a few function parameters

* Fix black format

* Fix a few comments

* Fix conftest location

* Fix Job kind in tests

* Fix client creation in test

* Fix namespace arg in get_job_conditions

* Update SDK examples with the latest changes

* Rename SDK examples

* Fix black action

* Update checkout action version

Co-authored-by: Yuki Iwai <[email protected]>

* Use Black 23.9.1 version

* Fix GitHub Action for Black

* Add unit test to create PyTorchJob from func

* Rename timeout to wait_timeout

* Validate that Job is not set with other input parameters

* Update black in developer guide

* Remove pip_index_url validation

* Use locals to verify input

* Print Job info when E2E fails

* Remove duplicated delete

---------

Co-authored-by: Yuki Iwai <[email protected]>
2023-09-22 14:27:33 +00:00
Yuki IwaiandGitHub de6d52bf3a Implement suspend semantics (#1859)
Signed-off-by: Yuki Iwai <[email protected]>
2023-07-20 20:25:24 +00:00
Yuki IwaiandGitHub 38092c3b6e Make Condition and ReplicaStatus optional (#1862)
Signed-off-by: Yuki Iwai <[email protected]>
2023-07-13 17:07:25 +00:00
Chitsing KUIandGitHub a81242a4cb Set correct ENV for PytorchJob to support torchrun (#1840)
* fix pytorch WORLD_SIZE env inconsistent

* add correct env node_rank, nnodes for torch

* restore elastic nnproc

* use string for nproc_per_node

* add defaults in api

* add validation for two nproc_per_node, use auto for defaulter

* add ut for defaults and validation

* fix ut

* add doc for nproc_per_node
2023-07-12 17:11:07 +00:00
c320716a1a Merge kubeflow/common to training-operator (#1813)
* Support for k8s v1.25 in CI

* Support for k8s v1.25 in CI

* Change k8s api to v1.25

* Upgrade golangci-lint version

* Add changelog

* Update CHANGELOG.md

* Update Changelog

* Merge common repo

* Avoid to depend on local env when installing the code-generators (#1810)

Signed-off-by: Yuki Iwai <[email protected]>

* Make scheduler-plugins the default gang scheduler. (#1747)

Signed-off-by: Syulin7 <[email protected]>

* Fix tests

* Fix merge conflicts

* Fix CI issues

* Fix CI issues

* Fix review comments

* Add contributors in Readme file

* Fix review comments

* Fix review comments

---------

Signed-off-by: Yuki Iwai <[email protected]>
Signed-off-by: Syulin7 <[email protected]>
Co-authored-by: Yuki Iwai <[email protected]>
Co-authored-by: yu lin <[email protected]>
2023-05-31 11:04:04 +00:00
yu linandGitHub 959a7b8711 Make scheduler-plugins the default gang scheduler. (#1747)
Signed-off-by: Syulin7 <[email protected]>
2023-05-23 11:10:35 +00:00
nagar-ajayandGitHub 955a71e8ac E2e test in k8s cluster and Namespace option (#1774)
* update mpijob e2e test to use fixtures

* update mxjob e2e test to use fixtures

* update paddlejob e2e test to use fixtures

* update pytorchjob e2e test to use fixtures

* update xgboostjob e2e test to use fixtures

* update tfjob e2e test to use fixtures

* remove training_client fixture

* move conftest to test root dir

* delete only autogenerated test files

* add default namespace option in integration-tests github action
2023-03-15 10:04:10 +00:00
29c3feb9f4 Adopting coschduling plugin (#1724)
* Add scheduler plugin for coscheduling

Signed-off-by: Yuki Iwai <[email protected]>
Co-authored-by: Wang Zhang <[email protected]>
Signed-off-by: Yuki Iwai <[email protected]>

* generate codes

Signed-off-by: Yuki Iwai <[email protected]>

* Add a custom Watcher for scheduler-plugins PodGroup to controllers

Signed-off-by: Yuki Iwai <[email protected]>

* Fix predicates of paddlepaddle-controller for scheduling.volcano.sh/v1beta1 PodGroup

Signed-off-by: Yuki Iwai <[email protected]>

* Upgrade kubeflow/common version to v0.4.6 with HPA changes

Signed-off-by: Yuki Iwai <[email protected]>

Signed-off-by: Yuki Iwai <[email protected]>
Co-authored-by: Wang Zhang <[email protected]>
2023-01-21 17:58:50 +00:00
Andrey VelichkevichandGitHub 38c63d5b35 [SDK] Create Unify Training Client (#1719)
* Remove legacy ksonnet tests

* [SDK] Create Unify Training Client

* Modify E2E tests

* Rename Training to Operator version

* Add missing exception

* Add API server timeout parameter

* Add delete options

* Fix import for V1JobCondition

* Fix container name in e2e tests

* Fix mxnet container

* Import all Kubernetes models

* Update SDK Examples

* Verify other SDK APIs in e2e tests

* Add replica types to const

* Use logging in e2e tests

* Fix logging for status

* Use const for job types
2023-01-17 15:28:20 +00:00
Johnu GeorgeandGitHub 8c07ee0f54 HPA support for PyTorch Elastic (#1701)
* Support for k8s v1.25 in CI

* Support for k8s v1.25 in CI

* Change k8s api to v1.25

* Upgrade golangci-lint version

* Fixes for HPA in pytorchjob

* Common changes
2022-12-21 15:49:13 +00:00
Joeshi KuiandGitHub 483380337a [PaddlePaddle] support paddlejob (#1675)
* support paddlejob

* fix ci

* fix tools diff for ci

* fix ci test

* rm todo

* add e2e test

* fix e2e test

* fix e2e ci

* add paddlejob to kustomize

* set registry to docker.io

* rebase

* add rbac for paddlejob

* add unitest cover container port

* fix rebase

* update Copyright
2022-11-07 20:18:37 +00:00
Johnu GeorgeandGitHub 5221641445 Update training operator sdk version to 1.5.0 (#1651)
* Adding latest image tag

* Update manifests with latest image tag

* Update sdk version in files
2022-08-19 13:11:53 +00:00
Johnu GeorgeandGitHub 28f2e4f7ae Update SDK version to 1.5.0 (#1624)
* Adding latest image tag

* Update manifests with latest image tag

* Upgrading sdk to 1.5.0
2022-06-28 16:23:34 +00:00
Johnu GeorgeandGitHub d2986d6db1 MXNet SDK with Status check fix (#1618)
* Adding latest image tag

* Update manifests with latest image tag

* Add MXNet Job SDK

* Fix namespace
2022-06-20 20:00:37 +00:00
Yuki IwaiandGitHub 0166d87791 Add clientset for MPIJob, PytorchJob, MXJob, and XGBoostJob (#1610) 2022-06-14 04:20:31 +00:00
Johnu GeorgeandGitHub c378f8642e Adding MPI python sdk (#1608)
* Adding latest image tag

* Update manifests with latest image tag

* Update k8s dependencies to v0.24.1

* Update manifests

* Update k8s matrix for integration tests

* Update k8s matrix for unit tests

* Fix k8s versions

* Fix version

* Add scripts in separate file

* Fix Makefile

* Cleanup Makefile

* Addressing review comments

* Generating sdk for MPI

* Make list metadata optional

* Adding open gen file

* Commit swagger change

* Adding XGboost python sdk

* Adding MPI python sdk
2022-06-10 11:25:19 +00:00
Johnu GeorgeandGitHub c21c56f9e0 Adding XGboost Python sdk (#1607)
* Adding latest image tag

* Update manifests with latest image tag

* Update k8s dependencies to v0.24.1

* Update manifests

* Update k8s matrix for integration tests

* Update k8s matrix for unit tests

* Fix k8s versions

* Fix version

* Add scripts in separate file

* Fix Makefile

* Cleanup Makefile

* Addressing review comments

* Generating sdk for MPI

* Make list metadata optional

* Adding open gen file

* Commit swagger change

* Adding XGboost python sdk
2022-06-09 21:20:19 +00:00
Johnu GeorgeandGitHub 9a7e72b19e Generating MPI python sdk (#1606)
* Adding latest image tag

* Update manifests with latest image tag

* Update k8s dependencies to v0.24.1

* Update manifests

* Update k8s matrix for integration tests

* Update k8s matrix for unit tests

* Fix k8s versions

* Fix version

* Add scripts in separate file

* Fix Makefile

* Cleanup Makefile

* Addressing review comments

* Generating sdk for MPI

* Make list metadata optional

* Adding open gen file

* Commit swagger change
2022-06-09 12:54:01 +00:00
Johnu GeorgeandGitHub f7140508cd Update k8s dependencies to v0.24.1 (#1604)
* Adding latest image tag

* Update manifests with latest image tag

* Update k8s dependencies to v0.24.1

* Update manifests

* Update k8s matrix for integration tests

* Update k8s matrix for unit tests

* Fix k8s versions

* Fix version

* Add scripts in separate file

* Fix Makefile

* Cleanup Makefile

* Addressing review comments
2022-06-06 01:25:28 +00:00
Alex LembiyeuskiandGitHub f7fad2b95b Release Python SDK 1.4.0 (#1541)
* Bump python package and api versions

* Prevent path extension fix from being overriden by code gen

* ./hack/python-sdk/gen-sdk.sh
2022-03-07 09:42:53 +00:00
Ce GaoandGitHub 8082044198 feat(pytorch): Support elastic training (#1453)
* chore: Update codegen and vendor

Signed-off-by: Ce Gao <[email protected]>

* fix: Update git config

Signed-off-by: Ce Gao <[email protected]>

* fix: Codegen

Signed-off-by: Ce Gao <[email protected]>

* feat: Add elastic examples

Signed-off-by: Ce Gao <[email protected]>

* chore: Update go mod

Signed-off-by: Ce Gao <[email protected]>

* chore: Update manifest

Signed-off-by: Ce Gao <[email protected]>

* feat: Implement elstic policy

Signed-off-by: Ce Gao <[email protected]>

* chore: Update vendor

Signed-off-by: Ce Gao <[email protected]>

* chore: Update swagger

Signed-off-by: Ce Gao <[email protected]>

* fix: Address comments

Signed-off-by: Ce Gao <[email protected]>
2021-11-26 06:35:12 +00:00
Andrey VelichkevichandGitHub a6aec1b7b9 Update links and files with the new URL (#1434)
* Update links and corresponding files for training-operator repository
Use Go 1.17

* Generate SDK

* Remove Travis

* Modify developer guide

* Fix go mod

* Fix legacy docs

* Generate SDK

* Remove travis

* Update ignore files
2021-10-09 13:50:44 -07:00
Alex LembiyeuskiandGitHub 542679ae5d Generate a single swagger.json file for all frameworks (#1437)
* Update tools for swagger generation

* Regenerate SDK

* Cleanup

* Use absolute path for swagger file

* Refactor imports
2021-10-08 19:45:43 -07:00
Alex LembiyeuskiandGitHub 3daf40fe6a Add Python SDK for Kubeflow Training Operator (#1420)
* Add Python SDK for Kubeflow Training Operator

* Update example notebooks

* Update SDK generation tooling and docs

* Re-generate SDK

* Allow to specify container name in 'get_logs' methods

* Generalize job labels

* Check if attribute exists

* Address code review comments
2021-10-03 15:46:49 -07:00
Jiaxin ShanandGitHub d7a46413f2 Update scripts to generate sdk for all frameworks (#1389)
* Slim OpenAPI definitions by removing unrelated api

openapi-gen input-dirs includes a few k8s.io/api and k8s.io/apimachinery packages which makes openapi_generated.go very large. Swagger files created by them are large as well.
This change help remove unnecessary references.

Signed-off-by: Jiaxin Shan <[email protected]>

* Update OpenAPI generation scripts

1. Update gen-sdk.sh and main.go to support all frameworks
2. Generate swagger.json for all frameworks

Signed-off-by: Jiaxin Shan <[email protected]>

* Merge swagger files into one

The swagger.json can not be merged smartly. I manually update info.description, info.title in hack/python-sdk/swagger.json

Signed-off-by: Jiaxin Shan <[email protected]>
2021-09-28 12:26:47 -07:00
Jin Chi HeandGitHub fd4b21799b Update swagger-codegen-cli URL (#1172) 2020-06-14 20:17:56 -07:00
Jin Chi HeandKubernetes Prow Robot f3110fd484 Enhance tfjobs sdk docs (#1114) 2019-12-10 00:29:29 -08:00
Jin Chi HeandKubernetes Prow Robot c69649a30b generate TFJob Python SDK (#1103) 2019-12-09 00:05:10 -08:00