Automated Machine Learning on Kubernetes
Go to file
Hezhi (Helen) Xie 73b8c5c029
[GSoC] Add e2e test for `tune` api with LLM hyperparameter optimization (#2420)
* add e2e test for tune api

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* upgrade training-operator sdk

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* specify the version of training operator sdk

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix num_labels error and update the version of training operator controller

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check the version of training operator

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* debug

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check import path of HuggingFaceModelParams

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* update the version of training operator sdk

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* update the name of experiment

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* add step of checking pod

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check the logs of pod

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* add check

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check reason for imagepullbackoff

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* revert timeout limit

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix format

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* extend timeout limit

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* update training operator sdk version

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check the logs of pod

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* rerun tests

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* update the function of getting logs

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* add the step of describing pod

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check disk space

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* change work directory

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* change work directory

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* increase timeout limit

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check the logs of controller and events

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* change work directory

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* change work directory

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* change work directory

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check the logs of kubelet

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check the logs of kubelet

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* increase cpu

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check the logs of training operator

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check the use of resources

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check the logs of container 'pytorch' and 'storage_initializer'

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix error of checking use of resources

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* add other checks to find the error reason

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* set 'storage_config'

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* reduce the number of tests

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* Check container runtime logs

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* set the driver of minikube as docker

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* set the driver of minikube to none

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check logs of pod

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* check memory usage

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* increase 'termination_grace_period_seconds' in podspec

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix annotations error

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* restart docker

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* delete restarting docker

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* use original docker data directory

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* update installation of Katib SDK with extra requires

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* test trainer image built with cpu

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* add action of free up disk space (including move docker data directory)

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* delete unnecessary checks and update the part of fetching pod description and logs

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* delete fetching pod logs

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* add blank line at the end of free-up-disk-space yaml file

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* update experiment name

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* update test function name to be consistent with experiment name

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* move import statements inside the function

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* apply pprint for the logging output

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* update experiment names

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix format

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix format

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix the sequence of arguments in 'trial_template'

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* test example in user guide

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix access token error

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix the error of setup

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix the error of setup

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* reverse back

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix format

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

* fix format

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>

---------

Signed-off-by: helenxie-bit <helenxiehz@gmail.com>
2025-06-26 14:13:16 +00:00
.github [GSoC] Add e2e test for `tune` api with LLM hyperparameter optimization (#2420) 2025-06-26 14:13:16 +00:00
cmd [CI] optimize katib ui dockerfile (#2505) 2025-02-01 20:42:33 +00:00
conformance Fix Istio sidecar injection by moving from annotations to labels (#2527) 2025-05-09 17:52:41 +00:00
docs Fix Istio sidecar injection by moving from annotations to labels (#2527) 2025-05-09 17:52:41 +00:00
examples/v1beta1 Fix Istio sidecar injection by moving from annotations to labels (#2527) 2025-05-09 17:52:41 +00:00
hack [SDK] Support PyTorchJob as a Trial Worker (#2512) 2025-02-13 11:10:36 +00:00
manifests/v1beta1 New fixing kustomize5 warning (#2549) 2025-05-13 04:31:20 +00:00
pkg Bump brace-expansion in /pkg/ui/v1beta1/frontend (#2551) 2025-06-12 04:40:51 +00:00
scripts/v1beta1 [feature] move manifest image references to ghcr (#2529) 2025-03-24 17:11:50 +00:00
sdk/python/v1beta1 [GSoC] Add e2e test for `tune` api with LLM hyperparameter optimization (#2420) 2025-06-26 14:13:16 +00:00
test [GSoC] Add e2e test for `tune` api with LLM hyperparameter optimization (#2420) 2025-06-26 14:13:16 +00:00
.dockerignore [UI] Remove Deprecated Katib UI (#2179) 2023-07-25 09:53:29 +00:00
.flake8 Enhance pre-commit hooks with flake8 and black (#2407) 2024-08-16 10:13:28 +00:00
.gcloudignore reduce build time (#84) 2018-05-15 06:24:27 -07:00
.gitignore [SDK] Support PyTorchJob as a Trial Worker (#2512) 2025-02-13 11:10:36 +00:00
.pre-commit-config.yaml Changes isort profile to black, to be fully compatible and adds 'pkg' dir for black and flake8 (#2413) 2024-08-22 15:33:57 +00:00
ADOPTERS.md Add PITS Global Data Recovery Services to the adopters list (#2160) 2023-05-26 15:44:21 +00:00
CHANGELOG.md chore(docs): Add Changelog Katib v0.18.0 (#2537) 2025-03-29 21:48:31 +00:00
CITATION.cff feat: add `CITATION.cff` file (#2547) 2025-04-18 16:47:24 +00:00
CONTRIBUTING.md chore: supporting the listen-address parameter on db-manager (#2465) 2025-01-22 00:03:41 +00:00
Dockerfile.conformance Fix conformance docker image (#2147) 2023-04-16 18:17:19 +00:00
LICENSE Initial commit 2018-04-03 10:07:13 -07:00
Makefile [feature] move manifest image references to ghcr (#2529) 2025-03-24 17:11:50 +00:00
OWNERS Promote @Electronic-Waste and @helenxie-bit as Katib reviewers (#2439) 2024-10-11 19:07:12 +00:00
PROJECT Upgrade the kubebuilder to v3.2.0 and Kubernetes Go libraries to v1.22.2 (#1861) 2022-05-22 18:33:00 +00:00
README.md fix: remove remaining MXNet dependency. (#2456) 2024-12-02 13:23:57 +00:00
ROADMAP.md Add Katib ROADMAP 2022/2023 (#2153) 2023-08-24 22:40:54 +00:00
go.mod Bump github.com/golang-jwt/jwt/v4 from 4.5.1 to 4.5.2 (#2533) 2025-04-15 12:36:24 +00:00
go.sum Bump github.com/golang-jwt/jwt/v4 from 4.5.1 to 4.5.2 (#2533) 2025-04-15 12:36:24 +00:00

README.md

logo

Build Status Coverage Status Go Report Card Releases Slack Status

Katib is a Kubernetes-native project for automated machine learning (AutoML). Katib supports Hyperparameter Tuning, Early Stopping and Neural Architecture Search.

Katib is the project which is agnostic to machine learning (ML) frameworks. It can tune hyperparameters of applications written in any language of the users choice and natively supports many ML frameworks, such as TensorFlow, PyTorch, XGBoost, and others.

Katib can perform training jobs using any Kubernetes Custom Resources with out of the box support for Kubeflow Training Operator, Argo Workflows, Tekton Pipelines and many more.

Katib stands for secretary in Arabic.

Search Algorithms

Katib supports several search algorithms. Follow the Kubeflow documentation to know more about each algorithm and check the this guide to implement your custom algorithm.

Hyperparameter Tuning Neural Architecture Search Early Stopping
Random Search ENAS Median Stop
Grid Search DARTS
Bayesian Optimization
TPE
Multivariate TPE
CMA-ES
Sobol's Quasirandom Sequence
HyperBand
Population Based Training

To perform the above algorithms Katib supports the following frameworks:

Prerequisites

Please check the official Kubeflow documentation for prerequisites to install Katib.

Installation

Please follow the Kubeflow Katib guide for the detailed instructions on how to install Katib.

Installing the Control Plane

Run the following command to install the latest stable release of Katib control plane:

kubectl apply -k "github.com/kubeflow/katib.git/manifests/v1beta1/installs/katib-standalone?ref=v0.17.0"

Run the following command to install the latest changes of Katib control plane:

kubectl apply -k "github.com/kubeflow/katib.git/manifests/v1beta1/installs/katib-standalone?ref=master"

For the Katib Experiments check the complete examples list.

Installing the Python SDK

Katib implements a Python SDK to simplify creation of hyperparameter tuning jobs for Data Scientists.

Run the following command to install the latest stable release of Katib SDK:

pip install -U kubeflow-katib

Getting Started

Please refer to the getting started guide to quickly create your first hyperparameter tuning Experiment using the Python SDK.

Community

The following links provide information on how to get involved in the community:

Contributing

Please refer to the CONTRIBUTING guide.

Citation

If you use Katib in a scientific publication, we would appreciate citations to the following paper:

A Scalable and Cloud-Native Hyperparameter Tuning System, George et al., arXiv:2006.02085, 2020.

Bibtex entry:

@misc{george2020katib,
    title={A Scalable and Cloud-Native Hyperparameter Tuning System},
    author={Johnu George and Ce Gao and Richard Liu and Hou Gang Liu and Yuan Tang and Ramdoot Pydipaty and Amit Kumar Saha},
    year={2020},
    eprint={2006.02085},
    archivePrefix={arXiv},
    primaryClass={cs.DC}
}