An example for using Comet Optimizer on a local Kubernetes instance.
For information about the Comet Optimizer see Docs.
Install Docker Desktop, information can be found on the Docker Website.
Install minikube
brew install minikubeSet your API key, Workspace, and Project Name in job-initialize-comet-optimizer.yaml and job-optimizer.yaml. You can do this by replacing the environment variables placeholders with your values, or by running the following commands in your terminal.
COMET_API_KEY="<YOUR API KEY>" COMET_WORKSPACE="<YOUR WORKSPACE NAME>" COMET_PROJECT_NAME="<YOUR PROJECT NAME>" sed -i '' -e "s/REPLACE_WITH_YOUR_API_KEY/$COMET_API_KEY/g" job-initialize-comet-optimizer.yaml && sed -i '' -e "s/REPLACE_WITH_YOUR_API_KEY/$COMET_API_KEY/g" job-optimizer.yaml sed -i '' -e "s/REPLACE_WITH_YOUR_WORKSPACE/$COMET_WORKSPACE/g" job-initialize-comet-optimizer.yaml && sed -i '' -e "s/REPLACE_WITH_YOUR_WORKSPACE/$COMET_WORKSPACE/g" job-optimizer.yaml sed -i '' -e "s/REPLACE_WITH_YOUR_PROJECT_NAME/$COMET_PROJECT_NAME/g" job-initialize-comet-optimizer.yaml && sed -i '' -e "s/REPLACE_WITH_YOUR_PROJECT_NAME/$COMET_PROJECT_NAME/g" job-optimizer.yamlStart minikube
minikube startEnable the local use of docker in minikube
eval $(minikube docker-env).Build the docker image
docker build ./ -t comet-optimizerOpen a dashboard in your web browser to view job status and logs
minikube dashboardRun shell script to:
- Intialize Comet Optimizer
- Run Optimization sweeps
sh run.sh- Add your model training functions in run_optimizer.py.
- Change the number of experiments running in parallel by updating "parallelism" value in job-optimizer.yaml (line 6)