tune api with LLM hyperparameter optimization (#2420)
* add e2e test for tune api Signed-off-by: helenxie-bit <[email protected]> * upgrade training-operator sdk Signed-off-by: helenxie-bit <[email protected]> * specify the version of training operator sdk Signed-off-by: helenxie-bit <[email protected]> * fix num_labels error and update the version of training operator controller Signed-off-by: helenxie-bit <[email protected]> * check the version of training operator Signed-off-by: helenxie-bit <[email protected]> * debug Signed-off-by: helenxie-bit <[email protected]> * check import path of HuggingFaceModelParams Signed-off-by: helenxie-bit <[email protected]> * update the version of training operator sdk Signed-off-by: helenxie-bit <[email protected]> * update the name of experiment Signed-off-by: helenxie-bit <[email protected]> * add step of checking pod Signed-off-by: helenxie-bit <[email protected]> * check the logs of pod Signed-off-by: helenxie-bit <[email protected]> * add check Signed-off-by: helenxie-bit <[email protected]> * check reason for imagepullbackoff Signed-off-by: helenxie-bit <[email protected]> * revert timeout limit Signed-off-by: helenxie-bit <[email protected]> * fix format Signed-off-by: helenxie-bit <[email protected]> * extend timeout limit Signed-off-by: helenxie-bit <[email protected]> * update training operator sdk version Signed-off-by: helenxie-bit <[email protected]> * check the logs of pod Signed-off-by: helenxie-bit <[email protected]> * rerun tests Signed-off-by: helenxie-bit <[email protected]> * update the function of getting logs Signed-off-by: helenxie-bit <[email protected]> * add the step of describing pod Signed-off-by: helenxie-bit <[email protected]> * check disk space Signed-off-by: helenxie-bit <[email protected]> * change work directory Signed-off-by: helenxie-bit <[email protected]> * change work directory Signed-off-by: helenxie-bit <[email protected]> * increase timeout limit Signed-off-by: helenxie-bit <[email protected]> * check the logs of controller and events Signed-off-by: helenxie-bit <[email protected]> * change work directory Signed-off-by: helenxie-bit <[email protected]> * change work directory Signed-off-by: helenxie-bit <[email protected]> * change work directory Signed-off-by: helenxie-bit <[email protected]> * check the logs of kubelet Signed-off-by: helenxie-bit <[email protected]> * check the logs of kubelet Signed-off-by: helenxie-bit <[email protected]> * increase cpu Signed-off-by: helenxie-bit <[email protected]> * check the logs of training operator Signed-off-by: helenxie-bit <[email protected]> * check the use of resources Signed-off-by: helenxie-bit <[email protected]> * check the logs of container 'pytorch' and 'storage_initializer' Signed-off-by: helenxie-bit <[email protected]> * fix error of checking use of resources Signed-off-by: helenxie-bit <[email protected]> * add other checks to find the error reason Signed-off-by: helenxie-bit <[email protected]> * set 'storage_config' Signed-off-by: helenxie-bit <[email protected]> * reduce the number of tests Signed-off-by: helenxie-bit <[email protected]> * Check container runtime logs Signed-off-by: helenxie-bit <[email protected]> * set the driver of minikube as docker Signed-off-by: helenxie-bit <[email protected]> * set the driver of minikube to none Signed-off-by: helenxie-bit <[email protected]> * check logs of pod Signed-off-by: helenxie-bit <[email protected]> * check memory usage Signed-off-by: helenxie-bit <[email protected]> * increase 'termination_grace_period_seconds' in podspec Signed-off-by: helenxie-bit <[email protected]> * fix annotations error Signed-off-by: helenxie-bit <[email protected]> * restart docker Signed-off-by: helenxie-bit <[email protected]> * delete restarting docker Signed-off-by: helenxie-bit <[email protected]> * use original docker data directory Signed-off-by: helenxie-bit <[email protected]> * update installation of Katib SDK with extra requires Signed-off-by: helenxie-bit <[email protected]> * test trainer image built with cpu Signed-off-by: helenxie-bit <[email protected]> * add action of free up disk space (including move docker data directory) Signed-off-by: helenxie-bit <[email protected]> * delete unnecessary checks and update the part of fetching pod description and logs Signed-off-by: helenxie-bit <[email protected]> * delete fetching pod logs Signed-off-by: helenxie-bit <[email protected]> * add blank line at the end of free-up-disk-space yaml file Signed-off-by: helenxie-bit <[email protected]> * update experiment name Signed-off-by: helenxie-bit <[email protected]> * update test function name to be consistent with experiment name Signed-off-by: helenxie-bit <[email protected]> * move import statements inside the function Signed-off-by: helenxie-bit <[email protected]> * apply pprint for the logging output Signed-off-by: helenxie-bit <[email protected]> * update experiment names Signed-off-by: helenxie-bit <[email protected]> * fix format Signed-off-by: helenxie-bit <[email protected]> * fix format Signed-off-by: helenxie-bit <[email protected]> * fix the sequence of arguments in 'trial_template' Signed-off-by: helenxie-bit <[email protected]> * test example in user guide Signed-off-by: helenxie-bit <[email protected]> * fix access token error Signed-off-by: helenxie-bit <[email protected]> * fix the error of setup Signed-off-by: helenxie-bit <[email protected]> * fix the error of setup Signed-off-by: helenxie-bit <[email protected]> * reverse back Signed-off-by: helenxie-bit <[email protected]> * fix format Signed-off-by: helenxie-bit <[email protected]> * fix format Signed-off-by: helenxie-bit <[email protected]> --------- Signed-off-by: helenxie-bit <[email protected]>
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:
- Attend the bi-weekly AutoML and Training Working Group community meeting.
- Join our
#kubeflow-katibSlack channel. - Check out who is using Katib and presentations about Katib project.
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}
}
