├── .dockerignore ├── .flake8 ├── .gcloudignore ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ ├── config.yml │ └── feature_request.yaml ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── build-and-publish-images.yaml │ ├── e2e-test-darts-cifar10.yaml │ ├── e2e-test-enas-cifar10.yaml │ ├── e2e-test-pytorch-mnist.yaml │ ├── e2e-test-simple-pbt.yaml │ ├── e2e-test-tf-mnist-with-summaries.yaml │ ├── e2e-test-tune-api.yaml │ ├── e2e-test-ui-random-search-postgres.yaml │ ├── publish-algorithm-images.yaml │ ├── publish-conformance-images.yaml │ ├── publish-core-images.yaml │ ├── publish-trial-images.yaml │ ├── stale.yaml │ ├── template-e2e-test │ └── action.yaml │ ├── template-publish-image │ └── action.yaml │ ├── template-setup-e2e-test │ └── action.yaml │ ├── test-go.yaml │ ├── test-lint.yaml │ ├── test-node.yaml │ └── test-python.yaml ├── .gitignore ├── .pre-commit-config.yaml ├── ADOPTERS.md ├── CHANGELOG.md ├── CITATION.cff ├── CONTRIBUTING.md ├── Dockerfile.conformance ├── LICENSE ├── Makefile ├── OWNERS ├── PROJECT ├── README.md ├── ROADMAP.md ├── cmd ├── db-manager │ └── v1beta1 │ │ ├── Dockerfile │ │ ├── main.go │ │ └── main_test.go ├── earlystopping │ └── medianstop │ │ └── v1beta1 │ │ ├── Dockerfile │ │ ├── main.py │ │ └── requirements.txt ├── katib-controller │ └── v1beta1 │ │ ├── Dockerfile │ │ └── main.go ├── metricscollector │ └── v1beta1 │ │ ├── file-metricscollector │ │ ├── Dockerfile │ │ └── main.go │ │ └── tfevent-metricscollector │ │ ├── Dockerfile │ │ ├── Dockerfile.ppc64le │ │ ├── main.py │ │ └── requirements.txt ├── suggestion │ ├── goptuna │ │ └── v1beta1 │ │ │ ├── Dockerfile │ │ │ └── main.go │ ├── hyperband │ │ └── v1beta1 │ │ │ ├── Dockerfile │ │ │ ├── main.py │ │ │ └── requirements.txt │ ├── hyperopt │ │ └── v1beta1 │ │ │ ├── Dockerfile │ │ │ ├── main.py │ │ │ └── requirements.txt │ ├── nas │ │ ├── darts │ │ │ └── v1beta1 │ │ │ │ ├── Dockerfile │ │ │ │ ├── main.py │ │ │ │ └── requirements.txt │ │ └── enas │ │ │ └── v1beta1 │ │ │ ├── Dockerfile │ │ │ ├── main.py │ │ │ └── requirements.txt │ ├── optuna │ │ └── v1beta1 │ │ │ ├── Dockerfile │ │ │ ├── main.py │ │ │ └── requirements.txt │ ├── pbt │ │ └── v1beta1 │ │ │ ├── Dockerfile │ │ │ ├── main.py │ │ │ └── requirements.txt │ └── skopt │ │ └── v1beta1 │ │ ├── Dockerfile │ │ ├── main.py │ │ └── requirements.txt └── ui │ └── v1beta1 │ ├── Dockerfile │ └── main.go ├── conformance └── run.sh ├── docs ├── README.md ├── images-location.md ├── images │ ├── logo-title.png │ ├── logo-title.svg │ ├── logo.png │ └── logo.svg ├── presentations.md ├── proposals │ ├── 1214-custom-crd-in-trial │ │ └── README.md │ ├── 2044-conformance-program │ │ ├── README.md │ │ └── conformance-crd-test.png │ ├── 2339-hpo-for-llm-fine-tuning │ │ ├── README.md │ │ └── hp-optimization-api-design.jpg │ ├── 2340-push-based-metrics-collector │ │ ├── README.md │ │ └── push-based-metrics-collection.png │ ├── 2374-parameter-distribution │ │ └── README.md │ ├── 507-suggestion-crd │ │ └── README.md │ ├── 685-metrics-collector │ │ ├── README.md │ │ └── metrics-collector-design.png │ └── README.md └── release │ ├── README.md │ └── changelog.py ├── examples └── v1beta1 │ ├── README.md │ ├── argo │ ├── README.md │ └── argo-workflow.yaml │ ├── early-stopping │ ├── median-stop-with-json-format.yaml │ └── median-stop.yaml │ ├── fpga │ ├── OWNERS │ ├── README.md │ └── xgboost-example.yaml │ ├── hp-tuning │ ├── bayesian-optimization.yaml │ ├── cma-es.yaml │ ├── grid.yaml │ ├── hyperband.yaml │ ├── hyperopt-distribution.yaml │ ├── multivariate-tpe.yaml │ ├── optuna-distribution.yaml │ ├── random.yaml │ ├── simple-pbt.yaml │ ├── sobol.yaml │ └── tpe.yaml │ ├── kind-cluster │ ├── README.md │ └── deploy.sh │ ├── kubeflow-pipelines │ ├── README.md │ ├── early-stopping.ipynb │ ├── images │ │ └── 9.bmp │ ├── kubeflow-e2e-mnist.ipynb │ └── mpi-job-horovod.py │ ├── kubeflow-training-operator │ ├── mpijob-horovod.yaml │ ├── pytorchjob-mnist.yaml │ ├── tfjob-mnist-with-summaries.yaml │ └── xgboostjob-lightgbm.yaml │ ├── metrics-collector │ ├── custom-metrics-collector.yaml │ ├── file-metrics-collector-with-json-format.yaml │ ├── file-metrics-collector.yaml │ └── metrics-collection-strategy.yaml │ ├── nas │ ├── darts-cpu.yaml │ ├── darts-gpu.yaml │ ├── enas-cpu.yaml │ └── enas-gpu.yaml │ ├── resume-experiment │ ├── from-volume-resume.yaml │ └── long-running-resume.yaml │ ├── sdk │ ├── README.md │ ├── cmaes-and-resume-policies.ipynb │ ├── mnist-with-push-metrics-collection.ipynb │ ├── nas-with-darts.ipynb │ └── tune-train-from-func.ipynb │ ├── tekton │ ├── README.md │ └── pipeline-run.yaml │ ├── trial-images │ ├── darts-cnn-cifar10 │ │ ├── Dockerfile.cpu │ │ ├── Dockerfile.gpu │ │ ├── README.md │ │ ├── architect.py │ │ ├── model.py │ │ ├── operations.py │ │ ├── run_trial.py │ │ ├── search_space.py │ │ └── utils.py │ ├── enas-cnn-cifar10 │ │ ├── Dockerfile.cpu │ │ ├── Dockerfile.gpu │ │ ├── ModelConstructor.py │ │ ├── README.md │ │ ├── RunTrial.py │ │ ├── op_library.py │ │ └── requirements.txt │ ├── pytorch-mnist │ │ ├── Dockerfile.cpu │ │ ├── Dockerfile.gpu │ │ ├── README.md │ │ ├── mnist.py │ │ └── requirements.txt │ ├── simple-pbt │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── pbt_test.py │ │ └── requirements.txt │ └── tf-mnist-with-summaries │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── mnist.py │ │ └── requirements.txt │ └── trial-template │ ├── trial-configmap-source.yaml │ └── trial-metadata-substitution.yaml ├── go.mod ├── go.sum ├── hack ├── boilerplate │ ├── boilerplate.go.txt │ ├── boilerplate.py.txt │ ├── boilerplate.sh.txt │ └── update-boilerplate.sh ├── gen-python-sdk │ ├── gen-sdk.sh │ ├── post_gen.py │ └── swagger_config.json ├── install-shellcheck.sh ├── swagger │ └── main.go ├── tools.go ├── update-codegen.sh ├── update-gofmt.sh ├── update-mockgen.sh ├── update-openapigen.sh ├── update-proto.sh ├── verify-generated-codes.sh ├── verify-gofmt.sh ├── verify-golangci-lint.sh ├── verify-shellcheck.sh ├── verify-yamllint.sh └── violation_exception_v1beta1.list ├── manifests └── v1beta1 │ ├── components │ ├── controller │ │ ├── controller.yaml │ │ ├── kustomization.yaml │ │ ├── rbac.yaml │ │ ├── service.yaml │ │ └── trial-templates.yaml │ ├── crd │ │ ├── experiment.yaml │ │ ├── kustomization.yaml │ │ ├── suggestion.yaml │ │ └── trial.yaml │ ├── db-manager │ │ ├── db-manager.yaml │ │ ├── kustomization.yaml │ │ └── service.yaml │ ├── mysql │ │ ├── kustomization.yaml │ │ ├── mysql.yaml │ │ ├── pvc.yaml │ │ ├── secret.yaml │ │ └── service.yaml │ ├── namespace │ │ ├── kustomization.yaml │ │ └── namespace.yaml │ ├── postgres │ │ ├── kustomization.yaml │ │ ├── postgres.yaml │ │ ├── pvc.yaml │ │ ├── secret.yaml │ │ └── service.yaml │ ├── ui │ │ ├── kustomization.yaml │ │ ├── rbac.yaml │ │ ├── service.yaml │ │ └── ui.yaml │ └── webhook │ │ ├── kustomization.yaml │ │ └── webhooks.yaml │ └── installs │ ├── katib-cert-manager │ ├── certificate.yaml │ ├── katib-config.yaml │ ├── kustomization.yaml │ ├── params.yaml │ └── patches │ │ └── katib-cert-injection.yaml │ ├── katib-external-db │ ├── katib-config.yaml │ ├── kustomization.yaml │ ├── patches │ │ └── db-manager.yaml │ └── secrets.env │ ├── katib-leader-election │ ├── katib-config.yaml │ ├── kustomization.yaml │ └── leader-election-rbac.yaml │ ├── katib-openshift │ ├── katib-config.yaml │ ├── kustomization.yaml │ └── patches │ │ ├── service-serving-cert.yaml │ │ └── webhook-inject-cabundle.yaml │ ├── katib-standalone-postgres │ ├── katib-config.yaml │ ├── kustomization.yaml │ └── patches │ │ └── db-manager.yaml │ ├── katib-standalone │ ├── katib-config.yaml │ └── kustomization.yaml │ └── katib-with-kubeflow │ ├── istio-authorizationpolicy.yaml │ ├── kubeflow-katib-roles.yaml │ ├── kustomization.yaml │ ├── params.yaml │ ├── patches │ ├── enable-ui-authz-checks.yaml │ ├── istio-sidecar-injection.yaml │ ├── remove-namespace.yaml │ └── ui-rbac.yaml │ └── ui-virtual-service.yaml ├── pkg ├── apis │ ├── apis.go │ ├── config │ │ └── v1beta1 │ │ │ ├── defaults.go │ │ │ ├── defaults_test.go │ │ │ ├── groupversion_info.go │ │ │ ├── types.go │ │ │ └── zz_generated.deepcopy.go │ ├── controller │ │ ├── addtoscheme_katib_v1beta1.go │ │ ├── apis.go │ │ ├── common │ │ │ ├── group.go │ │ │ └── v1beta1 │ │ │ │ ├── common_types.go │ │ │ │ ├── doc.go │ │ │ │ ├── register.go │ │ │ │ └── zz_generated.deepcopy.go │ │ ├── experiments │ │ │ ├── group.go │ │ │ └── v1beta1 │ │ │ │ ├── constants.go │ │ │ │ ├── doc.go │ │ │ │ ├── experiment_defaults.go │ │ │ │ ├── experiment_types.go │ │ │ │ ├── register.go │ │ │ │ ├── util.go │ │ │ │ └── zz_generated.deepcopy.go │ │ ├── suggestions │ │ │ ├── group.go │ │ │ └── v1beta1 │ │ │ │ ├── doc.go │ │ │ │ ├── register.go │ │ │ │ ├── suggestion_types.go │ │ │ │ ├── util.go │ │ │ │ └── zz_generated.deepcopy.go │ │ └── trials │ │ │ ├── group.go │ │ │ └── v1beta1 │ │ │ ├── doc.go │ │ │ ├── register.go │ │ │ ├── trial_types.go │ │ │ ├── util.go │ │ │ └── zz_generated.deepcopy.go │ ├── manager │ │ ├── README.md │ │ ├── health │ │ │ ├── buf.gen.yaml │ │ │ ├── health.pb.go │ │ │ ├── health.proto │ │ │ ├── health_grpc.pb.go │ │ │ └── python │ │ │ │ ├── health_pb2.py │ │ │ │ ├── health_pb2.pyi │ │ │ │ └── health_pb2_grpc.py │ │ └── v1beta1 │ │ │ ├── api.pb.go │ │ │ ├── api.proto │ │ │ ├── api_grpc.pb.go │ │ │ ├── buf.gen.yaml │ │ │ ├── gen-doc │ │ │ ├── Dockerfile │ │ │ ├── api.md │ │ │ └── index.html │ │ │ └── python │ │ │ ├── api_pb2.py │ │ │ ├── api_pb2.pyi │ │ │ └── api_pb2_grpc.py │ └── v1beta1 │ │ ├── swagger.json │ │ └── zz_generated.openapi.go ├── certgenerator │ └── v1beta1 │ │ └── generator.go ├── client │ └── controller │ │ ├── applyconfiguration │ │ ├── experiments │ │ │ └── v1beta1 │ │ │ │ ├── configmapsource.go │ │ │ │ ├── experiment.go │ │ │ │ ├── experimentcondition.go │ │ │ │ ├── experimentspec.go │ │ │ │ ├── experimentstatus.go │ │ │ │ ├── feasiblespace.go │ │ │ │ ├── graphconfig.go │ │ │ │ ├── nasconfig.go │ │ │ │ ├── operation.go │ │ │ │ ├── optimaltrial.go │ │ │ │ ├── parameterspec.go │ │ │ │ ├── trialparameterspec.go │ │ │ │ ├── trialsource.go │ │ │ │ └── trialtemplate.go │ │ ├── internal │ │ │ └── internal.go │ │ ├── suggestions │ │ │ └── v1beta1 │ │ │ │ ├── suggestion.go │ │ │ │ ├── suggestioncondition.go │ │ │ │ ├── suggestionspec.go │ │ │ │ ├── suggestionstatus.go │ │ │ │ └── trialassignment.go │ │ ├── trials │ │ │ └── v1beta1 │ │ │ │ ├── trial.go │ │ │ │ ├── trialcondition.go │ │ │ │ ├── trialspec.go │ │ │ │ └── trialstatus.go │ │ └── utils.go │ │ ├── clientset │ │ └── versioned │ │ │ ├── clientset.go │ │ │ ├── fake │ │ │ ├── clientset_generated.go │ │ │ ├── doc.go │ │ │ └── register.go │ │ │ ├── scheme │ │ │ ├── doc.go │ │ │ └── register.go │ │ │ └── typed │ │ │ ├── experiments │ │ │ └── v1beta1 │ │ │ │ ├── doc.go │ │ │ │ ├── experiment.go │ │ │ │ ├── experiments_client.go │ │ │ │ ├── fake │ │ │ │ ├── doc.go │ │ │ │ ├── fake_experiment.go │ │ │ │ └── fake_experiments_client.go │ │ │ │ └── generated_expansion.go │ │ │ ├── suggestions │ │ │ └── v1beta1 │ │ │ │ ├── doc.go │ │ │ │ ├── fake │ │ │ │ ├── doc.go │ │ │ │ ├── fake_suggestion.go │ │ │ │ └── fake_suggestions_client.go │ │ │ │ ├── generated_expansion.go │ │ │ │ ├── suggestion.go │ │ │ │ └── suggestions_client.go │ │ │ └── trials │ │ │ └── v1beta1 │ │ │ ├── doc.go │ │ │ ├── fake │ │ │ ├── doc.go │ │ │ ├── fake_trial.go │ │ │ └── fake_trials_client.go │ │ │ ├── generated_expansion.go │ │ │ ├── trial.go │ │ │ └── trials_client.go │ │ ├── informers │ │ └── externalversions │ │ │ ├── experiments │ │ │ ├── interface.go │ │ │ └── v1beta1 │ │ │ │ ├── experiment.go │ │ │ │ └── interface.go │ │ │ ├── factory.go │ │ │ ├── generic.go │ │ │ ├── internalinterfaces │ │ │ └── factory_interfaces.go │ │ │ ├── suggestions │ │ │ ├── interface.go │ │ │ └── v1beta1 │ │ │ │ ├── interface.go │ │ │ │ └── suggestion.go │ │ │ └── trials │ │ │ ├── interface.go │ │ │ └── v1beta1 │ │ │ ├── interface.go │ │ │ └── trial.go │ │ └── listers │ │ ├── experiments │ │ └── v1beta1 │ │ │ ├── expansion_generated.go │ │ │ └── experiment.go │ │ ├── suggestions │ │ └── v1beta1 │ │ │ ├── expansion_generated.go │ │ │ └── suggestion.go │ │ └── trials │ │ └── v1beta1 │ │ ├── expansion_generated.go │ │ └── trial.go ├── common │ └── v1beta1 │ │ └── katib_manager_util.go ├── controller.v1beta1 │ ├── add_experiment.go │ ├── add_suggestion.go │ ├── add_trial.go │ ├── consts │ │ └── const.go │ ├── controller.go │ ├── experiment │ │ ├── experiment_controller.go │ │ ├── experiment_controller_status.go │ │ ├── experiment_controller_suite_test.go │ │ ├── experiment_controller_test.go │ │ ├── experiment_controller_util.go │ │ ├── manifest │ │ │ ├── generator.go │ │ │ └── generator_test.go │ │ ├── suggestion │ │ │ └── suggestion.go │ │ └── util │ │ │ ├── prometheus_metrics.go │ │ │ └── status_util.go │ ├── suggestion │ │ ├── composer │ │ │ ├── composer.go │ │ │ └── composer_test.go │ │ ├── suggestion_controller.go │ │ ├── suggestion_controller_status.go │ │ ├── suggestion_controller_suite_test.go │ │ ├── suggestion_controller_test.go │ │ ├── suggestion_controller_util.go │ │ └── suggestionclient │ │ │ ├── algorithm_settings.go │ │ │ ├── nas.go │ │ │ ├── suggestionclient.go │ │ │ └── suggestionclient_test.go │ ├── trial │ │ ├── managerclient │ │ │ └── managerclient.go │ │ ├── trial_controller.go │ │ ├── trial_controller_status.go │ │ ├── trial_controller_suite_test.go │ │ ├── trial_controller_test.go │ │ ├── trial_controller_util.go │ │ └── util │ │ │ ├── job_util.go │ │ │ ├── job_util_test.go │ │ │ └── prometheus_metrics.go │ └── util │ │ ├── labels.go │ │ ├── suggestion.go │ │ └── unstructured.go ├── db │ └── v1beta1 │ │ ├── common │ │ ├── connection.go │ │ ├── const.go │ │ └── kdb.go │ │ ├── db.go │ │ ├── mysql │ │ ├── init.go │ │ ├── mysql.go │ │ └── mysql_test.go │ │ └── postgres │ │ ├── init.go │ │ ├── postgres.go │ │ └── postgres_test.go ├── earlystopping │ └── v1beta1 │ │ └── medianstop │ │ ├── __init__.py │ │ └── service.py ├── metricscollector │ └── v1beta1 │ │ ├── common │ │ ├── __init__.py │ │ ├── const.go │ │ ├── const.py │ │ ├── pns.go │ │ └── pns.py │ │ ├── file-metricscollector │ │ ├── file-metricscollector.go │ │ └── file-metricscollector_test.go │ │ └── tfevent-metricscollector │ │ ├── __init__.py │ │ └── tfevent_loader.py ├── mock │ └── v1beta1 │ │ ├── api │ │ ├── earlystopping.go │ │ └── suggestion.go │ │ ├── db │ │ └── db.go │ │ ├── experiment │ │ ├── manifest │ │ │ └── generator.go │ │ └── suggestion │ │ │ └── suggestion.go │ │ ├── suggestion │ │ └── suggestionclient │ │ │ └── suggestionclient.go │ │ ├── trial │ │ └── managerclient │ │ │ └── katibmanager.go │ │ └── util │ │ └── katibclient │ │ └── katibclient.go ├── suggestion │ └── v1beta1 │ │ ├── goptuna │ │ ├── converter.go │ │ ├── converter_test.go │ │ ├── sample.go │ │ ├── service.go │ │ └── service_test.go │ │ ├── hyperband │ │ ├── __init__.py │ │ ├── parameter.py │ │ ├── parsing_util.py │ │ └── service.py │ │ ├── hyperopt │ │ ├── __init__.py │ │ ├── base_service.py │ │ └── service.py │ │ ├── internal │ │ ├── __init__.py │ │ ├── base_health_service.py │ │ ├── constant.py │ │ ├── search_space.py │ │ └── trial.py │ │ ├── nas │ │ ├── common │ │ │ └── validation.py │ │ ├── darts │ │ │ ├── README.md │ │ │ ├── __init__.py │ │ │ └── service.py │ │ └── enas │ │ │ ├── AlgorithmSettings.py │ │ │ ├── Controller.py │ │ │ ├── Operation.py │ │ │ ├── README.md │ │ │ ├── __init__.py │ │ │ ├── example.png │ │ │ └── service.py │ │ ├── optuna │ │ ├── base_service.py │ │ └── service.py │ │ ├── pbt │ │ ├── __init__.py │ │ └── service.py │ │ └── skopt │ │ ├── __init__.py │ │ ├── base_service.py │ │ └── service.py ├── ui │ └── v1beta1 │ │ ├── OWNERS │ │ ├── README.md │ │ ├── authzn.go │ │ ├── backend.go │ │ ├── frontend │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .gitignore │ │ ├── .prettierrc.yaml │ │ ├── COMMIT │ │ ├── README.md │ │ ├── angular.json │ │ ├── cypress.config.ts │ │ ├── cypress │ │ │ ├── e2e │ │ │ │ ├── form-page.cy.ts │ │ │ │ └── index-page.cy.ts │ │ │ ├── fixtures │ │ │ │ ├── experiments.json │ │ │ │ ├── namespaces.json │ │ │ │ ├── settings.json │ │ │ │ └── trial-template.json │ │ │ └── support │ │ │ │ ├── commands.ts │ │ │ │ └── e2e.ts │ │ ├── karma.conf.js │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── proxy.conf.json │ │ ├── scripts │ │ │ └── check-format-error.js │ │ ├── src │ │ │ ├── app │ │ │ │ ├── app-routing.module.ts │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.spec.ts │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── constants │ │ │ │ │ ├── algorithms-settings.const.ts │ │ │ │ │ ├── algorithms-types.const.ts │ │ │ │ │ └── objective-types.const.ts │ │ │ │ ├── enumerations │ │ │ │ │ ├── algorithms.enum.ts │ │ │ │ │ ├── metrics-collector.ts │ │ │ │ │ ├── objective-type.enum.ts │ │ │ │ │ └── status.enum.ts │ │ │ │ ├── models │ │ │ │ │ ├── experiment.k8s.model.ts │ │ │ │ │ ├── experiment.model.ts │ │ │ │ │ ├── trial-templates.model.ts │ │ │ │ │ └── trial.k8s.model.ts │ │ │ │ ├── pages │ │ │ │ │ ├── experiment-creation │ │ │ │ │ │ ├── algorithm │ │ │ │ │ │ │ ├── algorithm.component.html │ │ │ │ │ │ │ ├── algorithm.component.scss │ │ │ │ │ │ │ ├── algorithm.component.spec.ts │ │ │ │ │ │ │ ├── algorithm.component.ts │ │ │ │ │ │ │ ├── algorithm.module.ts │ │ │ │ │ │ │ └── setting │ │ │ │ │ │ │ │ ├── setting.component.html │ │ │ │ │ │ │ │ ├── setting.component.scss │ │ │ │ │ │ │ │ ├── setting.component.spec.ts │ │ │ │ │ │ │ │ └── setting.component.ts │ │ │ │ │ │ ├── early-stopping │ │ │ │ │ │ │ ├── early-stopping.component.html │ │ │ │ │ │ │ ├── early-stopping.component.scss │ │ │ │ │ │ │ ├── early-stopping.component.spec.ts │ │ │ │ │ │ │ ├── early-stopping.component.ts │ │ │ │ │ │ │ └── early-stopping.module.ts │ │ │ │ │ │ ├── experiment-creation.component.html │ │ │ │ │ │ ├── experiment-creation.component.scss │ │ │ │ │ │ ├── experiment-creation.component.spec.ts │ │ │ │ │ │ ├── experiment-creation.component.ts │ │ │ │ │ │ ├── experiment-creation.module.ts │ │ │ │ │ │ ├── hyper-parameters │ │ │ │ │ │ │ ├── hyper-parameters.component.html │ │ │ │ │ │ │ ├── hyper-parameters.component.scss │ │ │ │ │ │ │ ├── hyper-parameters.component.spec.ts │ │ │ │ │ │ │ ├── hyper-parameters.component.ts │ │ │ │ │ │ │ └── hyper-parameters.module.ts │ │ │ │ │ │ ├── metadata │ │ │ │ │ │ │ ├── metadata.component.html │ │ │ │ │ │ │ ├── metadata.component.scss │ │ │ │ │ │ │ ├── metadata.component.spec.ts │ │ │ │ │ │ │ ├── metadata.component.ts │ │ │ │ │ │ │ └── metadata.module.ts │ │ │ │ │ │ ├── metrics-collector │ │ │ │ │ │ │ ├── metrics-collector.component.html │ │ │ │ │ │ │ ├── metrics-collector.component.scss │ │ │ │ │ │ │ ├── metrics-collector.component.spec.ts │ │ │ │ │ │ │ ├── metrics-collector.component.ts │ │ │ │ │ │ │ └── metrics-collector.module.ts │ │ │ │ │ │ ├── nas-graph │ │ │ │ │ │ │ ├── nas-graph.component.html │ │ │ │ │ │ │ ├── nas-graph.component.scss │ │ │ │ │ │ │ ├── nas-graph.component.spec.ts │ │ │ │ │ │ │ ├── nas-graph.component.ts │ │ │ │ │ │ │ └── nas-graph.module.ts │ │ │ │ │ │ ├── nas-operations │ │ │ │ │ │ │ ├── nas-operations.component.html │ │ │ │ │ │ │ ├── nas-operations.component.scss │ │ │ │ │ │ │ ├── nas-operations.component.spec.ts │ │ │ │ │ │ │ ├── nas-operations.component.ts │ │ │ │ │ │ │ ├── nas-operations.module.ts │ │ │ │ │ │ │ └── operation │ │ │ │ │ │ │ │ ├── operation.component.html │ │ │ │ │ │ │ │ ├── operation.component.scss │ │ │ │ │ │ │ │ ├── operation.component.spec.ts │ │ │ │ │ │ │ │ └── operation.component.ts │ │ │ │ │ │ ├── objective │ │ │ │ │ │ │ ├── objective.component.html │ │ │ │ │ │ │ ├── objective.component.scss │ │ │ │ │ │ │ ├── objective.component.spec.ts │ │ │ │ │ │ │ ├── objective.component.ts │ │ │ │ │ │ │ └── objective.module.ts │ │ │ │ │ │ ├── trial-template │ │ │ │ │ │ │ ├── trial-parameter │ │ │ │ │ │ │ │ ├── trial-parameter.component.html │ │ │ │ │ │ │ │ ├── trial-parameter.component.scss │ │ │ │ │ │ │ │ ├── trial-parameter.component.spec.ts │ │ │ │ │ │ │ │ └── trial-parameter.component.ts │ │ │ │ │ │ │ ├── trial-template.component.html │ │ │ │ │ │ │ ├── trial-template.component.scss │ │ │ │ │ │ │ ├── trial-template.component.spec.ts │ │ │ │ │ │ │ ├── trial-template.component.ts │ │ │ │ │ │ │ └── trial-template.module.ts │ │ │ │ │ │ ├── trial-thresholds │ │ │ │ │ │ │ ├── trial-thresholds.component.html │ │ │ │ │ │ │ ├── trial-thresholds.component.scss │ │ │ │ │ │ │ ├── trial-thresholds.component.spec.ts │ │ │ │ │ │ │ ├── trial-thresholds.component.ts │ │ │ │ │ │ │ └── trial-thresholds.module.ts │ │ │ │ │ │ └── yaml-modal │ │ │ │ │ │ │ ├── yaml-modal.component.html │ │ │ │ │ │ │ ├── yaml-modal.component.scss │ │ │ │ │ │ │ ├── yaml-modal.component.spec.ts │ │ │ │ │ │ │ ├── yaml-modal.component.ts │ │ │ │ │ │ │ └── yaml-modal.module.ts │ │ │ │ │ ├── experiment-details │ │ │ │ │ │ ├── details │ │ │ │ │ │ │ ├── experiment-details-tab.component.html │ │ │ │ │ │ │ ├── experiment-details-tab.component.scss │ │ │ │ │ │ │ ├── experiment-details-tab.component.spec.ts │ │ │ │ │ │ │ ├── experiment-details-tab.component.ts │ │ │ │ │ │ │ └── experiment-details-tab.module.ts │ │ │ │ │ │ ├── experiment-details.component.html │ │ │ │ │ │ ├── experiment-details.component.scss │ │ │ │ │ │ ├── experiment-details.component.spec.ts │ │ │ │ │ │ ├── experiment-details.component.ts │ │ │ │ │ │ ├── experiment-details.module.ts │ │ │ │ │ │ ├── overview │ │ │ │ │ │ │ ├── experiment-overview.component.html │ │ │ │ │ │ │ ├── experiment-overview.component.spec.ts │ │ │ │ │ │ │ ├── experiment-overview.component.ts │ │ │ │ │ │ │ └── experiment-overview.module.ts │ │ │ │ │ │ ├── trials-graph-echarts │ │ │ │ │ │ │ ├── trials-graph-echarts.component.html │ │ │ │ │ │ │ ├── trials-graph-echarts.component.scss │ │ │ │ │ │ │ ├── trials-graph-echarts.component.spec.ts │ │ │ │ │ │ │ ├── trials-graph-echarts.component.ts │ │ │ │ │ │ │ └── trials-graph-echarts.module.ts │ │ │ │ │ │ ├── trials-table │ │ │ │ │ │ │ ├── kfp-run │ │ │ │ │ │ │ │ ├── kfp-run.component.html │ │ │ │ │ │ │ │ ├── kfp-run.component.scss │ │ │ │ │ │ │ │ ├── kfp-run.component.spec.ts │ │ │ │ │ │ │ │ └── kfp-run.component.ts │ │ │ │ │ │ │ ├── trial-details │ │ │ │ │ │ │ │ ├── trial-details.component.html │ │ │ │ │ │ │ │ ├── trial-details.component.scss │ │ │ │ │ │ │ │ ├── trial-details.component.spec.ts │ │ │ │ │ │ │ │ ├── trial-details.component.ts │ │ │ │ │ │ │ │ ├── trial-details.module.ts │ │ │ │ │ │ │ │ ├── trial-logs │ │ │ │ │ │ │ │ │ ├── trial-logs.component.html │ │ │ │ │ │ │ │ │ ├── trial-logs.component.scss │ │ │ │ │ │ │ │ │ ├── trial-logs.component.spec.ts │ │ │ │ │ │ │ │ │ ├── trial-logs.component.ts │ │ │ │ │ │ │ │ │ └── trial-logs.module.ts │ │ │ │ │ │ │ │ ├── trial-overview │ │ │ │ │ │ │ │ │ ├── metrics │ │ │ │ │ │ │ │ │ │ ├── metrics.component.html │ │ │ │ │ │ │ │ │ │ ├── metrics.component.module.ts │ │ │ │ │ │ │ │ │ │ ├── metrics.component.spec.ts │ │ │ │ │ │ │ │ │ │ └── metrics.component.ts │ │ │ │ │ │ │ │ │ ├── trial-overview.component.html │ │ │ │ │ │ │ │ │ ├── trial-overview.component.spec.ts │ │ │ │ │ │ │ │ │ ├── trial-overview.component.ts │ │ │ │ │ │ │ │ │ └── trial-overview.module.ts │ │ │ │ │ │ │ │ └── trial-yaml │ │ │ │ │ │ │ │ │ ├── trial-yaml.component.html │ │ │ │ │ │ │ │ │ ├── trial-yaml.component.scss │ │ │ │ │ │ │ │ │ ├── trial-yaml.component.spec.ts │ │ │ │ │ │ │ │ │ ├── trial-yaml.component.ts │ │ │ │ │ │ │ │ │ └── trial-yaml.module.ts │ │ │ │ │ │ │ ├── trials-table.component.html │ │ │ │ │ │ │ ├── trials-table.component.scss │ │ │ │ │ │ │ ├── trials-table.component.spec.ts │ │ │ │ │ │ │ ├── trials-table.component.ts │ │ │ │ │ │ │ └── trials-table.module.ts │ │ │ │ │ │ └── yaml │ │ │ │ │ │ │ ├── experiment-yaml.component.html │ │ │ │ │ │ │ ├── experiment-yaml.component.scss │ │ │ │ │ │ │ ├── experiment-yaml.component.spec.ts │ │ │ │ │ │ │ ├── experiment-yaml.component.ts │ │ │ │ │ │ │ └── experiment-yaml.module.ts │ │ │ │ │ └── experiments │ │ │ │ │ │ ├── config.ts │ │ │ │ │ │ ├── delete-modal-config.ts │ │ │ │ │ │ ├── experiments.component.html │ │ │ │ │ │ ├── experiments.component.scss │ │ │ │ │ │ ├── experiments.component.spec.ts │ │ │ │ │ │ ├── experiments.component.ts │ │ │ │ │ │ ├── experiments.module.ts │ │ │ │ │ │ ├── optimal-trial │ │ │ │ │ │ ├── experiment-optimal-trial.component.html │ │ │ │ │ │ ├── experiment-optimal-trial.component.scss │ │ │ │ │ │ ├── experiment-optimal-trial.component.spec.ts │ │ │ │ │ │ ├── experiment-optimal-trial.component.ts │ │ │ │ │ │ ├── experiment-optimal-trial.module.ts │ │ │ │ │ │ └── utils.ts │ │ │ │ │ │ └── utils.ts │ │ │ │ ├── services │ │ │ │ │ ├── backend.service.spec.ts │ │ │ │ │ ├── backend.service.ts │ │ │ │ │ └── experiment-form.service.ts │ │ │ │ └── shared │ │ │ │ │ ├── list-input │ │ │ │ │ ├── list-input.component.html │ │ │ │ │ ├── list-input.component.scss │ │ │ │ │ ├── list-input.component.spec.ts │ │ │ │ │ ├── list-input.component.ts │ │ │ │ │ └── list-input.module.ts │ │ │ │ │ ├── list-key-value │ │ │ │ │ ├── list-key-value.component.html │ │ │ │ │ ├── list-key-value.component.scss │ │ │ │ │ ├── list-key-value.component.spec.ts │ │ │ │ │ ├── list-key-value.component.ts │ │ │ │ │ └── list-key-value.module.ts │ │ │ │ │ ├── params-list │ │ │ │ │ ├── add-modal │ │ │ │ │ │ ├── add-modal.component.html │ │ │ │ │ │ ├── add-modal.component.scss │ │ │ │ │ │ ├── add-modal.component.spec.ts │ │ │ │ │ │ └── add-modal.component.ts │ │ │ │ │ ├── parameter │ │ │ │ │ │ ├── parameter.component.html │ │ │ │ │ │ ├── parameter.component.scss │ │ │ │ │ │ ├── parameter.component.spec.ts │ │ │ │ │ │ └── parameter.component.ts │ │ │ │ │ ├── params-list.component.html │ │ │ │ │ ├── params-list.component.scss │ │ │ │ │ ├── params-list.component.spec.ts │ │ │ │ │ ├── params-list.component.ts │ │ │ │ │ └── params-list.module.ts │ │ │ │ │ └── utils.ts │ │ │ ├── assets │ │ │ │ ├── .gitkeep │ │ │ │ └── pipeline-centered.svg │ │ │ ├── environments │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── kubeflow.css │ │ │ ├── main.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.scss │ │ │ └── test.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.json │ │ └── tsconfig.spec.json │ │ ├── hp.go │ │ ├── nas.go │ │ ├── types.go │ │ └── util.go ├── util │ └── v1beta1 │ │ ├── env │ │ ├── env.go │ │ └── env_test.go │ │ ├── katibclient │ │ └── katib_client.go │ │ └── katibconfig │ │ ├── config.go │ │ └── config_test.go └── webhook │ └── v1beta1 │ ├── common │ └── const.go │ ├── experiment │ ├── mutate_webhook.go │ ├── validation_webhook.go │ └── validator │ │ ├── validator.go │ │ └── validator_test.go │ ├── pod │ ├── const.go │ ├── inject_webhook.go │ ├── inject_webhook_test.go │ └── utils.go │ └── webhook.go ├── scripts └── v1beta1 │ ├── build.sh │ ├── deploy.sh │ ├── push.sh │ ├── release.sh │ ├── undeploy.sh │ └── update-images.sh ├── sdk └── python │ └── v1beta1 │ ├── .gitignore │ ├── OWNERS │ ├── README.md │ ├── docs │ ├── KatibClient.md │ ├── V1beta1AlgorithmSetting.md │ ├── V1beta1AlgorithmSpec.md │ ├── V1beta1CollectorSpec.md │ ├── V1beta1ConfigMapSource.md │ ├── V1beta1EarlyStoppingRule.md │ ├── V1beta1EarlyStoppingSetting.md │ ├── V1beta1EarlyStoppingSpec.md │ ├── V1beta1Experiment.md │ ├── V1beta1ExperimentCondition.md │ ├── V1beta1ExperimentList.md │ ├── V1beta1ExperimentSpec.md │ ├── V1beta1ExperimentStatus.md │ ├── V1beta1FeasibleSpace.md │ ├── V1beta1FileSystemPath.md │ ├── V1beta1FilterSpec.md │ ├── V1beta1GraphConfig.md │ ├── V1beta1Metric.md │ ├── V1beta1MetricStrategy.md │ ├── V1beta1MetricsCollectorSpec.md │ ├── V1beta1NasConfig.md │ ├── V1beta1ObjectiveSpec.md │ ├── V1beta1Observation.md │ ├── V1beta1Operation.md │ ├── V1beta1OptimalTrial.md │ ├── V1beta1ParameterAssignment.md │ ├── V1beta1ParameterSpec.md │ ├── V1beta1SourceSpec.md │ ├── V1beta1Suggestion.md │ ├── V1beta1SuggestionCondition.md │ ├── V1beta1SuggestionList.md │ ├── V1beta1SuggestionSpec.md │ ├── V1beta1SuggestionStatus.md │ ├── V1beta1Trial.md │ ├── V1beta1TrialAssignment.md │ ├── V1beta1TrialCondition.md │ ├── V1beta1TrialList.md │ ├── V1beta1TrialParameterSpec.md │ ├── V1beta1TrialSource.md │ ├── V1beta1TrialSpec.md │ ├── V1beta1TrialStatus.md │ └── V1beta1TrialTemplate.md │ ├── kubeflow │ ├── __init__.py │ └── katib │ │ ├── __init__.py │ │ ├── api │ │ ├── __init__.py │ │ ├── katib_client.py │ │ ├── katib_client_test.py │ │ ├── report_metrics.py │ │ ├── report_metrics_test.py │ │ └── search.py │ │ ├── api_client.py │ │ ├── configuration.py │ │ ├── constants │ │ ├── __init__.py │ │ └── constants.py │ │ ├── exceptions.py │ │ ├── models │ │ ├── __init__.py │ │ ├── v1beta1_algorithm_setting.py │ │ ├── v1beta1_algorithm_spec.py │ │ ├── v1beta1_collector_spec.py │ │ ├── v1beta1_config_map_source.py │ │ ├── v1beta1_early_stopping_rule.py │ │ ├── v1beta1_early_stopping_setting.py │ │ ├── v1beta1_early_stopping_spec.py │ │ ├── v1beta1_experiment.py │ │ ├── v1beta1_experiment_condition.py │ │ ├── v1beta1_experiment_list.py │ │ ├── v1beta1_experiment_spec.py │ │ ├── v1beta1_experiment_status.py │ │ ├── v1beta1_feasible_space.py │ │ ├── v1beta1_file_system_path.py │ │ ├── v1beta1_filter_spec.py │ │ ├── v1beta1_graph_config.py │ │ ├── v1beta1_metric.py │ │ ├── v1beta1_metric_strategy.py │ │ ├── v1beta1_metrics_collector_spec.py │ │ ├── v1beta1_nas_config.py │ │ ├── v1beta1_objective_spec.py │ │ ├── v1beta1_observation.py │ │ ├── v1beta1_operation.py │ │ ├── v1beta1_optimal_trial.py │ │ ├── v1beta1_parameter_assignment.py │ │ ├── v1beta1_parameter_spec.py │ │ ├── v1beta1_source_spec.py │ │ ├── v1beta1_suggestion.py │ │ ├── v1beta1_suggestion_condition.py │ │ ├── v1beta1_suggestion_list.py │ │ ├── v1beta1_suggestion_spec.py │ │ ├── v1beta1_suggestion_status.py │ │ ├── v1beta1_trial.py │ │ ├── v1beta1_trial_assignment.py │ │ ├── v1beta1_trial_condition.py │ │ ├── v1beta1_trial_list.py │ │ ├── v1beta1_trial_parameter_spec.py │ │ ├── v1beta1_trial_source.py │ │ ├── v1beta1_trial_spec.py │ │ ├── v1beta1_trial_status.py │ │ └── v1beta1_trial_template.py │ │ ├── rest.py │ │ ├── types │ │ ├── __init__.py │ │ └── types.py │ │ └── utils │ │ ├── __init__.py │ │ └── utils.py │ └── setup.py └── test ├── __init__.py ├── conftest.py ├── e2e └── v1beta1 │ ├── hack │ └── aws │ │ ├── argo_workflow.py │ │ └── run-e2e-experiment.go │ ├── scripts │ ├── aws │ │ ├── run-e2e-experiment.sh │ │ └── setup-katib.sh │ └── gh-actions │ │ ├── build-load.sh │ │ ├── run-e2e-experiment.py │ │ ├── run-e2e-experiment.sh │ │ ├── run-e2e-tune-api.py │ │ ├── run-e2e-tune-api.sh │ │ ├── setup-katib.sh │ │ ├── setup-minikube.sh │ │ └── verify.py │ └── testdata │ ├── invalid-experiment.yaml │ └── valid-experiment.yaml └── unit └── v1beta1 ├── earlystopping ├── test_medianstop_service.py └── utils.py ├── metricscollector ├── test_tfevent_metricscollector.py └── utils.py ├── requirements.txt └── suggestion ├── test_darts_service.py ├── test_enas_service.py ├── test_hyperband_service.py ├── test_hyperopt_service.py ├── test_nas_common.py ├── test_optuna_service.py ├── test_skopt_service.py └── utils.py /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .gitignore 3 | docs 4 | manifests 5 | pkg/ui/*/frontend/node_modules 6 | pkg/ui/*/frontend/build 7 | -------------------------------------------------------------------------------- /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 100 3 | # E203 is ignored to avoid conflicts with Black's formatting, as it's not PEP 8 compliant 4 | extend-ignore = W503, E203 5 | -------------------------------------------------------------------------------- /.gcloudignore: -------------------------------------------------------------------------------- 1 | .git 2 | .gitignore 3 | docs 4 | examples 5 | manifests 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | 3 | contact_links: 4 | - name: Katib Documentation 5 | url: https://www.kubeflow.org/docs/components/katib/ 6 | about: Much help can be found in the docs 7 | - name: Kubeflow Katib Slack Channel 8 | url: https://www.kubeflow.org/docs/about/community/#kubeflow-slack-channels 9 | about: Ask the Katib community on CNCF Slack 10 | - name: Kubeflow Katib Community Meeting 11 | url: https://bit.ly/2PWVCkV 12 | about: Join the Kubeflow AutoML working group meeting 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yaml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Suggest an idea for Katib 3 | labels: ["kind/feature", "lifecycle/needs-triage"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thanks for taking the time to fill out this Katib feature request! 9 | - type: textarea 10 | id: feature 11 | attributes: 12 | label: What you would like to be added? 13 | description: | 14 | A clear and concise description of what you want to add to Katib. 15 | Please consider to write Katib enhancement proposal if it is a large feature request. 16 | validations: 17 | required: true 18 | - type: textarea 19 | id: rationale 20 | attributes: 21 | label: Why is this needed? 22 | validations: 23 | required: true 24 | - type: input 25 | id: votes 26 | attributes: 27 | label: Love this feature? 28 | value: Give it a 👍 We prioritize the features with most 👍 29 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | **What this PR does / why we need it**: 8 | 9 | **Which issue(s) this PR fixes** _(optional, in `fixes #(, fixes #, ...)` format, will close the issue(s) when PR gets merged)_: 10 | Fixes # 11 | 12 | **Checklist:** 13 | 14 | - [ ] [Docs](https://www.kubeflow.org/docs/components/katib/) included if any changes are user facing 15 | -------------------------------------------------------------------------------- /.github/workflows/e2e-test-tune-api.yaml: -------------------------------------------------------------------------------- 1 | name: E2E Test with tune API 2 | 3 | on: 4 | pull_request: 5 | paths-ignore: 6 | - "pkg/ui/v1beta1/frontend/**" 7 | 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.ref }} 10 | cancel-in-progress: true 11 | 12 | jobs: 13 | e2e: 14 | runs-on: ubuntu-22.04 15 | timeout-minutes: 120 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v4 19 | 20 | - name: Setup Test Env 21 | uses: ./.github/workflows/template-setup-e2e-test 22 | with: 23 | kubernetes-version: ${{ matrix.kubernetes-version }} 24 | 25 | - name: Run e2e test with tune API 26 | uses: ./.github/workflows/template-e2e-test 27 | with: 28 | tune-api: true 29 | training-operator: true 30 | 31 | strategy: 32 | fail-fast: false 33 | matrix: 34 | # Detail: https://hub.docker.com/r/kindest/node 35 | kubernetes-version: ["v1.29.2", "v1.30.7", "v1.31.3"] 36 | -------------------------------------------------------------------------------- /.github/workflows/e2e-test-ui-random-search-postgres.yaml: -------------------------------------------------------------------------------- 1 | name: E2E Test with Katib UI, random search, and postgres 2 | 3 | on: 4 | - pull_request 5 | 6 | concurrency: 7 | group: ${{ github.workflow }}-${{ github.ref }} 8 | cancel-in-progress: true 9 | 10 | jobs: 11 | e2e: 12 | runs-on: ubuntu-22.04 13 | timeout-minutes: 120 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v4 17 | 18 | - name: Setup Test Env 19 | uses: ./.github/workflows/template-setup-e2e-test 20 | with: 21 | kubernetes-version: ${{ matrix.kubernetes-version }} 22 | 23 | - name: Run e2e test with ${{ matrix.experiments }} experiments 24 | uses: ./.github/workflows/template-e2e-test 25 | with: 26 | experiments: random 27 | # Comma Delimited 28 | trial-images: pytorch-mnist-cpu 29 | katib-ui: true 30 | database-type: postgres 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | kubernetes-version: ["v1.29.2", "v1.30.7", "v1.31.3"] 36 | -------------------------------------------------------------------------------- /.github/workflows/publish-conformance-images.yaml: -------------------------------------------------------------------------------- 1 | name: Publish Katib Conformance Test Images 2 | 3 | on: 4 | - push 5 | - pull_request 6 | 7 | jobs: 8 | core: 9 | name: Publish Image 10 | uses: ./.github/workflows/build-and-publish-images.yaml 11 | with: 12 | component-name: ${{ matrix.component-name }} 13 | platforms: linux/amd64,linux/arm64 14 | dockerfile: ${{ matrix.dockerfile }} 15 | secrets: 16 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 17 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 18 | 19 | strategy: 20 | fail-fast: false 21 | matrix: 22 | include: 23 | - component-name: katib-conformance 24 | dockerfile: Dockerfile.conformance 25 | -------------------------------------------------------------------------------- /.github/workflows/test-lint.yaml: -------------------------------------------------------------------------------- 1 | name: Lint Files 2 | 3 | on: 4 | pull_request: 5 | paths-ignore: 6 | - "pkg/ui/v1beta1/frontend/**" 7 | 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.ref }} 10 | cancel-in-progress: true 11 | 12 | jobs: 13 | lint: 14 | name: Lint 15 | runs-on: ubuntu-22.04 16 | 17 | steps: 18 | - name: Check out code 19 | uses: actions/checkout@v4 20 | 21 | - name: Setup Python 22 | uses: actions/setup-python@v5 23 | with: 24 | python-version: 3.9 25 | 26 | - name: Check shell scripts 27 | run: make shellcheck 28 | 29 | - name: Run pre-commit 30 | uses: pre-commit/action@v3.0.1 31 | -------------------------------------------------------------------------------- /Dockerfile.conformance: -------------------------------------------------------------------------------- 1 | # Copyright 2023 The Kubeflow Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Dockerfile for building the source code of conformance tests 16 | FROM python:3.10-slim 17 | 18 | WORKDIR /kubeflow/katib 19 | 20 | COPY sdk/ /kubeflow/katib/sdk/ 21 | COPY examples/ /kubeflow/katib/examples/ 22 | COPY test/ /kubeflow/katib/test/ 23 | COPY pkg/ /kubeflow/katib/pkg/ 24 | 25 | COPY conformance/run.sh . 26 | 27 | # Add test script. 28 | RUN chmod +x run.sh 29 | 30 | RUN pip install --prefer-binary -e sdk/python/v1beta1 31 | 32 | ENTRYPOINT [ "./run.sh" ] -------------------------------------------------------------------------------- /OWNERS: -------------------------------------------------------------------------------- 1 | approvers: 2 | - andreyvelich 3 | - gaocegege 4 | - tenzen-y 5 | - johnugeorge 6 | reviewers: 7 | - anencore94 8 | - c-bata 9 | - Electronic-Waste 10 | -------------------------------------------------------------------------------- /PROJECT: -------------------------------------------------------------------------------- 1 | version: "3" 2 | domain: kubeflow.org 3 | repo: github.com/kubeflow/katib 4 | -------------------------------------------------------------------------------- /cmd/db-manager/v1beta1/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build the Katib DB manager. 2 | FROM golang:alpine AS build-env 3 | 4 | ARG TARGETARCH 5 | 6 | WORKDIR /go/src/github.com/kubeflow/katib 7 | 8 | # Download packages. 9 | COPY go.mod . 10 | COPY go.sum . 11 | RUN go mod download -x 12 | 13 | # Copy sources. 14 | COPY cmd/ cmd/ 15 | COPY pkg/ pkg/ 16 | 17 | # Build the binary. 18 | RUN CGO_ENABLED=0 GOOS=linux GOARCH="${TARGETARCH}" go build -a -o katib-db-manager ./cmd/db-manager/v1beta1 19 | 20 | # Copy the db-manager into a thin image. 21 | FROM alpine:3.15 22 | WORKDIR /app 23 | COPY --from=build-env /go/src/github.com/kubeflow/katib/katib-db-manager /app/ 24 | ENTRYPOINT ["./katib-db-manager"] 25 | -------------------------------------------------------------------------------- /cmd/earlystopping/medianstop/v1beta1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ARG TARGETARCH 4 | ENV TARGET_DIR /opt/katib 5 | ENV EARLY_STOPPING_DIR cmd/earlystopping/medianstop/v1beta1 6 | ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python 7 | 8 | RUN if [ "${TARGETARCH}" = "ppc64le" ] || [ "${TARGETARCH}" = "arm64" ]; then \ 9 | apt-get -y update && \ 10 | apt-get -y install gfortran libopenblas-dev liblapack-dev && \ 11 | apt-get clean && \ 12 | rm -rf /var/lib/apt/lists/*; \ 13 | fi 14 | 15 | ADD ./pkg/ ${TARGET_DIR}/pkg/ 16 | ADD ./${EARLY_STOPPING_DIR}/ ${TARGET_DIR}/${EARLY_STOPPING_DIR}/ 17 | 18 | WORKDIR ${TARGET_DIR}/${EARLY_STOPPING_DIR} 19 | 20 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 21 | RUN chgrp -R 0 ${TARGET_DIR} \ 22 | && chmod -R g+rwX ${TARGET_DIR} 23 | 24 | ENTRYPOINT ["python", "main.py"] 25 | -------------------------------------------------------------------------------- /cmd/earlystopping/medianstop/v1beta1/requirements.txt: -------------------------------------------------------------------------------- 1 | grpcio>=1.64.1 2 | protobuf>=4.21.12,<5 3 | googleapis-common-protos==1.6.0 4 | kubernetes==22.6.0 5 | cython>=0.29.24 6 | -------------------------------------------------------------------------------- /cmd/katib-controller/v1beta1/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build the Katib controller. 2 | FROM golang:alpine AS build-env 3 | 4 | ARG TARGETARCH 5 | 6 | WORKDIR /go/src/github.com/kubeflow/katib 7 | 8 | # Download packages. 9 | COPY go.mod . 10 | COPY go.sum . 11 | RUN go mod download -x 12 | 13 | # Copy sources. 14 | COPY cmd/ cmd/ 15 | COPY pkg/ pkg/ 16 | 17 | # Build the binary. 18 | RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o katib-controller ./cmd/katib-controller/v1beta1 19 | 20 | # Copy the controller-manager into a thin image. 21 | FROM alpine:3.15 22 | WORKDIR /app 23 | COPY --from=build-env /go/src/github.com/kubeflow/katib/katib-controller . 24 | ENTRYPOINT ["./katib-controller"] 25 | -------------------------------------------------------------------------------- /cmd/metricscollector/v1beta1/file-metricscollector/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build the Katib file metrics collector. 2 | FROM golang:alpine AS build-env 3 | 4 | ARG TARGETARCH 5 | 6 | WORKDIR /go/src/github.com/kubeflow/katib 7 | 8 | # Download packages. 9 | COPY go.mod . 10 | COPY go.sum . 11 | RUN go mod download -x 12 | 13 | # Copy sources. 14 | COPY cmd/ cmd/ 15 | COPY pkg/ pkg/ 16 | 17 | # Build the binary. 18 | RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o file-metricscollector ./cmd/metricscollector/v1beta1/file-metricscollector 19 | 20 | # Copy the file metrics collector into a thin image. 21 | FROM alpine:3.15 22 | WORKDIR /app 23 | COPY --from=build-env /go/src/github.com/kubeflow/katib/file-metricscollector . 24 | ENTRYPOINT ["./file-metricscollector"] 25 | -------------------------------------------------------------------------------- /cmd/metricscollector/v1beta1/tfevent-metricscollector/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ARG TARGETARCH 4 | ENV TARGET_DIR /opt/katib 5 | ENV METRICS_COLLECTOR_DIR cmd/metricscollector/v1beta1/tfevent-metricscollector 6 | ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/metricscollector/v1beta1/tfevent-metricscollector/::${TARGET_DIR}/pkg/metricscollector/v1beta1/common/ 7 | 8 | ADD ./pkg/ ${TARGET_DIR}/pkg/ 9 | ADD ./${METRICS_COLLECTOR_DIR}/ ${TARGET_DIR}/${METRICS_COLLECTOR_DIR}/ 10 | 11 | WORKDIR ${TARGET_DIR}/${METRICS_COLLECTOR_DIR} 12 | 13 | RUN if [ "${TARGETARCH}" = "arm64" ]; then \ 14 | apt-get -y update && \ 15 | apt-get -y install gfortran libpcre3 libpcre3-dev && \ 16 | apt-get clean && \ 17 | rm -rf /var/lib/apt/lists/*; \ 18 | fi 19 | 20 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 21 | RUN chgrp -R 0 ${TARGET_DIR} \ 22 | && chmod -R g+rwX ${TARGET_DIR} 23 | 24 | ENTRYPOINT ["python", "main.py"] 25 | -------------------------------------------------------------------------------- /cmd/metricscollector/v1beta1/tfevent-metricscollector/Dockerfile.ppc64le: -------------------------------------------------------------------------------- 1 | FROM ibmcom/tensorflow-ppc64le:2.2.0-py3 2 | ADD . /usr/src/app/github.com/kubeflow/katib 3 | WORKDIR /usr/src/app/github.com/kubeflow/katib/cmd/metricscollector/v1beta1/tfevent-metricscollector/ 4 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 5 | ENV PYTHONPATH /usr/src/app/github.com/kubeflow/katib:/usr/src/app/github.com/kubeflow/katib/pkg/apis/manager/v1beta1/python:/usr/src/app/github.com/kubeflow/katib/pkg/metricscollector/v1beta1/tfevent-metricscollector/:/usr/src/app/github.com/kubeflow/katib/pkg/metricscollector/v1beta1/common/ 6 | ENTRYPOINT ["python", "main.py"] 7 | -------------------------------------------------------------------------------- /cmd/metricscollector/v1beta1/tfevent-metricscollector/requirements.txt: -------------------------------------------------------------------------------- 1 | psutil==5.9.4 2 | rfc3339>=6.2 3 | grpcio>=1.64.1 4 | googleapis-common-protos==1.6.0 5 | tensorflow==2.16.1 6 | protobuf>=4.21.12,<5 7 | -------------------------------------------------------------------------------- /cmd/suggestion/goptuna/v1beta1/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build the Goptuna Suggestion. 2 | FROM golang:alpine AS build-env 3 | 4 | ARG TARGETARCH 5 | 6 | WORKDIR /go/src/github.com/kubeflow/katib 7 | 8 | # Download packages. 9 | COPY go.mod . 10 | COPY go.sum . 11 | RUN go mod download -x 12 | 13 | # Copy sources. 14 | COPY cmd/ cmd/ 15 | COPY pkg/ pkg/ 16 | 17 | # Build the binary. 18 | RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o goptuna-suggestion ./cmd/suggestion/goptuna/v1beta1 19 | 20 | # Copy the Goptuna suggestion into a thin image. 21 | FROM alpine:3.15 22 | 23 | ENV TARGET_DIR /opt/katib 24 | 25 | WORKDIR ${TARGET_DIR} 26 | 27 | COPY --from=build-env /go/src/github.com/kubeflow/katib/goptuna-suggestion ${TARGET_DIR}/ 28 | 29 | RUN chgrp -R 0 ${TARGET_DIR} \ 30 | && chmod -R g+rwX ${TARGET_DIR} 31 | 32 | ENTRYPOINT ["./goptuna-suggestion"] 33 | -------------------------------------------------------------------------------- /cmd/suggestion/hyperband/v1beta1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ARG TARGETARCH 4 | ENV TARGET_DIR /opt/katib 5 | ENV SUGGESTION_DIR cmd/suggestion/hyperband/v1beta1 6 | ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/apis/manager/health/python 7 | 8 | RUN if [ "${TARGETARCH}" = "ppc64le" ] || [ "${TARGETARCH}" = "arm64" ]; then \ 9 | apt-get -y update && \ 10 | apt-get -y install gfortran libopenblas-dev liblapack-dev && \ 11 | apt-get clean && \ 12 | rm -rf /var/lib/apt/lists/*; \ 13 | fi 14 | 15 | ADD ./pkg/ ${TARGET_DIR}/pkg/ 16 | ADD ./${SUGGESTION_DIR}/ ${TARGET_DIR}/${SUGGESTION_DIR}/ 17 | 18 | WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR} 19 | 20 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 21 | RUN chgrp -R 0 ${TARGET_DIR} \ 22 | && chmod -R g+rwX ${TARGET_DIR} 23 | 24 | ENTRYPOINT ["python", "main.py"] 25 | -------------------------------------------------------------------------------- /cmd/suggestion/hyperband/v1beta1/requirements.txt: -------------------------------------------------------------------------------- 1 | grpcio>=1.64.1 2 | cloudpickle==0.5.6 3 | numpy>=1.25.2 4 | scikit-learn>=0.24.0 5 | scipy>=1.5.4 6 | forestci==0.3 7 | protobuf>=4.21.12,<5 8 | googleapis-common-protos==1.6.0 9 | cython>=0.29.24 10 | -------------------------------------------------------------------------------- /cmd/suggestion/hyperopt/v1beta1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ARG TARGETARCH 4 | ENV TARGET_DIR /opt/katib 5 | ENV SUGGESTION_DIR cmd/suggestion/hyperopt/v1beta1 6 | ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/apis/manager/health/python 7 | 8 | RUN if [ "${TARGETARCH}" = "ppc64le" ]; then \ 9 | apt-get -y update && \ 10 | apt-get -y install gfortran libopenblas-dev liblapack-dev && \ 11 | apt-get clean && \ 12 | rm -rf /var/lib/apt/lists/*; \ 13 | fi 14 | 15 | ADD ./pkg/ ${TARGET_DIR}/pkg/ 16 | ADD ./${SUGGESTION_DIR}/ ${TARGET_DIR}/${SUGGESTION_DIR}/ 17 | 18 | WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR} 19 | 20 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 21 | RUN chgrp -R 0 ${TARGET_DIR} \ 22 | && chmod -R g+rwX ${TARGET_DIR} 23 | 24 | ENTRYPOINT ["python", "main.py"] 25 | -------------------------------------------------------------------------------- /cmd/suggestion/hyperopt/v1beta1/requirements.txt: -------------------------------------------------------------------------------- 1 | grpcio>=1.64.1 2 | cloudpickle==0.5.6 3 | numpy>=1.25.2 4 | scikit-learn>=0.24.0 5 | scipy>=1.5.4 6 | forestci==0.3 7 | protobuf>=4.21.12,<5 8 | googleapis-common-protos==1.6.0 9 | hyperopt==0.2.5 10 | cython>=0.29.24 11 | -------------------------------------------------------------------------------- /cmd/suggestion/nas/darts/v1beta1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ARG TARGETARCH 4 | ENV TARGET_DIR /opt/katib 5 | ENV SUGGESTION_DIR cmd/suggestion/nas/darts/v1beta1 6 | ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/apis/manager/health/python 7 | 8 | RUN if [ "${TARGETARCH}" = "ppc64le" ]; then \ 9 | apt-get -y update && \ 10 | apt-get -y install gfortran libopenblas-dev liblapack-dev && \ 11 | apt-get clean && \ 12 | rm -rf /var/lib/apt/lists/*; \ 13 | fi 14 | 15 | ADD ./pkg/ ${TARGET_DIR}/pkg/ 16 | ADD ./${SUGGESTION_DIR}/ ${TARGET_DIR}/${SUGGESTION_DIR}/ 17 | 18 | WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR} 19 | 20 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 21 | RUN chgrp -R 0 ${TARGET_DIR} \ 22 | && chmod -R g+rwX ${TARGET_DIR} 23 | 24 | ENTRYPOINT ["python", "main.py"] 25 | -------------------------------------------------------------------------------- /cmd/suggestion/nas/darts/v1beta1/requirements.txt: -------------------------------------------------------------------------------- 1 | grpcio>=1.64.1 2 | protobuf>=4.21.12,<5 3 | googleapis-common-protos==1.6.0 4 | cython>=0.29.24 5 | -------------------------------------------------------------------------------- /cmd/suggestion/nas/enas/v1beta1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ARG TARGETARCH 4 | ENV TARGET_DIR /opt/katib 5 | ENV SUGGESTION_DIR cmd/suggestion/nas/enas/v1beta1 6 | ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/apis/manager/health/python 7 | 8 | RUN if [ "${TARGETARCH}" = "ppc64le" ]; then \ 9 | apt-get -y update && \ 10 | apt-get -y install gfortran libopenblas-dev liblapack-dev && \ 11 | apt-get clean && \ 12 | rm -rf /var/lib/apt/lists/*; \ 13 | fi 14 | 15 | ADD ./pkg/ ${TARGET_DIR}/pkg/ 16 | ADD ./${SUGGESTION_DIR}/ ${TARGET_DIR}/${SUGGESTION_DIR}/ 17 | 18 | WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR} 19 | 20 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 21 | RUN chgrp -R 0 ${TARGET_DIR} \ 22 | && chmod -R g+rwX ${TARGET_DIR} 23 | 24 | ENTRYPOINT ["python", "main.py"] 25 | -------------------------------------------------------------------------------- /cmd/suggestion/nas/enas/v1beta1/requirements.txt: -------------------------------------------------------------------------------- 1 | grpcio>=1.64.1 2 | googleapis-common-protos==1.6.0 3 | cython>=0.29.24 4 | tensorflow==2.16.1 5 | protobuf>=4.21.12,<5 6 | -------------------------------------------------------------------------------- /cmd/suggestion/optuna/v1beta1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ARG TARGETARCH 4 | ENV TARGET_DIR /opt/katib 5 | ENV SUGGESTION_DIR cmd/suggestion/optuna/v1beta1 6 | ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/apis/manager/health/python 7 | 8 | RUN if [ "${TARGETARCH}" = "ppc64le" ]; then \ 9 | apt-get -y update && \ 10 | apt-get -y install gfortran libopenblas-dev liblapack-dev && \ 11 | apt-get clean && \ 12 | rm -rf /var/lib/apt/lists/*; \ 13 | fi 14 | 15 | ADD ./pkg/ ${TARGET_DIR}/pkg/ 16 | ADD ./${SUGGESTION_DIR}/ ${TARGET_DIR}/${SUGGESTION_DIR}/ 17 | 18 | WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR} 19 | 20 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 21 | RUN chgrp -R 0 ${TARGET_DIR} \ 22 | && chmod -R g+rwX ${TARGET_DIR} 23 | 24 | ENTRYPOINT ["python", "main.py"] 25 | -------------------------------------------------------------------------------- /cmd/suggestion/optuna/v1beta1/requirements.txt: -------------------------------------------------------------------------------- 1 | grpcio>=1.64.1 2 | protobuf>=4.21.12,<5 3 | googleapis-common-protos==1.53.0 4 | optuna==3.3.0 5 | -------------------------------------------------------------------------------- /cmd/suggestion/pbt/v1beta1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ARG TARGETARCH 4 | ENV TARGET_DIR /opt/katib 5 | ENV SUGGESTION_DIR cmd/suggestion/pbt/v1beta1 6 | ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/apis/manager/health/python 7 | 8 | RUN if [ "${TARGETARCH}" = "ppc64le" ]; then \ 9 | apt-get -y update && \ 10 | apt-get -y install gfortran libopenblas-dev liblapack-dev && \ 11 | apt-get clean && \ 12 | rm -rf /var/lib/apt/lists/*; \ 13 | fi 14 | 15 | ADD ./pkg/ ${TARGET_DIR}/pkg/ 16 | ADD ./${SUGGESTION_DIR}/ ${TARGET_DIR}/${SUGGESTION_DIR}/ 17 | 18 | WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR} 19 | 20 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 21 | RUN chgrp -R 0 ${TARGET_DIR} \ 22 | && chmod -R g+rwX ${TARGET_DIR} 23 | 24 | ENTRYPOINT ["python", "main.py"] 25 | -------------------------------------------------------------------------------- /cmd/suggestion/pbt/v1beta1/requirements.txt: -------------------------------------------------------------------------------- 1 | grpcio>=1.64.1 2 | protobuf>=4.21.12,<5 3 | googleapis-common-protos==1.53.0 4 | numpy==1.25.2 5 | -------------------------------------------------------------------------------- /cmd/suggestion/skopt/v1beta1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10-slim 2 | 3 | ARG TARGETARCH 4 | ENV TARGET_DIR /opt/katib 5 | ENV SUGGESTION_DIR cmd/suggestion/skopt/v1beta1 6 | ENV PYTHONPATH ${TARGET_DIR}:${TARGET_DIR}/pkg/apis/manager/v1beta1/python:${TARGET_DIR}/pkg/apis/manager/health/python 7 | 8 | RUN if [ "${TARGETARCH}" = "ppc64le" ]; then \ 9 | apt-get -y update && \ 10 | apt-get -y install gfortran libopenblas-dev liblapack-dev && \ 11 | apt-get clean && \ 12 | rm -rf /var/lib/apt/lists/*; \ 13 | fi 14 | 15 | ADD ./pkg/ ${TARGET_DIR}/pkg/ 16 | ADD ./${SUGGESTION_DIR}/ ${TARGET_DIR}/${SUGGESTION_DIR}/ 17 | 18 | WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR} 19 | 20 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 21 | RUN chgrp -R 0 ${TARGET_DIR} \ 22 | && chmod -R g+rwX ${TARGET_DIR} 23 | 24 | ENTRYPOINT ["python", "main.py"] 25 | -------------------------------------------------------------------------------- /cmd/suggestion/skopt/v1beta1/requirements.txt: -------------------------------------------------------------------------------- 1 | grpcio>=1.64.1 2 | cloudpickle==0.5.6 3 | # This is a workaround to avoid the following error. 4 | # AttributeError: module 'numpy' has no attribute 'int' 5 | # See more: https://github.com/numpy/numpy/pull/22607 6 | numpy==1.23.5 7 | scikit-learn>=0.24.0, <=1.3.0 8 | scipy>=1.5.4 9 | forestci==0.3 10 | protobuf>=4.21.12,<5 11 | googleapis-common-protos==1.6.0 12 | scikit-optimize>=0.9.0 13 | cython>=0.29.24 14 | -------------------------------------------------------------------------------- /conformance/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Run conformance test and generate test report. 4 | python test/e2e/v1beta1/scripts/gh-actions/run-e2e-experiment.py --experiment-path examples/v1beta1/hp-tuning/random.yaml --namespace kf-conformance \ 5 | --trial-pod-labels '{"sidecar.istio.io/inject": "false"}' | tee /tmp/katib-conformance.log 6 | 7 | 8 | # Create the done file. 9 | touch /tmp/katib-conformance.done 10 | echo "Done..." 11 | 12 | # Keep the container running so the test logs can be downloaded. 13 | while true; do sleep 10000; done -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Katib Documentation 2 | 3 | Welcome to Kubeflow Katib! 4 | 5 | The Katib documentation is available on [kubeflow.org](https://www.kubeflow.org/docs/components/katib/). 6 | -------------------------------------------------------------------------------- /docs/images/logo-title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/docs/images/logo-title.png -------------------------------------------------------------------------------- /docs/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/docs/images/logo.png -------------------------------------------------------------------------------- /docs/proposals/2044-conformance-program/conformance-crd-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/docs/proposals/2044-conformance-program/conformance-crd-test.png -------------------------------------------------------------------------------- /docs/proposals/2339-hpo-for-llm-fine-tuning/hp-optimization-api-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/docs/proposals/2339-hpo-for-llm-fine-tuning/hp-optimization-api-design.jpg -------------------------------------------------------------------------------- /docs/proposals/2340-push-based-metrics-collector/push-based-metrics-collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/docs/proposals/2340-push-based-metrics-collector/push-based-metrics-collection.png -------------------------------------------------------------------------------- /docs/proposals/685-metrics-collector/metrics-collector-design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/docs/proposals/685-metrics-collector/metrics-collector-design.png -------------------------------------------------------------------------------- /docs/proposals/README.md: -------------------------------------------------------------------------------- 1 | # Proposals 2 | 3 | Kubeflow uses the KEP process to document large scale changes to the project. 4 | 5 | Details on the process (including the KEP template, recommendations, etc.) can be found at 6 | [kubeflow/community/proposals](https://github.com/kubeflow/community/blob/master/proposals/README.md) 7 | -------------------------------------------------------------------------------- /examples/v1beta1/fpga/OWNERS: -------------------------------------------------------------------------------- 1 | approvers: 2 | - eliaskoromilas 3 | - jstamel 4 | -------------------------------------------------------------------------------- /examples/v1beta1/kubeflow-pipelines/images/9.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/examples/v1beta1/kubeflow-pipelines/images/9.bmp -------------------------------------------------------------------------------- /examples/v1beta1/sdk/README.md: -------------------------------------------------------------------------------- 1 | # Katib Python SDK examples. 2 | 3 | Here you can find examples of using [Katib Python SDK](../../../sdk/python/v1beta1/). 4 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/darts-cnn-cifar10/Dockerfile.cpu: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ENV TARGET_DIR /opt/darts-cnn-cifar10 4 | 5 | ADD examples/v1beta1/trial-images/darts-cnn-cifar10 ${TARGET_DIR} 6 | 7 | WORKDIR ${TARGET_DIR} 8 | 9 | # TODO (andreyvelich): This is required since torchvision==0.17.1 is incompatible with numpy 2.0 10 | RUN pip install numpy==1.26.0 11 | RUN pip install --prefer-binary --no-cache-dir torch==2.2.1 torchvision==0.17.1 12 | 13 | RUN chgrp -R 0 ${TARGET_DIR} \ 14 | && chmod -R g+rwX ${TARGET_DIR} 15 | 16 | ENTRYPOINT ["python3", "-u", "run_trial.py"] 17 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/darts-cnn-cifar10/Dockerfile.gpu: -------------------------------------------------------------------------------- 1 | # We need to use the nvcr.io/nvidia/pytorch image as a base image to support both linux/amd64 and linux_arm64 platforms. 2 | # PyTorch=2.2.0, cuda=12.3.2 3 | # Ref: https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-24-01.html#rel-24-01 4 | FROM nvcr.io/nvidia/pytorch:24.01-py3 5 | 6 | ENV TARGET_DIR /opt/darts-cnn-cifar10 7 | 8 | ADD examples/v1beta1/trial-images/darts-cnn-cifar10 ${TARGET_DIR} 9 | 10 | WORKDIR ${TARGET_DIR} 11 | 12 | RUN chgrp -R 0 ${TARGET_DIR} \ 13 | && chmod -R g+rwX ${TARGET_DIR} 14 | 15 | ENTRYPOINT ["python3", "-u", "run_trial.py"] 16 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/darts-cnn-cifar10/README.md: -------------------------------------------------------------------------------- 1 | # Differentiable Architecture Search (DARTS) Training Container 2 | 3 | This is training container for the DARTS algorithm. It uses PyTorch convolutional neural 4 | network and CIFAR-10 dataset to train the model. 5 | 6 | To know more about using DARTS in Katib, check 7 | [this guide](../../../../pkg/suggestion/v1beta1/nas/darts/). 8 | 9 | Katib uses this training container in the [DARTS Experiments](../../nas/darts-gpu.yaml#L78-L89). 10 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/enas-cnn-cifar10/Dockerfile.cpu: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ARG TARGETARCH 4 | ENV TARGET_DIR /opt/enas-cnn-cifar10 5 | ENV PYTHONPATH ${TARGET_DIR} 6 | 7 | ADD examples/v1beta1/trial-images/enas-cnn-cifar10 ${TARGET_DIR} 8 | 9 | WORKDIR ${TARGET_DIR} 10 | 11 | RUN if [ "${TARGETARCH}" = "arm64" ]; then \ 12 | apt-get -y update && \ 13 | apt-get -y install gfortran libpcre3 libpcre3-dev && \ 14 | apt-get clean && \ 15 | rm -rf /var/lib/apt/lists/*; \ 16 | fi 17 | 18 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 19 | RUN chgrp -R 0 ${TARGET_DIR} \ 20 | && chmod -R g+rwX ${TARGET_DIR} 21 | 22 | ENTRYPOINT ["python3", "-u", "RunTrial.py"] 23 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/enas-cnn-cifar10/Dockerfile.gpu: -------------------------------------------------------------------------------- 1 | # We need to use the nvcr.io/nvidia/tensorflow image as a base image to support both linux/amd64 and linux_arm64 platforms. 2 | # tensorflow-gpu=2.10.1, cuda=11.8.0 3 | # Ref: https://docs.nvidia.com/deeplearning/frameworks/tensorflow-release-notes/rel-22-12.html#rel-22-12 4 | FROM nvcr.io/nvidia/tensorflow:22.12-tf2-py3 5 | 6 | ENV TARGET_DIR /opt/enas-cnn-cifar10 7 | ENV PYTHONPATH ${TARGET_DIR} 8 | 9 | ADD examples/v1beta1/trial-images/enas-cnn-cifar10 ${TARGET_DIR} 10 | 11 | WORKDIR ${TARGET_DIR} 12 | 13 | RUN pip install --prefer-binary --no-cache-dir scipy==1.8.1 14 | RUN chgrp -R 0 ${TARGET_DIR} \ 15 | && chmod -R g+rwX ${TARGET_DIR} 16 | 17 | ENTRYPOINT ["python3", "-u", "RunTrial.py"] 18 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/enas-cnn-cifar10/README.md: -------------------------------------------------------------------------------- 1 | # Efficient Neural Architecture Search (ENAS) Training Container 2 | 3 | This is training container for the ENAS algorithm. It uses Keras convolutional neural 4 | network and CIFAR-10 dataset to train the model. 5 | 6 | To know more about using ENAS in Katib, check 7 | [this guide](../../../../pkg/suggestion/v1beta1/nas/enas/). 8 | 9 | Katib uses this training container in the [ENAS Experiments](../../nas/enas-gpu.yaml#L137-L148). 10 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/enas-cnn-cifar10/requirements.txt: -------------------------------------------------------------------------------- 1 | scipy>=1.7.2 2 | tensorflow==2.16.1 3 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/pytorch-mnist/Dockerfile.cpu: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ADD examples/v1beta1/trial-images/pytorch-mnist /opt/pytorch-mnist 4 | 5 | WORKDIR /opt/pytorch-mnist 6 | 7 | # Add folder for the logs. 8 | RUN mkdir /katib 9 | 10 | # TODO (andreyvelich): This is required since torchvision==0.17.1 is incompatible with numpy 2.0 11 | RUN pip install numpy==1.26.0 12 | RUN pip install --prefer-binary --no-cache-dir torch==2.2.1 torchvision==0.17.1 13 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 14 | 15 | RUN chgrp -R 0 /opt/pytorch-mnist \ 16 | && chmod -R g+rwX /opt/pytorch-mnist \ 17 | && chgrp -R 0 /katib \ 18 | && chmod -R g+rwX /katib 19 | 20 | ENTRYPOINT ["python3", "/opt/pytorch-mnist/mnist.py"] 21 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/pytorch-mnist/Dockerfile.gpu: -------------------------------------------------------------------------------- 1 | # We need to use the nvcr.io/nvidia/pytorch image as a base image to support both linux/amd64 and linux_arm64 platforms. 2 | # PyTorch=2.2.0, cuda=12.3.2 3 | # Ref: https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-24-01.html#rel-24-01 4 | FROM nvcr.io/nvidia/pytorch:24.01-py3 5 | 6 | ADD examples/v1beta1/trial-images/pytorch-mnist /opt/pytorch-mnist 7 | 8 | WORKDIR /opt/pytorch-mnist 9 | 10 | # Add folder for the logs. 11 | RUN mkdir /katib 12 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 13 | 14 | RUN chgrp -R 0 /opt/pytorch-mnist \ 15 | && chmod -R g+rwX /opt/pytorch-mnist \ 16 | && chgrp -R 0 /katib \ 17 | && chmod -R g+rwX /katib 18 | 19 | ENTRYPOINT ["python3", "/opt/pytorch-mnist/mnist.py"] 20 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/pytorch-mnist/README.md: -------------------------------------------------------------------------------- 1 | # PyTorch MNIST Image Classification Example 2 | 3 | This is PyTorch MNIST image classification training container with saving metrics 4 | to the file or printing to the StdOut. It uses convolutional neural network to 5 | train the model. 6 | 7 | Katib uses this training container in some Experiments, for instance in the 8 | [file Metrics Collector example](../../metrics-collector/file-metrics-collector.yaml#L55-L64), 9 | the [file Metrics Collector with logs in JSON format example](../../metrics-collector/file-metrics-collector-with-json-format.yaml#L52-L62), 10 | the [median stopping early stopping rule with logs in JSON format example](../../early-stopping/median-stop-with-json-format.yaml#L62-L71) 11 | and the [PyTorchJob example](../../kubeflow-training-operator/pytorchjob-mnist.yaml#L47-L54). 12 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/pytorch-mnist/requirements.txt: -------------------------------------------------------------------------------- 1 | cloudml-hypertune==0.1.0.dev6 2 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/simple-pbt/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ADD examples/v1beta1/trial-images/simple-pbt /opt/pbt 4 | 5 | WORKDIR /opt/pbt 6 | 7 | RUN python3 -m pip install --prefer-binary -r requirements.txt 8 | RUN chgrp -R 0 /opt/pbt \ 9 | && chmod -R g+rwX /opt/pbt 10 | 11 | ENTRYPOINT ["python3", "/opt/pbt/pbt_test.py"] 12 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/simple-pbt/README.md: -------------------------------------------------------------------------------- 1 | # Toy PBT problem for benchmarking adaptive learning rate 2 | 3 | The goal is to optimize this trainable's accuracy. The accuracy increases 4 | fastest at the optimal lr, which is a function of the current accuracy. 5 | The optimal lr schedule for this problem is the triangle wave as follows. 6 | Note that many lr schedules for real models also follow this shape: 7 | 8 | ``` 9 | best lr 10 | ^ 11 | | /\ 12 | | / \ 13 | | / \ 14 | | / \ 15 | ------------> accuracy 16 | ``` 17 | 18 | In this problem, using PBT with a population of 2-4 is sufficient to 19 | roughly approximate this lr schedule. Higher population sizes will yield 20 | faster convergence. Training will not converge without PBT. 21 | 22 | If you want to read more about this example, vist the 23 | [ray](https://github.com/ray-project/ray/blob/7f1bacc7dc9caf6d0ec042e39499bbf1d9a7d065/python/ray/tune/examples/README.rst) 24 | documentation. 25 | 26 | Katib uses this training container in some Experiments, for instance in the 27 | [PBT example](../../hp-tuning/simple-pbt.yaml#L44-L52). 28 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/simple-pbt/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy==1.25.2 2 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/tf-mnist-with-summaries/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | ARG TARGETARCH 4 | 5 | ADD examples/v1beta1/trial-images/tf-mnist-with-summaries /opt/tf-mnist-with-summaries 6 | 7 | WORKDIR /opt/tf-mnist-with-summaries 8 | 9 | RUN if [ "${TARGETARCH}" = "arm64" ]; then \ 10 | apt-get -y update && \ 11 | apt-get -y install gfortran libpcre3 libpcre3-dev && \ 12 | apt-get clean && \ 13 | rm -rf /var/lib/apt/lists/*; \ 14 | fi 15 | 16 | RUN pip install --prefer-binary --no-cache-dir -r requirements.txt 17 | RUN chgrp -R 0 /opt/tf-mnist-with-summaries \ 18 | && chmod -R g+rwX /opt/tf-mnist-with-summaries 19 | 20 | ENTRYPOINT ["python3", "/opt/tf-mnist-with-summaries/mnist.py"] 21 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/tf-mnist-with-summaries/README.md: -------------------------------------------------------------------------------- 1 | # Tensorflow MNIST Classification With Summaries Example 2 | 3 | This is Tensorflow MNIST image classification training container that outputs TF summaries. 4 | It uses convolutional neural network to train the model. 5 | 6 | If you want to read more about this example, visit the official 7 | [tensorflow](https://www.tensorflow.org/tutorials/quickstart/advanced) 8 | documentation. 9 | 10 | Katib uses this training container in some Experiments, for instance in the 11 | [TFJob example](../../kubeflow-training-operator/tfjob-mnist-with-summaries.yaml#L54-L62). 12 | -------------------------------------------------------------------------------- /examples/v1beta1/trial-images/tf-mnist-with-summaries/requirements.txt: -------------------------------------------------------------------------------- 1 | tensorflow==2.16.1 2 | -------------------------------------------------------------------------------- /hack/boilerplate/boilerplate.go.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | -------------------------------------------------------------------------------- /hack/boilerplate/boilerplate.py.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Kubeflow Authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | -------------------------------------------------------------------------------- /hack/boilerplate/boilerplate.sh.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Kubeflow Authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | -------------------------------------------------------------------------------- /hack/gen-python-sdk/swagger_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageName": "katib", 3 | "projectName": "katib", 4 | "packageVersion": "0.1", 5 | "importMappings": { 6 | "V1Container": "from kubernetes.client import V1Container", 7 | "V1ListMeta": "from kubernetes.client import V1ListMeta", 8 | "V1ObjectMeta": "from kubernetes.client import V1ObjectMeta", 9 | "V1HTTPGetAction": "from kubernetes.client import V1HTTPGetAction", 10 | "V1ManagedFieldsEntry": "from kubernetes.client import V1ManagedFieldsEntry", 11 | "V1OwnerReference": "from kubernetes.client import V1OwnerReference" 12 | }, 13 | "typeMappings": { 14 | "V1Time": "datetime", 15 | "V1UnstructuredUnstructured": "object" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /hack/tools.go: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | 3 | /* 4 | Copyright 2022 The Kubeflow Authors. 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | */ 18 | 19 | // This package contains code generation required by build scripts. 20 | // https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module 21 | package test 22 | 23 | import ( 24 | _ "k8s.io/code-generator" 25 | _ "k8s.io/kube-openapi/cmd/openapi-gen" 26 | ) 27 | -------------------------------------------------------------------------------- /hack/update-gofmt.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright 2022 The Kubeflow Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -o errexit 18 | set -o nounset 19 | set -o pipefail 20 | 21 | find . -name "*.go" | grep -v "\.pb\.go$" | xargs gofmt -s -w 22 | -------------------------------------------------------------------------------- /hack/verify-generated-codes.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright 2022 The Kubeflow Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -o errexit 18 | set -o nounset 19 | set -o pipefail 20 | 21 | PATHS=( "${@}" ) 22 | cd "$(dirname "$0")/.." 23 | 24 | git diff --exit-code -- "${PATHS[@]}" > /dev/null 25 | -------------------------------------------------------------------------------- /hack/verify-gofmt.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright 2022 The Kubeflow Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -o errexit 18 | set -o nounset 19 | set -o pipefail 20 | 21 | if [ -z "$(command -v gofmt)" ]; then 22 | echo "Can not find gofmt" 23 | exit 1 24 | fi 25 | 26 | diff=$(find . -name "*.go" | grep -v "\.pb\.go$" | xargs gofmt -s -d 2>&1) 27 | if [[ -n "${diff}" ]]; then 28 | echo "${diff}" 29 | echo 30 | echo "Please run hack/update-gofmt.sh" 31 | exit 1 32 | fi 33 | -------------------------------------------------------------------------------- /hack/verify-golangci-lint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright 2022 The Kubeflow Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -o errexit 18 | set -o pipefail 19 | 20 | cd "$(dirname "$0")/.." 21 | 22 | if [ -z "$(command -v golangci-lint)" ]; then 23 | echo 'Can not find golangci-lint, install with: make lint' 24 | exit 1 25 | fi 26 | 27 | echo 'Running golangci-lint' 28 | golangci-lint run --timeout 5m --go 1.22 29 | -------------------------------------------------------------------------------- /hack/verify-yamllint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright 2022 The Kubeflow Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -o errexit 18 | set -o pipefail 19 | 20 | cd "$(dirname "$0")/.." 21 | 22 | if [ -z "$(command -v yamllint)" ]; then 23 | echo 'Can not find yamllint, install with: make yamllint' 24 | exit 1 25 | fi 26 | 27 | echo 'Running yamllint' 28 | yamllint -d "{extends: default, rules: {line-length: disable}}" examples/* manifests/* 29 | -------------------------------------------------------------------------------- /hack/violation_exception_v1beta1.list: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/hack/violation_exception_v1beta1.list -------------------------------------------------------------------------------- /manifests/v1beta1/components/controller/kustomization.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kustomize.config.k8s.io/v1beta1 3 | kind: Kustomization 4 | 5 | resources: 6 | - controller.yaml 7 | - rbac.yaml 8 | - service.yaml 9 | - trial-templates.yaml 10 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/controller/service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: katib-controller 6 | namespace: kubeflow 7 | labels: 8 | katib.kubeflow.org/component: controller 9 | annotations: 10 | prometheus.io/port: "8080" 11 | prometheus.io/scheme: http 12 | prometheus.io/scrape: "true" 13 | spec: 14 | ports: 15 | - port: 443 16 | protocol: TCP 17 | targetPort: 8443 18 | name: webhook 19 | - name: metrics 20 | port: 8080 21 | targetPort: 8080 22 | - name: healthz 23 | port: 18080 24 | targetPort: 18080 25 | selector: 26 | katib.kubeflow.org/component: controller 27 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/crd/experiment.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apiextensions.k8s.io/v1 3 | kind: CustomResourceDefinition 4 | metadata: 5 | name: experiments.kubeflow.org 6 | spec: 7 | group: kubeflow.org 8 | scope: Namespaced 9 | versions: 10 | - name: v1beta1 11 | served: true 12 | storage: true 13 | additionalPrinterColumns: 14 | - name: Type 15 | type: string 16 | jsonPath: .status.conditions[-1:].type 17 | - name: Status 18 | type: string 19 | jsonPath: .status.conditions[-1:].status 20 | - name: Age 21 | type: date 22 | jsonPath: .metadata.creationTimestamp 23 | subresources: 24 | status: {} 25 | schema: 26 | openAPIV3Schema: 27 | type: object 28 | x-kubernetes-preserve-unknown-fields: true 29 | names: 30 | kind: Experiment 31 | singular: experiment 32 | plural: experiments 33 | categories: 34 | - all 35 | - kubeflow 36 | - katib 37 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/crd/kustomization.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kustomize.config.k8s.io/v1beta1 3 | kind: Kustomization 4 | 5 | resources: 6 | - experiment.yaml 7 | - suggestion.yaml 8 | - trial.yaml 9 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/crd/trial.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apiextensions.k8s.io/v1 3 | kind: CustomResourceDefinition 4 | metadata: 5 | name: trials.kubeflow.org 6 | spec: 7 | group: kubeflow.org 8 | scope: Namespaced 9 | versions: 10 | - name: v1beta1 11 | served: true 12 | storage: true 13 | additionalPrinterColumns: 14 | - name: Type 15 | type: string 16 | jsonPath: .status.conditions[-1:].type 17 | - name: Status 18 | type: string 19 | jsonPath: .status.conditions[-1:].status 20 | - name: Age 21 | type: date 22 | jsonPath: .metadata.creationTimestamp 23 | subresources: 24 | status: {} 25 | schema: 26 | openAPIV3Schema: 27 | type: object 28 | x-kubernetes-preserve-unknown-fields: true 29 | names: 30 | kind: Trial 31 | singular: trial 32 | plural: trials 33 | categories: 34 | - all 35 | - kubeflow 36 | - katib 37 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/db-manager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kustomize.config.k8s.io/v1beta1 3 | kind: Kustomization 4 | 5 | resources: 6 | - db-manager.yaml 7 | - service.yaml 8 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/db-manager/service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: katib-db-manager 6 | namespace: kubeflow 7 | labels: 8 | katib.kubeflow.org/component: db-manager 9 | spec: 10 | type: ClusterIP 11 | ports: 12 | - port: 6789 13 | protocol: TCP 14 | name: api 15 | selector: 16 | katib.kubeflow.org/component: db-manager 17 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/mysql/kustomization.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kustomize.config.k8s.io/v1beta1 3 | kind: Kustomization 4 | 5 | resources: 6 | - mysql.yaml 7 | - pvc.yaml 8 | - secret.yaml 9 | - service.yaml 10 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/mysql/pvc.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: PersistentVolumeClaim 4 | metadata: 5 | name: katib-mysql 6 | namespace: kubeflow 7 | spec: 8 | accessModes: 9 | - ReadWriteOnce 10 | resources: 11 | requests: 12 | storage: 10Gi 13 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/mysql/secret.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Secret 4 | type: Opaque 5 | metadata: 6 | name: katib-mysql-secrets 7 | data: 8 | MYSQL_ROOT_PASSWORD: dGVzdA== # "test" 9 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/mysql/service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: katib-mysql 6 | namespace: kubeflow 7 | labels: 8 | katib.kubeflow.org/component: mysql 9 | spec: 10 | type: ClusterIP 11 | ports: 12 | - port: 3306 13 | protocol: TCP 14 | name: dbapi 15 | selector: 16 | katib.kubeflow.org/component: mysql 17 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/namespace/kustomization.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kustomize.config.k8s.io/v1beta1 3 | kind: Kustomization 4 | namespace: kubeflow 5 | resources: 6 | # Namespace. 7 | - namespace.yaml 8 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/namespace/namespace.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: kubeflow 6 | labels: 7 | katib.kubeflow.org/metrics-collector-injection: enabled 8 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/postgres/kustomization.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kustomize.config.k8s.io/v1beta1 3 | kind: Kustomization 4 | 5 | resources: 6 | - postgres.yaml 7 | - pvc.yaml 8 | - secret.yaml 9 | - service.yaml 10 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/postgres/pvc.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: PersistentVolumeClaim 4 | metadata: 5 | name: katib-postgres 6 | namespace: kubeflow 7 | spec: 8 | accessModes: 9 | - ReadWriteOnce 10 | resources: 11 | requests: 12 | storage: 3Gi 13 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/postgres/secret.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Secret 4 | type: Opaque 5 | metadata: 6 | name: katib-postgres-secrets 7 | data: 8 | POSTGRES_USER: a2F0aWI= # katib 9 | POSTGRES_PASSWORD: a2F0aWI= # katib 10 | POSTGRES_DB: a2F0aWI= # katib 11 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/postgres/service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: katib-postgres 6 | namespace: kubeflow 7 | labels: 8 | katib.kubeflow.org/component: postgres 9 | spec: 10 | type: ClusterIP 11 | ports: 12 | - port: 5432 13 | protocol: TCP 14 | name: dbapi 15 | selector: 16 | katib.kubeflow.org/component: postgres 17 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/ui/kustomization.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kustomize.config.k8s.io/v1beta1 3 | kind: Kustomization 4 | 5 | resources: 6 | - rbac.yaml 7 | - service.yaml 8 | - ui.yaml 9 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/ui/rbac.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: ClusterRole 3 | apiVersion: rbac.authorization.k8s.io/v1 4 | metadata: 5 | name: katib-ui 6 | rules: 7 | - apiGroups: 8 | - "" 9 | resources: 10 | - configmaps 11 | - namespaces 12 | verbs: 13 | - "*" 14 | - apiGroups: 15 | - kubeflow.org 16 | resources: 17 | - experiments 18 | - trials 19 | - suggestions 20 | verbs: 21 | - "*" 22 | - apiGroups: 23 | - "" 24 | resources: 25 | - pods 26 | verbs: 27 | - list 28 | - apiGroups: 29 | - "" 30 | resources: 31 | - pods/log 32 | verbs: 33 | - get 34 | --- 35 | apiVersion: v1 36 | kind: ServiceAccount 37 | metadata: 38 | name: katib-ui 39 | namespace: kubeflow 40 | --- 41 | kind: ClusterRoleBinding 42 | apiVersion: rbac.authorization.k8s.io/v1 43 | metadata: 44 | name: katib-ui 45 | roleRef: 46 | apiGroup: rbac.authorization.k8s.io 47 | kind: ClusterRole 48 | name: katib-ui 49 | subjects: 50 | - kind: ServiceAccount 51 | name: katib-ui 52 | namespace: kubeflow 53 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/ui/service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: katib-ui 6 | namespace: kubeflow 7 | labels: 8 | katib.kubeflow.org/component: ui 9 | spec: 10 | type: ClusterIP 11 | ports: 12 | - port: 80 13 | protocol: TCP 14 | name: ui 15 | targetPort: 8080 16 | selector: 17 | katib.kubeflow.org/component: ui 18 | -------------------------------------------------------------------------------- /manifests/v1beta1/components/webhook/kustomization.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kustomize.config.k8s.io/v1beta1 3 | kind: Kustomization 4 | 5 | resources: 6 | - webhooks.yaml 7 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-cert-manager/certificate.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: cert-manager.io/v1 3 | kind: Certificate 4 | metadata: 5 | name: katib-webhook-cert 6 | spec: 7 | isCA: true 8 | commonName: KATIB_SERVICE_NAME_PLACEHOLDER.KATIB_NAMESPACE_PLACEHOLDER.svc 9 | dnsNames: 10 | - KATIB_SERVICE_NAME_PLACEHOLDER.KATIB_NAMESPACE_PLACEHOLDER.svc 11 | - KATIB_SERVICE_NAME_PLACEHOLDER.KATIB_NAMESPACE_PLACEHOLDER.svc.cluster.local 12 | issuerRef: 13 | kind: Issuer 14 | name: katib-selfsigned-issuer 15 | secretName: katib-webhook-cert 16 | --- 17 | apiVersion: cert-manager.io/v1 18 | kind: Issuer 19 | metadata: 20 | name: katib-selfsigned-issuer 21 | spec: 22 | selfSigned: {} 23 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-cert-manager/params.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | varReference: 3 | - path: spec/commonName 4 | kind: Certificate 5 | - path: spec/dnsNames 6 | kind: Certificate 7 | - path: spec/issuerRef/name 8 | kind: Certificate 9 | - path: metadata/annotations 10 | kind: MutatingWebhookConfiguration 11 | - path: metadata/annotations 12 | kind: ValidatingWebhookConfiguration 13 | nameReference: 14 | - kind: Issuer 15 | group: cert-manager.io 16 | fieldSpecs: 17 | - kind: Certificate 18 | group: cert-manager.io 19 | path: spec/issuerRef/name 20 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-cert-manager/patches/katib-cert-injection.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: admissionregistration.k8s.io/v1 3 | kind: ValidatingWebhookConfiguration 4 | metadata: 5 | name: katib.kubeflow.org 6 | annotations: 7 | cert-manager.io/inject-ca-from: KATIB_NAMESPACE_PLACEHOLDER/KATIB_CERT_NAME_PLACEHOLDER 8 | --- 9 | apiVersion: admissionregistration.k8s.io/v1 10 | kind: MutatingWebhookConfiguration 11 | metadata: 12 | name: katib.kubeflow.org 13 | annotations: 14 | cert-manager.io/inject-ca-from: KATIB_NAMESPACE_PLACEHOLDER/KATIB_CERT_NAME_PLACEHOLDER 15 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-external-db/secrets.env: -------------------------------------------------------------------------------- 1 | KATIB_MYSQL_DB_DATABASE= 2 | KATIB_MYSQL_DB_HOST= 3 | KATIB_MYSQL_DB_PORT= 4 | DB_USER= 5 | DB_PASSWORD= 6 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-leader-election/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | namespace: kubeflow 4 | # rbac for leader-election 5 | resources: 6 | - ../katib-standalone 7 | - leader-election-rbac.yaml 8 | replicas: 9 | - count: 2 10 | name: katib-controller 11 | configMapGenerator: 12 | - behavior: replace 13 | files: 14 | - katib-config.yaml 15 | name: katib-config 16 | options: 17 | disableNameSuffixHash: true 18 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-leader-election/leader-election-rbac.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | name: leader-election 6 | namespace: kubeflow 7 | rules: 8 | - apiGroups: 9 | - coordination.k8s.io 10 | resources: 11 | - leases 12 | verbs: 13 | - "*" 14 | --- 15 | apiVersion: rbac.authorization.k8s.io/v1 16 | kind: RoleBinding 17 | metadata: 18 | name: leader-election 19 | namespace: kubeflow 20 | roleRef: 21 | apiGroup: rbac.authorization.k8s.io 22 | kind: Role 23 | name: leader-election 24 | subjects: 25 | - kind: ServiceAccount 26 | name: katib-controller 27 | namespace: kubeflow 28 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-openshift/patches/service-serving-cert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - op: "add" 3 | path: "/metadata/annotations/service.beta.openshift.io~1serving-cert-secret-name" 4 | value: katib-webhook-cert 5 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-openshift/patches/webhook-inject-cabundle.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - op: "add" 3 | path: "/metadata/annotations" 4 | value: 5 | service.beta.openshift.io/inject-cabundle: "true" 6 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-standalone-postgres/patches/db-manager.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - op: replace 3 | path: /spec/template/spec/containers/0/env 4 | value: 5 | - name: DB_NAME 6 | value: "postgres" 7 | - name: DB_PASSWORD 8 | value: "katib" 9 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-with-kubeflow/istio-authorizationpolicy.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: security.istio.io/v1beta1 3 | kind: AuthorizationPolicy 4 | metadata: 5 | name: katib-ui 6 | namespace: kubeflow 7 | spec: 8 | action: ALLOW 9 | selector: 10 | matchLabels: 11 | katib.kubeflow.org/component: ui 12 | rules: 13 | - from: 14 | - source: 15 | principals: ["cluster.local/ns/istio-system/sa/istio-ingressgateway-service-account"] 16 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-with-kubeflow/params.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | varReference: 3 | - path: spec/http/route/destination/host 4 | kind: VirtualService 5 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-with-kubeflow/patches/enable-ui-authz-checks.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - op: add 3 | path: /spec/template/spec/containers/0/env/- 4 | value: 5 | name: APP_DISABLE_AUTH 6 | value: "false" 7 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-with-kubeflow/patches/istio-sidecar-injection.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: "katib-ui" 6 | spec: 7 | template: 8 | metadata: 9 | labels: 10 | sidecar.istio.io/inject: "true" 11 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-with-kubeflow/patches/remove-namespace.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | $patch: delete 3 | apiVersion: v1 4 | kind: Namespace 5 | metadata: 6 | name: kubeflow 7 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-with-kubeflow/patches/ui-rbac.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - op: add 3 | path: /rules/- 4 | value: 5 | apiGroups: [authorization.k8s.io] 6 | resources: [subjectaccessreviews] 7 | verbs: [create] 8 | -------------------------------------------------------------------------------- /manifests/v1beta1/installs/katib-with-kubeflow/ui-virtual-service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: networking.istio.io/v1alpha3 3 | kind: VirtualService 4 | metadata: 5 | name: katib-ui 6 | spec: 7 | gateways: 8 | - kubeflow-gateway 9 | hosts: 10 | - "*" 11 | http: 12 | - match: 13 | - uri: 14 | prefix: /katib/ 15 | rewrite: 16 | uri: /katib/ 17 | route: 18 | - destination: 19 | host: katib-ui.KATIB_UI_NAMESPACE_PLACEHOLDER.svc.cluster.local 20 | port: 21 | number: 80 22 | -------------------------------------------------------------------------------- /pkg/apis/apis.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Generate deepcopy, clientset, listers, informers for apis 18 | //go:generate ../../hack/update-codegen.sh 19 | 20 | // Generate open-api for apis 21 | //go:generate ../../hack/update-openapigen.sh 22 | 23 | package apis 24 | -------------------------------------------------------------------------------- /pkg/apis/controller/apis.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package apis contains Kubernetes API groups. 18 | package apis 19 | 20 | import ( 21 | "k8s.io/apimachinery/pkg/runtime" 22 | ) 23 | 24 | // AddToSchemes may be used to add all resources defined in the project to a Scheme 25 | var AddToSchemes runtime.SchemeBuilder 26 | 27 | // AddToScheme adds all Resources to the Scheme 28 | func AddToScheme(s *runtime.Scheme) error { 29 | return AddToSchemes.AddToScheme(s) 30 | } 31 | -------------------------------------------------------------------------------- /pkg/apis/controller/common/group.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package experiment contains experiment API versions 18 | package common 19 | -------------------------------------------------------------------------------- /pkg/apis/controller/common/v1beta1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package v1beta1 contains API Schema definitions for the common v1beta1 API group 18 | // +k8s:openapi-gen=true 19 | // +k8s:deepcopy-gen=package,register 20 | // +k8s:conversion-gen=github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1 21 | // +k8s:defaulter-gen=TypeMeta 22 | // +kubebuilder:subresource:status 23 | // +groupName=common.kubeflow.org 24 | package v1beta1 25 | -------------------------------------------------------------------------------- /pkg/apis/controller/experiments/group.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package experiments contains experiment API versions 18 | package experiments 19 | -------------------------------------------------------------------------------- /pkg/apis/controller/experiments/v1beta1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package v1beta1 contains API Schema definitions for the experiment v1beta1 API group 18 | // +k8s:openapi-gen=true 19 | // +k8s:deepcopy-gen=package,register 20 | // +k8s:conversion-gen=github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1 21 | // +k8s:defaulter-gen=TypeMeta 22 | // +kubebuilder:subresource:status 23 | // +groupName=experiment.kubeflow.org 24 | package v1beta1 25 | -------------------------------------------------------------------------------- /pkg/apis/controller/suggestions/group.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package suggestions contains suggestion API versions 18 | package suggestions 19 | -------------------------------------------------------------------------------- /pkg/apis/controller/suggestions/v1beta1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package v1beta1 contains API Schema definitions for the suggestion v1beta1 API group 18 | // +k8s:openapi-gen=true 19 | // +k8s:deepcopy-gen=package,register 20 | // +k8s:conversion-gen=github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1 21 | // +k8s:defaulter-gen=TypeMeta 22 | // +kubebuilder:subresource:status 23 | // +groupName=suggestion.kubeflow.org 24 | package v1beta1 25 | -------------------------------------------------------------------------------- /pkg/apis/controller/trials/group.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package trials contains trial API versions 18 | package trials 19 | -------------------------------------------------------------------------------- /pkg/apis/controller/trials/v1beta1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package v1beta1 contains API Schema definitions for the trial v1beta1 API group 18 | // +k8s:openapi-gen=true 19 | // +k8s:deepcopy-gen=package,register 20 | // +k8s:conversion-gen=github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1 21 | // +k8s:defaulter-gen=TypeMeta 22 | // +kubebuilder:subresource:status 23 | // +groupName=trial.kubeflow.org 24 | package v1beta1 25 | -------------------------------------------------------------------------------- /pkg/apis/manager/README.md: -------------------------------------------------------------------------------- 1 | # Katib GRPC API 2 | 3 | Katib offers the following APIs: 4 | 5 | - DBManager service is an API for DB services. 6 | - Suggestion service is an API for Suggestion services. 7 | - EarlyStopping service is an API for EarlyStopping services. 8 | 9 | ## GRPC API documentation 10 | 11 | See the [Katib v1beta1 API reference docs](./v1beta1/gen-doc/api.md). 12 | 13 | ## Update API and generate documents 14 | 15 | When you want to edit the API, please only edit the corresponding `api.proto` and generate other files from it: 16 | 17 | - [v1beta1/api.proto](./v1beta1/api.proto) for v1beta1. 18 | 19 | We use [protoc-gen-doc](https://github.com/pseudomuto/protoc-gen-doc) to 20 | generate the API docs from `api.proto`. 21 | 22 | Run `build.sh` to update every file from `api.proto` and generate the docs: 23 | 24 | - [v1beta1/build.sh](./v1beta1/build.sh) for v1beta1. 25 | -------------------------------------------------------------------------------- /pkg/apis/manager/health/buf.gen.yaml: -------------------------------------------------------------------------------- 1 | version: v2 2 | plugins: 3 | - remote: buf.build/protocolbuffers/go:v1.33.0 4 | out: . 5 | opt: module=github.com/kubeflow/katib/pkg/apis/manager/health 6 | 7 | - remote: buf.build/grpc/go:v1.3.0 8 | out: . 9 | opt: module=github.com/kubeflow/katib/pkg/apis/manager/health,require_unimplemented_servers=false 10 | 11 | - remote: buf.build/protocolbuffers/python:v26.1 12 | out: python 13 | 14 | - remote: buf.build/protocolbuffers/pyi:v26.1 15 | out: python 16 | 17 | - remote: buf.build/grpc/python:v1.64.1 18 | out: python 19 | 20 | inputs: 21 | - directory: . 22 | -------------------------------------------------------------------------------- /pkg/apis/manager/health/health.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package grpc.health.v1; 4 | 5 | option go_package = "github.com/kubeflow/katib/pkg/apis/manager/health;grpc_health_v1"; 6 | 7 | service Health { 8 | rpc Check(HealthCheckRequest) returns (HealthCheckResponse); 9 | } 10 | 11 | message HealthCheckRequest { 12 | string service = 1; 13 | } 14 | 15 | message HealthCheckResponse { 16 | enum ServingStatus { 17 | UNKNOWN = 0; 18 | SERVING = 1; 19 | NOT_SERVING = 2; 20 | } 21 | ServingStatus status = 1; 22 | } 23 | -------------------------------------------------------------------------------- /pkg/apis/manager/v1beta1/buf.gen.yaml: -------------------------------------------------------------------------------- 1 | version: v2 2 | plugins: 3 | - remote: buf.build/protocolbuffers/go:v1.33.0 4 | out: . 5 | opt: module=github.com/kubeflow/katib/pkg/apis/manager/v1beta1 6 | 7 | - remote: buf.build/grpc/go:v1.3.0 8 | out: . 9 | opt: module=github.com/kubeflow/katib/pkg/apis/manager/v1beta1,require_unimplemented_servers=false 10 | 11 | - remote: buf.build/protocolbuffers/python:v26.1 12 | out: python 13 | 14 | - remote: buf.build/protocolbuffers/pyi:v26.1 15 | out: python 16 | 17 | - remote: buf.build/grpc/python:v1.64.1 18 | out: python 19 | 20 | inputs: 21 | - directory: . 22 | -------------------------------------------------------------------------------- /pkg/apis/manager/v1beta1/gen-doc/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM pseudomuto/protoc-gen-doc 2 | RUN apk add --no-cache curl && \ 3 | mkdir -p /protobuf/google/protobuf && \ 4 | for f in any duration descriptor empty struct timestamp wrappers; do \ 5 | curl -L -o /protobuf/google/protobuf/${f}.proto https://raw.githubusercontent.com/google/protobuf/master/src/google/protobuf/${f}.proto; \ 6 | done && \ 7 | mkdir -p /protobuf/google/api && \ 8 | for f in annotations http; do \ 9 | curl -L -o /protobuf/google/api/${f}.proto https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/master/third_party/googleapis/google/api/${f}.proto; \ 10 | done && \ 11 | mkdir -p /protobuf/github.com/gogo/protobuf/gogoproto && \ 12 | curl -L -o /protobuf/github.com/gogo/protobuf/gogoproto/gogo.proto https://raw.githubusercontent.com/gogo/protobuf/master/gogoproto/gogo.proto && \ 13 | mkdir -p /protobuf/github.com/mwitkow/go-proto-validators && \ 14 | curl -L -o /protobuf/github.com/mwitkow/go-proto-validators/validator.proto https://raw.githubusercontent.com/mwitkow/go-proto-validators/master/validator.proto && \ 15 | apk del --purge curl 16 | -------------------------------------------------------------------------------- /pkg/client/controller/clientset/versioned/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated fake clientset. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/controller/clientset/versioned/scheme/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package contains the scheme of the automatically generated clientset. 20 | package scheme 21 | -------------------------------------------------------------------------------- /pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated typed clients. 20 | package v1beta1 21 | -------------------------------------------------------------------------------- /pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // Package fake has the automatically generated clients. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package v1beta1 20 | 21 | type ExperimentExpansion interface{} 22 | -------------------------------------------------------------------------------- /pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated typed clients. 20 | package v1beta1 21 | -------------------------------------------------------------------------------- /pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // Package fake has the automatically generated clients. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package v1beta1 20 | 21 | type SuggestionExpansion interface{} 22 | -------------------------------------------------------------------------------- /pkg/client/controller/clientset/versioned/typed/trials/v1beta1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated typed clients. 20 | package v1beta1 21 | -------------------------------------------------------------------------------- /pkg/client/controller/clientset/versioned/typed/trials/v1beta1/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // Package fake has the automatically generated clients. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/controller/clientset/versioned/typed/trials/v1beta1/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package v1beta1 20 | 21 | type TrialExpansion interface{} 22 | -------------------------------------------------------------------------------- /pkg/client/controller/listers/experiments/v1beta1/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1beta1 20 | 21 | // ExperimentListerExpansion allows custom methods to be added to 22 | // ExperimentLister. 23 | type ExperimentListerExpansion interface{} 24 | 25 | // ExperimentNamespaceListerExpansion allows custom methods to be added to 26 | // ExperimentNamespaceLister. 27 | type ExperimentNamespaceListerExpansion interface{} 28 | -------------------------------------------------------------------------------- /pkg/client/controller/listers/suggestions/v1beta1/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1beta1 20 | 21 | // SuggestionListerExpansion allows custom methods to be added to 22 | // SuggestionLister. 23 | type SuggestionListerExpansion interface{} 24 | 25 | // SuggestionNamespaceListerExpansion allows custom methods to be added to 26 | // SuggestionNamespaceLister. 27 | type SuggestionNamespaceListerExpansion interface{} 28 | -------------------------------------------------------------------------------- /pkg/client/controller/listers/trials/v1beta1/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1beta1 20 | 21 | // TrialListerExpansion allows custom methods to be added to 22 | // TrialLister. 23 | type TrialListerExpansion interface{} 24 | 25 | // TrialNamespaceListerExpansion allows custom methods to be added to 26 | // TrialNamespaceLister. 27 | type TrialNamespaceListerExpansion interface{} 28 | -------------------------------------------------------------------------------- /pkg/controller.v1beta1/add_experiment.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package controller 18 | 19 | import ( 20 | "github.com/kubeflow/katib/pkg/controller.v1beta1/experiment" 21 | ) 22 | 23 | func init() { 24 | // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. 25 | AddToManagerFuncs = append(AddToManagerFuncs, experiment.Add) 26 | } 27 | -------------------------------------------------------------------------------- /pkg/controller.v1beta1/add_suggestion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package controller 18 | 19 | import ( 20 | "github.com/kubeflow/katib/pkg/controller.v1beta1/suggestion" 21 | ) 22 | 23 | func init() { 24 | // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. 25 | AddToManagerFuncs = append(AddToManagerFuncs, suggestion.Add) 26 | } 27 | -------------------------------------------------------------------------------- /pkg/controller.v1beta1/add_trial.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package controller 18 | 19 | import ( 20 | "github.com/kubeflow/katib/pkg/controller.v1beta1/trial" 21 | ) 22 | 23 | func init() { 24 | // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. 25 | AddToManagerFuncs = append(AddToManagerFuncs, trial.Add) 26 | } 27 | -------------------------------------------------------------------------------- /pkg/controller.v1beta1/controller.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package controller 18 | 19 | import ( 20 | "sigs.k8s.io/controller-runtime/pkg/manager" 21 | ) 22 | 23 | // AddToManagerFuncs is a list of functions to add all Controllers to the Manager 24 | var AddToManagerFuncs []func(manager.Manager) error 25 | 26 | // AddToManager adds all Controllers to the Manager 27 | func AddToManager(m manager.Manager) error { 28 | for _, f := range AddToManagerFuncs { 29 | if err := f(m); err != nil { 30 | return err 31 | } 32 | } 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /pkg/db/v1beta1/common/kdb.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package common 18 | 19 | import ( 20 | v1beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" 21 | ) 22 | 23 | type KatibDBInterface interface { 24 | DBInit() 25 | SelectOne() error 26 | 27 | RegisterObservationLog(trialName string, observationLog *v1beta1.ObservationLog) error 28 | GetObservationLog(trialName string, metricName string, startTime string, endTime string) (*v1beta1.ObservationLog, error) 29 | DeleteObservationLog(trialName string) error 30 | } 31 | -------------------------------------------------------------------------------- /pkg/earlystopping/v1beta1/medianstop/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/earlystopping/v1beta1/medianstop/__init__.py -------------------------------------------------------------------------------- /pkg/metricscollector/v1beta1/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/metricscollector/v1beta1/common/__init__.py -------------------------------------------------------------------------------- /pkg/metricscollector/v1beta1/tfevent-metricscollector/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/metricscollector/v1beta1/tfevent-metricscollector/__init__.py -------------------------------------------------------------------------------- /pkg/suggestion/v1beta1/hyperband/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/suggestion/v1beta1/hyperband/__init__.py -------------------------------------------------------------------------------- /pkg/suggestion/v1beta1/hyperopt/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/suggestion/v1beta1/hyperopt/__init__.py -------------------------------------------------------------------------------- /pkg/suggestion/v1beta1/internal/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/suggestion/v1beta1/internal/__init__.py -------------------------------------------------------------------------------- /pkg/suggestion/v1beta1/internal/constant.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Kubeflow Authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | MAX_GOAL = "MAXIMIZE" 16 | MIN_GOAL = "MINIMIZE" 17 | 18 | INTEGER = "INTEGER" 19 | DOUBLE = "DOUBLE" 20 | CATEGORICAL = "CATEGORICAL" 21 | DISCRETE = "DISCRETE" 22 | 23 | UNIFORM = "UNIFORM" 24 | LOG_UNIFORM = "LOG_UNIFORM" 25 | NORMAL = "NORMAL" 26 | LOG_NORMAL = "LOG_NORMAL" 27 | -------------------------------------------------------------------------------- /pkg/suggestion/v1beta1/nas/darts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/suggestion/v1beta1/nas/darts/__init__.py -------------------------------------------------------------------------------- /pkg/suggestion/v1beta1/nas/enas/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/suggestion/v1beta1/nas/enas/__init__.py -------------------------------------------------------------------------------- /pkg/suggestion/v1beta1/nas/enas/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/suggestion/v1beta1/nas/enas/example.png -------------------------------------------------------------------------------- /pkg/suggestion/v1beta1/pbt/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/suggestion/v1beta1/pbt/__init__.py -------------------------------------------------------------------------------- /pkg/suggestion/v1beta1/skopt/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/suggestion/v1beta1/skopt/__init__.py -------------------------------------------------------------------------------- /pkg/ui/v1beta1/OWNERS: -------------------------------------------------------------------------------- 1 | approvers: 2 | - kimwnasptd 3 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | 48 | # Rok files 49 | **/browse-in-rok* 50 | 51 | # Font files (automatically generating) 52 | /src/assets/fonts 53 | 54 | # Cypress 55 | cypress/screenshots 56 | cypress/downloads 57 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/.prettierrc.yaml: -------------------------------------------------------------------------------- 1 | singleQuote: true 2 | printWidth: 80 3 | trailingComma: all 4 | tabWidth: 2 5 | arrowParens: avoid 6 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/COMMIT: -------------------------------------------------------------------------------- 1 | 78969ee82 2 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/cypress.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'cypress'; 2 | 3 | export default defineConfig({ 4 | video: false, 5 | e2e: { 6 | setupNodeEvents(on, config) {}, 7 | baseUrl: 'http://localhost:4200', 8 | }, 9 | }); 10 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/cypress/e2e/form-page.cy.ts: -------------------------------------------------------------------------------- 1 | describe('New Experiment form page', () => { 2 | beforeEach(() => { 3 | cy.mockDashboardRequest(); 4 | cy.mockTrialTemplate(); 5 | }); 6 | 7 | it('New Experiment form page loads template without errors', () => { 8 | cy.visit('/new'); 9 | cy.wait(['@mockDashboardRequest', '@mockTrialTemplate']); 10 | 11 | // after fetching the data the page should not have an error snackbar 12 | cy.get('[data-cy-snack-status=ERROR]').should('not.exist'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/cypress/fixtures/namespaces.json: -------------------------------------------------------------------------------- 1 | { 2 | "namespaces": [ 3 | "auth", 4 | "cert-manager", 5 | "default", 6 | "kube-node-lease", 7 | "kube-public", 8 | "kube-system", 9 | "kubeflow", 10 | "kubeflow-user" 11 | ], 12 | "status": 200, 13 | "success": true, 14 | "user": null 15 | } 16 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/cypress/fixtures/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "namespace": "kubeflow-user" 3 | } 4 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/cypress/support/commands.ts: -------------------------------------------------------------------------------- 1 | Cypress.Commands.add('mockDashboardRequest', () => { 2 | cy.intercept('GET', '/dashboard_lib.bundle.js', { body: [] }).as( 3 | 'mockDashboardRequest', 4 | ); 5 | }); 6 | 7 | Cypress.Commands.add('mockNamespacesRequest', () => { 8 | cy.intercept('GET', '/katib/fetch_namespaces', { 9 | fixture: 'namespaces', 10 | }).as('mockNamespacesRequest'); 11 | }); 12 | 13 | Cypress.Commands.add('mockExperimentsRequest', namespace => { 14 | cy.intercept( 15 | 'GET', 16 | `katib/fetch_experiments/?namespace=${namespace}`, 17 | { 18 | fixture: 'experiments', 19 | }, 20 | ).as('mockExperimentsRequest'); 21 | }); 22 | 23 | Cypress.Commands.add('mockTrialTemplate', () => { 24 | cy.intercept('GET', `/katib/fetch_trial_templates/`, { 25 | fixture: 'trial-template', 26 | }).as('mockTrialTemplate'); 27 | }); 28 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/cypress/support/e2e.ts: -------------------------------------------------------------------------------- 1 | import './commands'; 2 | 3 | // types of the custom commands 4 | // Must be declared global to be detected by typescript (allows import/export) 5 | declare global { 6 | namespace Cypress { 7 | interface Chainable { 8 | /** 9 | * Custom command to mock request at '/dashboard_lib.bundle.js' 10 | */ 11 | mockDashboardRequest(): Chainable; 12 | 13 | /** 14 | * Custom command to mock request at '/katib/fetch_namespaces' 15 | */ 16 | mockNamespacesRequest(): Chainable; 17 | 18 | /** 19 | * Custom command to mock request at 'katib/fetch_namespaced_experiments/?namespace=' 20 | * and return an array with mock Experiments [] 21 | */ 22 | mockExperimentsRequest(namespace: string): Chainable; 23 | 24 | /** 25 | * Custom command to mock request at '/katib/fetch_trial_templates' 26 | */ 27 | mockTrialTemplate(): Chainable; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/proxy.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "/katib/*": { 3 | "target": "http://localhost:8000", 4 | "secure": false, 5 | "logLevel": "debug", 6 | "changeOrigin": true 7 | }, 8 | "/static": { 9 | "target": "http://localhost:4200", 10 | "pathRewrite": { "^/static": "" }, 11 | "secure": false 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/scripts/check-format-error.js: -------------------------------------------------------------------------------- 1 | console.error(); 2 | console.error('-----------------------------------------------'); 3 | console.error('Please run `npm run format:write` to format your code.'); 4 | console.error('-----------------------------------------------'); 5 | console.error(); 6 | process.exit(1); 7 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { ExperimentsComponent } from './pages/experiments/experiments.component'; 4 | import { ExperimentDetailsComponent } from './pages/experiment-details/experiment-details.component'; 5 | import { ExperimentCreationComponent } from './pages/experiment-creation/experiment-creation.component'; 6 | import { TrialDetailsComponent } from './pages/experiment-details/trials-table/trial-details/trial-details.component'; 7 | 8 | const routes: Routes = [ 9 | { path: '', component: ExperimentsComponent }, 10 | { 11 | path: 'experiment/:namespace/:experimentName', 12 | component: ExperimentDetailsComponent, 13 | }, 14 | { path: 'new', component: ExperimentCreationComponent }, 15 | { 16 | path: 'experiment/:experimentName/trial/:trialName', 17 | component: TrialDetailsComponent, 18 | }, 19 | ]; 20 | 21 | @NgModule({ 22 | imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })], 23 | exports: [RouterModule], 24 | }) 25 | export class AppRoutingModule {} 26 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, waitForAsync } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | import { BrowserModule } from '@angular/platform-browser'; 4 | import { AppRoutingModule } from './app-routing.module'; 5 | 6 | describe('AppComponent', () => { 7 | beforeEach( 8 | waitForAsync(() => { 9 | TestBed.configureTestingModule({ 10 | imports: [BrowserModule, AppRoutingModule], 11 | declarations: [AppComponent], 12 | }).compileComponents(); 13 | }), 14 | ); 15 | 16 | it('should create the app', () => { 17 | const fixture = TestBed.createComponent(AppComponent); 18 | const app = fixture.debugElement.componentInstance; 19 | expect(app).toBeTruthy(); 20 | }); 21 | 22 | it(`should have as title 'frontend'`, () => { 23 | const fixture = TestBed.createComponent(AppComponent); 24 | const app = fixture.debugElement.componentInstance; 25 | expect(app.title).toEqual('frontend'); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { environment } from '@app/environment'; 3 | import { MatIconRegistry } from '@angular/material/icon'; 4 | import { DomSanitizer } from '@angular/platform-browser'; 5 | 6 | @Component({ 7 | selector: 'app-root', 8 | templateUrl: './app.component.html', 9 | }) 10 | export class AppComponent { 11 | constructor( 12 | private matIconRegistry: MatIconRegistry, 13 | private domSanitizer: DomSanitizer, 14 | ) { 15 | this.matIconRegistry.addSvgIcon( 16 | `pipeline-centered`, 17 | domSanitizer.bypassSecurityTrustResourceUrl( 18 | `${ 19 | this.env.production 20 | ? '/katib/static/assets/pipeline-centered.svg' 21 | : '/assets/pipeline-centered.svg' 22 | }`, 23 | ), 24 | ); 25 | } 26 | 27 | title = 'frontend'; 28 | 29 | env = environment; 30 | } 31 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/constants/algorithms-types.const.ts: -------------------------------------------------------------------------------- 1 | import { 2 | AlgorithmsEnum, 3 | EarlyStoppingAlgorithmsEnum, 4 | } from '../enumerations/algorithms.enum'; 5 | 6 | export const AlgorithmNames = { 7 | [AlgorithmsEnum.GRID]: 'Grid', 8 | [AlgorithmsEnum.RANDOM]: 'Random', 9 | [AlgorithmsEnum.HYPERBAND]: 'Hyperband', 10 | [AlgorithmsEnum.BAYESIAN_OPTIMIZATION]: 'Bayesian Optimization', 11 | [AlgorithmsEnum.TPE]: 'Tree of Parzen Estimators', 12 | [AlgorithmsEnum.MULTIVARIATE_TPE]: 'Multivariate Tree of Parzen Estimators', 13 | [AlgorithmsEnum.CMAES]: 'Covariance Matrix Adaptation: Evolution Strategy', 14 | [AlgorithmsEnum.SOBOL]: 'Sobol Quasirandom Sequence', 15 | [AlgorithmsEnum.PBT]: 'Population Based Training', 16 | }; 17 | 18 | export const NasAlgorithmNames = { 19 | [AlgorithmsEnum.ENAS]: 'Efficient Neural Architecture Search', 20 | [AlgorithmsEnum.DARTS]: 'Differentiable Architecture Search', 21 | }; 22 | 23 | export const EarlyStoppingAlgorithmNames = { 24 | [EarlyStoppingAlgorithmsEnum.NONE]: 'None', 25 | [EarlyStoppingAlgorithmsEnum.MEDIAN]: 'Median Stopping Rule', 26 | }; 27 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/constants/objective-types.const.ts: -------------------------------------------------------------------------------- 1 | import { ObjectiveTypeEnum } from '../enumerations/objective-type.enum'; 2 | 3 | export const ObjectiveTypes = { 4 | [ObjectiveTypeEnum.minimize]: 'Minimize', 5 | [ObjectiveTypeEnum.maximize]: 'Maximize', 6 | }; 7 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/enumerations/algorithms.enum.ts: -------------------------------------------------------------------------------- 1 | export enum AlgorithmsEnum { 2 | GRID = 'grid', 3 | RANDOM = 'random', 4 | HYPERBAND = 'hyperband', 5 | BAYESIAN_OPTIMIZATION = 'bayesianoptimization', 6 | TPE = 'tpe', 7 | MULTIVARIATE_TPE = 'multivariate-tpe', 8 | CMAES = 'cmaes', 9 | SOBOL = 'sobol', 10 | ENAS = 'enas', 11 | DARTS = 'darts', 12 | PBT = 'pbt', 13 | } 14 | 15 | export enum EarlyStoppingAlgorithmsEnum { 16 | NONE = 'none', 17 | MEDIAN = 'medianstop', 18 | } 19 | 20 | export enum AlgorithmSettingType { 21 | STRING = 'string', 22 | INTEGER = 'integer', 23 | FLOAT = 'float', 24 | } 25 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/enumerations/metrics-collector.ts: -------------------------------------------------------------------------------- 1 | export enum CollectorKind { 2 | STDOUT = 'StdOut', 3 | FILE = 'File', 4 | TFEVENT = 'TensorFlowEvent', 5 | PROMETHEUS = 'PrometheusMetric', 6 | CUSTOM = 'Custom', 7 | PUSH = 'Push', 8 | } 9 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/enumerations/objective-type.enum.ts: -------------------------------------------------------------------------------- 1 | export enum ObjectiveTypeEnum { 2 | minimize = 'minimize', 3 | maximize = 'maximize', 4 | } 5 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/enumerations/status.enum.ts: -------------------------------------------------------------------------------- 1 | export enum StatusEnum { 2 | SUCCEEDED = 'Succeeded', 3 | RUNNING = 'Running', 4 | FAILED = 'Failed', 5 | RESTARTING = 'Restarting', 6 | CREATED = 'Created', 7 | } 8 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/models/trial-templates.model.ts: -------------------------------------------------------------------------------- 1 | export interface ConfigMapTemplateResponse { 2 | Path: 'string'; 3 | Yaml: 'string'; 4 | } 5 | 6 | export interface ConfigMapBody { 7 | ConfigMapName: string; 8 | Templates: ConfigMapTemplateResponse[]; 9 | } 10 | 11 | export interface ConfigMapResponse { 12 | ConfigMapNamespace: string; 13 | ConfigMaps: ConfigMapBody[]; 14 | } 15 | 16 | export interface TrialTemplateResponse { 17 | Data: ConfigMapResponse[]; 18 | } 19 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/algorithm/algorithm.component.scss: -------------------------------------------------------------------------------- 1 | .algo-options-group { 2 | * { 3 | margin-bottom: 12px; 4 | margin-right: 8px; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/algorithm/algorithm.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormAlgorithmComponent } from './algorithm.component'; 4 | import { FormModule } from 'kubeflow'; 5 | 6 | import { MatIconModule } from '@angular/material/icon'; 7 | import { MatRadioModule } from '@angular/material/radio'; 8 | import { FormAlgorithmSettingComponent } from './setting/setting.component'; 9 | 10 | @NgModule({ 11 | declarations: [FormAlgorithmComponent, FormAlgorithmSettingComponent], 12 | imports: [CommonModule, FormModule, MatIconModule, MatRadioModule], 13 | exports: [FormAlgorithmComponent, FormAlgorithmSettingComponent], 14 | }) 15 | export class FormAlgorithmModule {} 16 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/algorithm/setting/setting.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/algorithm/setting/setting.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { FormGroup } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-algorithm-setting', 6 | templateUrl: './setting.component.html', 7 | styleUrls: ['./setting.component.scss'], 8 | }) 9 | export class FormAlgorithmSettingComponent { 10 | @Input() setting: FormGroup; 11 | } 12 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/early-stopping/early-stopping.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/early-stopping/early-stopping.component.scss -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/early-stopping/early-stopping.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { EarlyStoppingComponent } from './early-stopping.component'; 4 | import { FormModule } from 'kubeflow'; 5 | import { FormAlgorithmModule } from '../algorithm/algorithm.module'; 6 | 7 | @NgModule({ 8 | declarations: [EarlyStoppingComponent], 9 | imports: [CommonModule, FormModule, FormAlgorithmModule], 10 | exports: [EarlyStoppingComponent], 11 | }) 12 | export class FormEarlyStoppingModule {} 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/experiment-creation.component.scss: -------------------------------------------------------------------------------- 1 | .form-body { 2 | max-width: 600px; 3 | } 4 | 5 | .step-info { 6 | display: flex; 7 | flex-direction: column; 8 | } 9 | 10 | .step-wrapper { 11 | display: flex; 12 | 13 | > .step-info-wrapper { 14 | margin-left: auto; 15 | width: 30%; 16 | } 17 | 18 | > .step-content { 19 | max-width: 600px; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/hyper-parameters/hyper-parameters.component.html: -------------------------------------------------------------------------------- 1 |
2 | There are {{ combinations }} different combinations from these Hyper 3 | Parameters. 4 |
5 | 6 |
7 | 10 | 11 | 12 | The Hyper Parameters will be used to construct the optimization 13 | search space. Katib will be generating Trials to test different 14 | combinations of these parameters in order to find the optimal set. 15 | 16 |
17 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/hyper-parameters/hyper-parameters.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/hyper-parameters/hyper-parameters.component.scss -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/hyper-parameters/hyper-parameters.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { MatIconModule } from '@angular/material/icon'; 5 | import { MatDividerModule } from '@angular/material/divider'; 6 | import { MatRadioModule } from '@angular/material/radio'; 7 | 8 | import { FormModule, PopoverModule, DetailsListModule } from 'kubeflow'; 9 | 10 | import { FormHyperParametersComponent } from './hyper-parameters.component'; 11 | import { ParamsListModule } from 'src/app/shared/params-list/params-list.module'; 12 | 13 | @NgModule({ 14 | declarations: [FormHyperParametersComponent], 15 | imports: [ 16 | CommonModule, 17 | FormModule, 18 | MatIconModule, 19 | MatDividerModule, 20 | MatRadioModule, 21 | PopoverModule, 22 | DetailsListModule, 23 | ParamsListModule, 24 | ], 25 | exports: [FormHyperParametersComponent], 26 | }) 27 | export class FormHyperParametersModule {} 28 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metadata/metadata.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | Name 5 | 6 | 7 | 8 | 9 | Namespace 10 | 11 | 12 |
13 | 14 |
15 | 16 | The name of the Experiment CR that will be submitted in the Kubernetes 17 | Cluster. It must be DNS1123 compliant. 18 | 19 |
20 |
21 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metadata/metadata.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metadata/metadata.component.scss -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metadata/metadata.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, OnInit, OnDestroy } from '@angular/core'; 2 | import { FormGroup } from '@angular/forms'; 3 | import { NamespaceService } from 'kubeflow'; 4 | import { Subscription } from 'rxjs'; 5 | 6 | @Component({ 7 | selector: 'app-form-metadata', 8 | templateUrl: './metadata.component.html', 9 | styleUrls: ['./metadata.component.scss'], 10 | }) 11 | export class FormMetadataComponent implements OnInit, OnDestroy { 12 | @Input() 13 | metadataForm: FormGroup; 14 | sub: Subscription; 15 | 16 | constructor(private ns: NamespaceService) {} 17 | 18 | ngOnInit() { 19 | this.metadataForm.get('namespace').disable(); 20 | 21 | this.sub = this.ns.getSelectedNamespace().subscribe(namespace => { 22 | this.metadataForm.get('namespace').enable(); 23 | this.metadataForm.get('namespace').setValue(namespace); 24 | this.metadataForm.get('namespace').disable(); 25 | }); 26 | } 27 | 28 | ngOnDestroy() { 29 | this.sub.unsubscribe(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metadata/metadata.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormMetadataComponent } from './metadata.component'; 4 | import { FormModule } from 'kubeflow'; 5 | 6 | @NgModule({ 7 | declarations: [FormMetadataComponent], 8 | imports: [CommonModule, FormModule], 9 | exports: [FormMetadataComponent], 10 | }) 11 | export class FormMetadataModule {} 12 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metrics-collector/metrics-collector.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metrics-collector/metrics-collector.component.scss -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metrics-collector/metrics-collector.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, Input } from '@angular/core'; 2 | import { FormGroup } from '@angular/forms'; 3 | import { CollectorKind } from 'src/app/enumerations/metrics-collector'; 4 | 5 | @Component({ 6 | selector: 'app-form-metrics-collector', 7 | templateUrl: './metrics-collector.component.html', 8 | styleUrls: ['./metrics-collector.component.scss'], 9 | }) 10 | export class FormMetricsCollectorComponent implements OnInit { 11 | @Input() formGroup: FormGroup; 12 | kind = CollectorKind; 13 | customYaml: string; 14 | 15 | constructor() {} 16 | 17 | ngOnInit() { 18 | this.customYaml = this.formGroup.get('customYaml').value; 19 | } 20 | 21 | onTextChange() { 22 | this.formGroup.patchValue({ customYaml: this.customYaml }); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metrics-collector/metrics-collector.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormMetricsCollectorComponent } from './metrics-collector.component'; 4 | import { FormModule, EditorModule } from 'kubeflow'; 5 | import { ListKeyValueModule } from 'src/app/shared/list-key-value/list-key-value.module'; 6 | 7 | @NgModule({ 8 | declarations: [FormMetricsCollectorComponent], 9 | imports: [CommonModule, FormModule, ListKeyValueModule, EditorModule], 10 | exports: [FormMetricsCollectorComponent], 11 | }) 12 | export class FormMetricsCollectorModule {} 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/nas-graph/nas-graph.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/nas-graph/nas-graph.component.scss -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/nas-graph/nas-graph.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { FormGroup } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-form-nas-graph', 6 | templateUrl: './nas-graph.component.html', 7 | styleUrls: ['./nas-graph.component.scss'], 8 | }) 9 | export class FormNasGraphComponent { 10 | @Input() formGroup: FormGroup; 11 | } 12 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/nas-graph/nas-graph.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormNasGraphComponent } from './nas-graph.component'; 4 | import { FormModule } from 'kubeflow'; 5 | import { ListInputModule } from 'src/app/shared/list-input/list-input.module'; 6 | 7 | @NgModule({ 8 | declarations: [FormNasGraphComponent], 9 | imports: [CommonModule, FormModule, ListInputModule], 10 | exports: [FormNasGraphComponent], 11 | }) 12 | export class FormNasGraphModule {} 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/nas-operations/nas-operations.component.scss: -------------------------------------------------------------------------------- 1 | .add-btn { 2 | margin-bottom: 12px; 3 | } 4 | 5 | .divider { 6 | min-width: 400px; 7 | margin-top: 16px; 8 | margin-bottom: 24px; 9 | } 10 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/nas-operations/nas-operations.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, Input } from '@angular/core'; 2 | import { FormArray } from '@angular/forms'; 3 | import { createNasOperationGroup } from 'src/app/shared/utils'; 4 | 5 | @Component({ 6 | selector: 'app-form-nas-operations', 7 | templateUrl: './nas-operations.component.html', 8 | styleUrls: ['./nas-operations.component.scss'], 9 | }) 10 | export class FormNasOperationsComponent { 11 | @Input() formArray: FormArray; 12 | 13 | constructor() {} 14 | 15 | addCtrl() { 16 | this.formArray.push( 17 | createNasOperationGroup({ 18 | operationType: '', 19 | parameters: [], 20 | }), 21 | ); 22 | } 23 | 24 | removeCtrl(i) { 25 | this.formArray.removeAt(i); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/nas-operations/nas-operations.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormNasOperationsComponent } from './nas-operations.component'; 4 | import { OperationComponent } from './operation/operation.component'; 5 | import { FormModule } from 'kubeflow'; 6 | import { ParamsListModule } from 'src/app/shared/params-list/params-list.module'; 7 | import { MatDividerModule } from '@angular/material/divider'; 8 | 9 | @NgModule({ 10 | declarations: [FormNasOperationsComponent, OperationComponent], 11 | imports: [CommonModule, FormModule, ParamsListModule, MatDividerModule], 12 | exports: [FormNasOperationsComponent], 13 | }) 14 | export class FormNasOperationsModule {} 15 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/nas-operations/operation/operation.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | Operation Type 4 | 5 | 14 | 15 | 16 | 19 |
20 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/nas-operations/operation/operation.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/nas-operations/operation/operation.component.scss -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/nas-operations/operation/operation.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | import { FormGroup } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-nas-operation', 6 | templateUrl: './operation.component.html', 7 | styleUrls: ['./operation.component.scss'], 8 | }) 9 | export class OperationComponent { 10 | @Input() formGroup: FormGroup; 11 | @Output() removeCtrl = new EventEmitter(); 12 | } 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/objective/objective.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/objective/objective.component.scss -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/objective/objective.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormObjectiveComponent } from './objective.component'; 4 | import { FormModule } from 'kubeflow'; 5 | import { MatIconModule } from '@angular/material/icon'; 6 | import { ListInputModule } from 'src/app/shared/list-input/list-input.module'; 7 | import { MatDividerModule } from '@angular/material/divider'; 8 | import { MatSlideToggleModule } from '@angular/material/slide-toggle'; 9 | import { MatCheckboxModule } from '@angular/material/checkbox'; 10 | 11 | @NgModule({ 12 | declarations: [FormObjectiveComponent], 13 | imports: [ 14 | CommonModule, 15 | FormModule, 16 | MatIconModule, 17 | ListInputModule, 18 | MatDividerModule, 19 | MatCheckboxModule, 20 | ], 21 | exports: [FormObjectiveComponent], 22 | }) 23 | export class FormObjectiveModule {} 24 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/trial-template/trial-parameter/trial-parameter.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | Name 4 | 5 | info 6 | 7 | 8 | 9 | Reference 10 | 11 | Parameter to substitute with 12 | 13 |
14 | 15 | 16 | 17 | Description 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/trial-template/trial-parameter/trial-parameter.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | 5 | .desc-input { 6 | width: 300px; 7 | } 8 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/trial-template/trial-parameter/trial-parameter.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { FormGroup } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-trial-parameter', 6 | templateUrl: './trial-parameter.component.html', 7 | styleUrls: ['./trial-parameter.component.scss'], 8 | }) 9 | export class TrialParameterComponent { 10 | @Input() formGroup: FormGroup; 11 | } 12 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/trial-template/trial-template.component.scss: -------------------------------------------------------------------------------- 1 | .margin-bottom { 2 | margin-bottom: 12px; 3 | } 4 | 5 | .margin-top { 6 | margin-top: 12px; 7 | } 8 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/trial-template/trial-template.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { MatDividerModule } from '@angular/material/divider'; 4 | 5 | import { FormTrialTemplateComponent } from './trial-template.component'; 6 | import { FormModule, PopoverModule, EditorModule } from 'kubeflow'; 7 | import { ListKeyValueModule } from 'src/app/shared/list-key-value/list-key-value.module'; 8 | import { TrialParameterComponent } from './trial-parameter/trial-parameter.component'; 9 | 10 | @NgModule({ 11 | declarations: [FormTrialTemplateComponent, TrialParameterComponent], 12 | imports: [ 13 | CommonModule, 14 | FormModule, 15 | ListKeyValueModule, 16 | MatDividerModule, 17 | PopoverModule, 18 | EditorModule, 19 | ], 20 | exports: [FormTrialTemplateComponent], 21 | }) 22 | export class FormTrialTemplateModule {} 23 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/trial-thresholds/trial-thresholds.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/trial-thresholds/trial-thresholds.component.scss -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/trial-thresholds/trial-thresholds.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { FormGroup } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-form-trial-thresholds', 6 | templateUrl: './trial-thresholds.component.html', 7 | styleUrls: ['./trial-thresholds.component.scss'], 8 | }) 9 | export class FormTrialThresholdsComponent { 10 | @Input() 11 | formGroup: FormGroup; 12 | } 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/trial-thresholds/trial-thresholds.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormTrialThresholdsComponent } from './trial-thresholds.component'; 4 | import { FormModule } from 'kubeflow'; 5 | 6 | @NgModule({ 7 | declarations: [FormTrialThresholdsComponent], 8 | imports: [CommonModule, FormModule], 9 | exports: [FormTrialThresholdsComponent], 10 | }) 11 | export class FormTrialThresholdsModule {} 12 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/yaml-modal/yaml-modal.component.html: -------------------------------------------------------------------------------- 1 |

Edit YAML

2 | 3 |
4 | 11 |
12 | 13 |
14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/yaml-modal/yaml-modal.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/yaml-modal/yaml-modal.component.scss -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/yaml-modal/yaml-modal.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { YamlModalComponent } from './yaml-modal.component'; 4 | import { MatDialogModule } from '@angular/material/dialog'; 5 | import { FormModule, EditorModule } from 'kubeflow'; 6 | 7 | @NgModule({ 8 | declarations: [YamlModalComponent], 9 | imports: [CommonModule, MatDialogModule, FormModule, EditorModule], 10 | }) 11 | export class YamlModalModule {} 12 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/details/experiment-details-tab.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | overflow: auto; 4 | } 5 | 6 | lib-heading-row { 7 | margin-top: 16px; 8 | } 9 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/details/experiment-details-tab.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { DetailsListModule, HeadingSubheadingRowModule } from 'kubeflow'; 4 | 5 | import { ExperimentDetailsTabComponent } from './experiment-details-tab.component'; 6 | 7 | @NgModule({ 8 | declarations: [ExperimentDetailsTabComponent], 9 | imports: [CommonModule, DetailsListModule, HeadingSubheadingRowModule], 10 | exports: [ExperimentDetailsTabComponent], 11 | }) 12 | export class ExperimentDetailsTabModule {} 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/experiment-details.component.scss: -------------------------------------------------------------------------------- 1 | .panel { 2 | margin: 16px 0; 3 | display: block; 4 | } 5 | 6 | .graph { 7 | margin: 16px 0; 8 | } 9 | 10 | // https://github.com/angular/components/issues/9592 11 | .tab-height-fix { 12 | min-height: calc(100vh - 600px - 52px); 13 | } 14 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/overview/experiment-overview.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { ConditionsTableModule, DetailsListModule } from 'kubeflow'; 4 | 5 | import { ExperimentOverviewComponent } from './experiment-overview.component'; 6 | 7 | @NgModule({ 8 | declarations: [ExperimentOverviewComponent], 9 | imports: [CommonModule, ConditionsTableModule, DetailsListModule], 10 | exports: [ExperimentOverviewComponent], 11 | }) 12 | export class ExperimentOverviewModule {} 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-graph-echarts/trials-graph-echarts.component.html: -------------------------------------------------------------------------------- 1 |
2 |
9 |
10 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-graph-echarts/trials-graph-echarts.component.scss: -------------------------------------------------------------------------------- 1 | .graph-wrapper { 2 | position: relative; 3 | display: flex; 4 | justify-content: center; 5 | align-items: center; 6 | flex-direction: column; 7 | } 8 | 9 | .graph { 10 | width: 400px; 11 | 12 | @media (min-width: 768px) { 13 | width: 700px; 14 | } 15 | 16 | @media (min-width: 1024px) { 17 | width: 1000px; 18 | } 19 | 20 | @media (min-width: 1400px) { 21 | width: 1300px; 22 | } 23 | 24 | @media (min-width: 1650px) { 25 | width: 1600px; 26 | } 27 | 28 | @media (min-width: 2000px) { 29 | width: 1900px; 30 | } 31 | 32 | height: 600px; 33 | } 34 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-graph-echarts/trials-graph-echarts.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; 4 | import { TrialsGraphEchartsComponent } from './trials-graph-echarts.component'; 5 | import { NgxEchartsModule } from 'ngx-echarts'; 6 | 7 | @NgModule({ 8 | declarations: [TrialsGraphEchartsComponent], 9 | imports: [ 10 | CommonModule, 11 | MatProgressSpinnerModule, 12 | NgxEchartsModule.forRoot({ 13 | echarts: () => import('echarts'), 14 | }), 15 | ], 16 | exports: [TrialsGraphEchartsComponent], 17 | }) 18 | export class TrialsGraphEchartsModule {} 19 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/kfp-run/kfp-run.component.html: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/kfp-run/kfp-run.component.scss: -------------------------------------------------------------------------------- 1 | .svg-color-enabled { 2 | color: #1e88e5; 3 | } 4 | 5 | .svg-color-disabled { 6 | color: rgba(0, 0, 0, 0.26); 7 | } 8 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/kfp-run/kfp-run.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | import { MatIconModule } from '@angular/material/icon'; 3 | import { MatIconTestingModule } from '@angular/material/icon/testing'; 4 | 5 | import { KfpRunComponent } from './kfp-run.component'; 6 | 7 | describe('KfpRunComponent', () => { 8 | let component: KfpRunComponent; 9 | let fixture: ComponentFixture; 10 | 11 | beforeEach(async () => { 12 | await TestBed.configureTestingModule({ 13 | imports: [MatIconModule, MatIconTestingModule], 14 | declarations: [KfpRunComponent], 15 | }).compileComponents(); 16 | }); 17 | 18 | beforeEach(() => { 19 | fixture = TestBed.createComponent(KfpRunComponent); 20 | component = fixture.componentInstance; 21 | fixture.detectChanges(); 22 | }); 23 | 24 | it('should create', () => { 25 | expect(component).toBeTruthy(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/kfp-run/kfp-run.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { TableColumnComponent } from 'kubeflow/lib/resource-table/component-value/component-value.component'; 3 | 4 | @Component({ 5 | selector: 'app-kfp-run', 6 | templateUrl: './kfp-run.component.html', 7 | styleUrls: ['./kfp-run.component.scss'], 8 | }) 9 | export class KfpRunComponent implements TableColumnComponent { 10 | constructor() {} 11 | 12 | trialKfpRunUrl: string = ''; 13 | 14 | set element(experiment: any) { 15 | if (experiment?.['kfp run']) { 16 | this.trialKfpRunUrl = `/pipeline/#/runs/details/${experiment['kfp run']}`; 17 | } else { 18 | this.trialKfpRunUrl = ''; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-details.component.scss: -------------------------------------------------------------------------------- 1 | .panel { 2 | margin: 16px 0; 3 | display: block; 4 | } 5 | 6 | .graph-wrapper { 7 | margin: 16px 0; 8 | position: relative; 9 | display: flex; 10 | justify-content: center; 11 | align-items: center; 12 | flex-direction: column; 13 | } 14 | 15 | .graph { 16 | width: 400px; 17 | 18 | @media (min-width: 768px) { 19 | width: 700px; 20 | } 21 | 22 | @media (min-width: 1024px) { 23 | width: 1000px; 24 | } 25 | 26 | @media (min-width: 1400px) { 27 | width: 1300px; 28 | } 29 | 30 | @media (min-width: 1650px) { 31 | width: 1600px; 32 | } 33 | 34 | @media (min-width: 2000px) { 35 | width: 1900px; 36 | } 37 | 38 | height: 600px; 39 | } 40 | 41 | // https://github.com/angular/components/issues/9592 42 | .tab-height-fix { 43 | min-height: calc(100vh - 600px - 52px); 44 | clear: both; 45 | } 46 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-logs/trial-logs.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ logsRequestError }} 5 | 6 | 7 | 8 | 9 | 15 | 16 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-logs/trial-logs.component.scss: -------------------------------------------------------------------------------- 1 | lib-panel { 2 | display: block; 3 | margin-top: 1rem; 4 | } 5 | 6 | .logs-viewer { 7 | margin-bottom: 2rem; 8 | margin-top: 1rem; 9 | } 10 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-logs/trial-logs.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-trial-logs', 5 | templateUrl: './trial-logs.component.html', 6 | styleUrls: ['./trial-logs.component.scss'], 7 | }) 8 | export class TrialLogsComponent { 9 | public logs: string[]; 10 | 11 | @Input() logsRequestError: string; 12 | 13 | @Input() 14 | set trialLogs(trialLogs: string) { 15 | if (!trialLogs) { 16 | return; 17 | } 18 | 19 | this.logs = trialLogs.split('\n'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-logs/trial-logs.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { TrialLogsComponent } from './trial-logs.component'; 4 | import { 5 | HeadingSubheadingRowModule, 6 | KubeflowModule, 7 | LogsViewerModule, 8 | } from 'kubeflow'; 9 | 10 | @NgModule({ 11 | declarations: [TrialLogsComponent], 12 | imports: [ 13 | CommonModule, 14 | KubeflowModule, 15 | HeadingSubheadingRowModule, 16 | LogsViewerModule, 17 | ], 18 | exports: [TrialLogsComponent], 19 | }) 20 | export class TrialLogsModule {} 21 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-overview/metrics/metrics.component.html: -------------------------------------------------------------------------------- 1 | 2 | {{ latest }} 3 | 4 | 5 | 6 | {{ min }} 7 | 8 | 9 | 10 | {{ max }} 11 | 12 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-overview/metrics/metrics.component.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ConditionsTableModule, DetailsListModule } from 'kubeflow'; 3 | import { TrialMetricsComponent } from './metrics.component'; 4 | 5 | @NgModule({ 6 | declarations: [TrialMetricsComponent], 7 | imports: [ConditionsTableModule, DetailsListModule], 8 | exports: [TrialMetricsComponent], 9 | }) 10 | export class TrialMetricsModule {} 11 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-overview/metrics/metrics.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | import { MatSnackBarModule } from '@angular/material/snack-bar'; 3 | import { ConditionsTableModule, DetailsListModule } from 'kubeflow'; 4 | 5 | import { TrialMetricsComponent } from './metrics.component'; 6 | 7 | describe('TrialMetricsComponent', () => { 8 | let component: TrialMetricsComponent; 9 | let fixture: ComponentFixture; 10 | 11 | beforeEach(async(() => { 12 | TestBed.configureTestingModule({ 13 | declarations: [TrialMetricsComponent], 14 | imports: [ConditionsTableModule, DetailsListModule, MatSnackBarModule], 15 | }).compileComponents(); 16 | })); 17 | 18 | beforeEach(() => { 19 | fixture = TestBed.createComponent(TrialMetricsComponent); 20 | component = fixture.componentInstance; 21 | fixture.detectChanges(); 22 | }); 23 | 24 | it('should create', () => { 25 | expect(component).toBeTruthy(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-overview/metrics/metrics.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-metrics-overview', 5 | templateUrl: './metrics.component.html', 6 | }) 7 | export class TrialMetricsComponent { 8 | @Input() name: string; 9 | @Input() latest: string; 10 | @Input() max: string; 11 | @Input() min: string; 12 | } 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-overview/trial-overview.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { 4 | ConditionsTableModule, 5 | DetailsListModule, 6 | HeadingSubheadingRowModule, 7 | } from 'kubeflow'; 8 | import { TrialMetricsModule } from './metrics/metrics.component.module'; 9 | import { TrialOverviewComponent } from './trial-overview.component'; 10 | 11 | @NgModule({ 12 | declarations: [TrialOverviewComponent], 13 | imports: [ 14 | CommonModule, 15 | ConditionsTableModule, 16 | DetailsListModule, 17 | HeadingSubheadingRowModule, 18 | TrialMetricsModule, 19 | ], 20 | exports: [TrialOverviewComponent], 21 | }) 22 | export class TrialOverviewModule {} 23 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-yaml/trial-yaml.component.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-yaml/trial-yaml.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | overflow: auto; 4 | } 5 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-yaml/trial-yaml.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | import { NoopAnimationsModule } from '@angular/platform-browser/animations'; 3 | import { CommonModule } from '@angular/common'; 4 | 5 | import { EditorModule } from 'kubeflow'; 6 | import { TrialYamlComponent } from './trial-yaml.component'; 7 | 8 | describe('TrialYamlComponent', () => { 9 | let component: TrialYamlComponent; 10 | let fixture: ComponentFixture; 11 | 12 | beforeEach( 13 | waitForAsync(() => { 14 | TestBed.configureTestingModule({ 15 | imports: [CommonModule, NoopAnimationsModule, EditorModule], 16 | declarations: [TrialYamlComponent], 17 | }).compileComponents(); 18 | }), 19 | ); 20 | 21 | beforeEach(() => { 22 | fixture = TestBed.createComponent(TrialYamlComponent); 23 | component = fixture.componentInstance; 24 | fixture.detectChanges(); 25 | }); 26 | 27 | it('should create', () => { 28 | expect(component).toBeTruthy(); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-yaml/trial-yaml.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { TrialK8s } from 'src/app/models/trial.k8s.model'; 3 | import { dump } from 'js-yaml'; 4 | 5 | @Component({ 6 | selector: 'app-trial-yaml', 7 | templateUrl: './trial-yaml.component.html', 8 | styleUrls: ['./trial-yaml.component.scss'], 9 | }) 10 | export class TrialYamlComponent { 11 | public yaml = ''; 12 | 13 | @Input() 14 | set trialJson(trial: TrialK8s) { 15 | this.yaml = dump(trial); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trial-details/trial-yaml/trial-yaml.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { TrialYamlComponent } from './trial-yaml.component'; 5 | import { EditorModule } from 'kubeflow'; 6 | 7 | @NgModule({ 8 | declarations: [TrialYamlComponent], 9 | imports: [CommonModule, EditorModule], 10 | exports: [TrialYamlComponent], 11 | }) 12 | export class TrialYamlModule {} 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trials-table.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 8 |
9 |
10 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trials-table.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | min-height: 550px; 4 | } 5 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/trials-table/trials-table.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { MatTableModule } from '@angular/material/table'; 4 | import { MatIconModule } from '@angular/material/icon'; 5 | import { MatDialogModule } from '@angular/material/dialog'; 6 | 7 | import { TrialsTableComponent } from './trials-table.component'; 8 | import { MatTooltipModule } from '@angular/material/tooltip'; 9 | import { MatButtonModule } from '@angular/material/button'; 10 | import { KubeflowModule } from 'kubeflow'; 11 | import { KfpRunComponent } from './kfp-run/kfp-run.component'; 12 | import { TrialDetailsModule } from './trial-details/trial-details.module'; 13 | 14 | @NgModule({ 15 | declarations: [TrialsTableComponent, KfpRunComponent], 16 | imports: [ 17 | CommonModule, 18 | MatTableModule, 19 | MatDialogModule, 20 | MatIconModule, 21 | MatTooltipModule, 22 | MatButtonModule, 23 | KubeflowModule, 24 | TrialDetailsModule, 25 | ], 26 | exports: [TrialsTableComponent], 27 | }) 28 | export class TrialsTableModule {} 29 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/yaml/experiment-yaml.component.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/yaml/experiment-yaml.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | overflow: auto; 4 | } 5 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/yaml/experiment-yaml.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { ExperimentK8s } from 'src/app/models/experiment.k8s.model'; 3 | import { dump } from 'js-yaml'; 4 | 5 | @Component({ 6 | selector: 'app-experiment-yaml', 7 | templateUrl: './experiment-yaml.component.html', 8 | styleUrls: ['./experiment-yaml.component.scss'], 9 | }) 10 | export class ExperimentYamlComponent { 11 | public yaml = ''; 12 | 13 | @Input() 14 | set experimentJson(exp: ExperimentK8s) { 15 | this.yaml = dump(exp); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiment-details/yaml/experiment-yaml.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { ExperimentYamlComponent } from './experiment-yaml.component'; 5 | import { EditorModule } from 'kubeflow'; 6 | 7 | @NgModule({ 8 | declarations: [ExperimentYamlComponent], 9 | imports: [CommonModule, EditorModule], 10 | exports: [ExperimentYamlComponent], 11 | }) 12 | export class ExperimentYamlModule {} 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiments/delete-modal-config.ts: -------------------------------------------------------------------------------- 1 | import { DialogConfig } from 'kubeflow'; 2 | 3 | // --- Configs for the Confirm Dialogs --- 4 | export function generateDeleteConfig(name: string): DialogConfig { 5 | return { 6 | title: $localize`Delete experiment ${name}?`, 7 | message: $localize`You cannot undo this action. Are you sure you want to delete this experiment?`, 8 | accept: $localize`DELETE`, 9 | confirmColor: 'warn', 10 | cancel: $localize`CANCEL`, 11 | error: '', 12 | applying: $localize`DELETING`, 13 | width: '600px', 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiments/experiments.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 7 | 8 | 9 |
10 | 16 | 17 |
18 |
19 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiments/experiments.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/app/pages/experiments/experiments.component.scss -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiments/experiments.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { KubeflowModule } from 'kubeflow'; 4 | import { ExperimentsComponent } from './experiments.component'; 5 | import { ExperimentOptimalTrialModule } from './optimal-trial/experiment-optimal-trial.module'; 6 | 7 | @NgModule({ 8 | declarations: [ExperimentsComponent], 9 | imports: [CommonModule, ExperimentOptimalTrialModule, KubeflowModule], 10 | exports: [ExperimentsComponent], 11 | }) 12 | export class ExperimentsModule {} 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiments/optimal-trial/experiment-optimal-trial.component.scss: -------------------------------------------------------------------------------- 1 | .metric-key { 2 | font-weight: 500; 3 | margin-right: 0.2rem; 4 | } 5 | 6 | .popover-title { 7 | color: rgba(0, 0, 0, 0.66); 8 | 9 | &:last-of-type { 10 | margin-top: 0.8rem; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiments/optimal-trial/experiment-optimal-trial.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { Experiment } from 'src/app/models/experiment.model'; 3 | import { TableColumnComponent } from 'kubeflow/lib/resource-table/component-value/component-value.component'; 4 | import { 5 | KeyValuePair, 6 | trackByParamFn, 7 | parseOptimalMetric, 8 | parseOptimalParameters, 9 | } from './utils'; 10 | 11 | @Component({ 12 | selector: 'app-experiment-optimal-trial', 13 | templateUrl: './experiment-optimal-trial.component.html', 14 | styleUrls: ['./experiment-optimal-trial.component.scss'], 15 | }) 16 | export class ExperimentOptimalTrialComponent implements TableColumnComponent { 17 | public params: KeyValuePair[] = []; 18 | public metrics: KeyValuePair[] = []; 19 | public trackByParamFn = trackByParamFn; 20 | 21 | set element(experiment: Experiment) { 22 | this.metrics = parseOptimalMetric(experiment); 23 | this.params = parseOptimalParameters(experiment); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/pages/experiments/optimal-trial/experiment-optimal-trial.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { ExperimentOptimalTrialComponent } from './experiment-optimal-trial.component'; 4 | import { PopoverModule, DetailsListModule } from 'kubeflow'; 5 | import { MatDividerModule } from '@angular/material/divider'; 6 | 7 | @NgModule({ 8 | declarations: [ExperimentOptimalTrialComponent], 9 | imports: [CommonModule, PopoverModule, DetailsListModule, MatDividerModule], 10 | }) 11 | export class ExperimentOptimalTrialModule {} 12 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/services/backend.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { HttpClientTestingModule } from '@angular/common/http/testing'; 3 | import { KWABackendService } from './backend.service'; 4 | import { ReactiveFormsModule } from '@angular/forms'; 5 | import { MatSnackBarModule } from '@angular/material/snack-bar'; 6 | 7 | describe('KWABackendService', () => { 8 | beforeEach(() => 9 | TestBed.configureTestingModule({ 10 | imports: [ 11 | HttpClientTestingModule, 12 | ReactiveFormsModule, 13 | MatSnackBarModule, 14 | ], 15 | }), 16 | ); 17 | 18 | it('should be created', () => { 19 | const service: KWABackendService = TestBed.inject(KWABackendService); 20 | expect(service).toBeTruthy(); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/list-input/list-input.component.html: -------------------------------------------------------------------------------- 1 |

{{ header }}

2 | 3 | 6 | 7 |
8 | 9 | 10 | {{ valueLabel }} 11 | 12 | 20 | 21 | 22 |
23 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/list-input/list-input.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | 5 | .add-btn { 6 | margin-bottom: 12px; 7 | } 8 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/list-input/list-input.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { FormArray, FormControl, Validators } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-shared-list-input', 6 | templateUrl: './list-input.component.html', 7 | styleUrls: ['./list-input.component.scss'], 8 | }) 9 | export class ListInputComponent { 10 | @Input() header: string; 11 | @Input() valueLabel = 'Value'; 12 | @Input() formArray: FormArray; 13 | @Input() addValueText = 'Add value'; 14 | @Input() requiredValue = true; 15 | 16 | addCtrl() { 17 | const validators = this.requiredValue ? Validators.required : []; 18 | this.formArray.push(new FormControl('', validators)); 19 | } 20 | 21 | removeCtrl(i: number) { 22 | this.formArray.removeAt(i); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/list-input/list-input.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { ListInputComponent } from './list-input.component'; 4 | 5 | import { MatIconModule } from '@angular/material/icon'; 6 | 7 | import { FormModule } from 'kubeflow'; 8 | 9 | @NgModule({ 10 | declarations: [ListInputComponent], 11 | imports: [CommonModule, FormModule, MatIconModule], 12 | exports: [ListInputComponent], 13 | }) 14 | export class ListInputModule {} 15 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/list-key-value/list-key-value.component.html: -------------------------------------------------------------------------------- 1 |

{{ header }}

2 | 3 | 6 | 7 |
8 |
12 | 13 | {{ keyLabel }} 14 | 15 | 16 | 17 | 18 | {{ valueLabel }} 19 | 20 | 21 | 22 | 31 |
32 |
33 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/list-key-value/list-key-value.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | 5 | .key-value-entry { 6 | display: flex; 7 | 8 | .mat-form-field:nth-child(2) { 9 | margin-left: 12px; 10 | } 11 | 12 | .delete-btn { 13 | margin-top: 10px; 14 | } 15 | } 16 | 17 | .add-btn { 18 | margin-bottom: 12px; 19 | } 20 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/list-key-value/list-key-value.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { FormArray, FormControl, Validators, FormGroup } from '@angular/forms'; 3 | 4 | @Component({ 5 | selector: 'app-list-key-value', 6 | templateUrl: './list-key-value.component.html', 7 | styleUrls: ['./list-key-value.component.scss'], 8 | }) 9 | export class ListKeyValueComponent { 10 | @Input() header: string; 11 | @Input() addButtonText = 'Add key-value'; 12 | @Input() keyLabel = 'Key'; 13 | @Input() valueLabel = 'Value'; 14 | @Input() formArray: FormArray; 15 | 16 | addCtrl() { 17 | this.formArray.push( 18 | new FormGroup({ 19 | key: new FormControl('k', Validators.required), 20 | value: new FormControl('v', Validators.required), 21 | }), 22 | ); 23 | } 24 | 25 | removeCtrl(i: number) { 26 | this.formArray.removeAt(i); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/list-key-value/list-key-value.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { ListKeyValueComponent } from './list-key-value.component'; 4 | 5 | import { MatIconModule } from '@angular/material/icon'; 6 | 7 | import { FormModule } from 'kubeflow'; 8 | 9 | @NgModule({ 10 | declarations: [ListKeyValueComponent], 11 | imports: [CommonModule, FormModule, MatIconModule], 12 | exports: [ListKeyValueComponent], 13 | }) 14 | export class ListKeyValueModule {} 15 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/params-list/add-modal/add-modal.component.scss: -------------------------------------------------------------------------------- 1 | .margin-top { 2 | margin-top: 12px; 3 | } 4 | 5 | .value-type { 6 | display: flex; 7 | 8 | * { 9 | margin: 0 8px; 10 | } 11 | } 12 | 13 | .range-wrapper { 14 | display: flex; 15 | 16 | > * { 17 | width: 130px; 18 | } 19 | 20 | > *:nth-child(2) { 21 | margin: 0 12px; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/params-list/parameter/parameter.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | border: #0000001f solid 1px; 4 | border-radius: 8px; 5 | margin-bottom: 8px; 6 | width: 440px; 7 | padding: 8px 8px 8px 16px; 8 | } 9 | 10 | .params-row { 11 | display: flex; 12 | width: 100%; 13 | align-items: center; 14 | } 15 | 16 | .param-name { 17 | width: 25%; 18 | } 19 | 20 | .param-type { 21 | width: 25%; 22 | } 23 | 24 | .param-value { 25 | width: 50%; 26 | overflow: hidden; 27 | } 28 | 29 | // popovers 30 | .popover-title { 31 | color: rgba(0, 0, 0, 0.66); 32 | margin-bottom: 8px; 33 | } 34 | 35 | .popover-list-wrapper { 36 | display: grid; 37 | grid-template-columns: repeat(5, 1fr); 38 | } 39 | 40 | .popover-list-item { 41 | margin: 0 3px; 42 | } 43 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/params-list/params-list.component.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |
Name
12 |
Type
13 |
Domain
14 |
15 | 16 | 17 | 21 | 22 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/app/shared/params-list/params-list.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | 5 | .header-row { 6 | padding-left: 16px; 7 | margin-bottom: 8px; 8 | display: flex; 9 | } 10 | 11 | .header-name { 12 | width: 90px; 13 | } 14 | 15 | .header-type { 16 | width: 90px; 17 | } 18 | 19 | .header-value { 20 | width: 55%; 21 | } 22 | 23 | .new-param-btn { 24 | margin-top: 12px; 25 | margin-bottom: 12px; 26 | 27 | mat-icon { 28 | margin-bottom: 2px; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/assets/.gitkeep -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | }; 4 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false, 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/pkg/ui/v1beta1/frontend/src/favicon.ico -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Frontend 6 | 7 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/kubeflow.css: -------------------------------------------------------------------------------- 1 | body { 2 | --accent-color: #007dfc; 3 | --accent-color-light: #69abff; 4 | --accent-color-dark: #0052c8; 5 | --kubeflow-color: #003c75; 6 | --primary-background-color: #2196f3; 7 | --sidebar-color: #f8fafb; 8 | --border-color: #f4f4f6; 9 | } 10 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic() 12 | .bootstrapModule(AppModule) 13 | .catch(err => console.error(err)); 14 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @import '../node_modules/kubeflow/styles/styles.scss'; 3 | 4 | body { 5 | background-color: white; 6 | margin: 0; 7 | } 8 | 9 | .two-inputs { 10 | display: flex; 11 | 12 | .mat-form-field:nth-child(2) { 13 | margin-left: 12px; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting, 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting(), 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": [] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.d.ts"], 9 | "exclude": ["src/test.ts", "src/**/*.spec.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "downlevelIteration": true, 9 | "experimentalDecorators": true, 10 | "module": "es2020", 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "es2015", 14 | "typeRoots": ["node_modules/@types"], 15 | "paths": { 16 | "@app/environment": ["src/environments/environment"] 17 | }, 18 | "lib": ["es2018", "dom"], 19 | "allowSyntheticDefaultImports": true 20 | }, 21 | "angularCompilerOptions": { 22 | "fullTemplateTypeCheck": true, 23 | "strictInjectionParameters": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /pkg/ui/v1beta1/frontend/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /pkg/util/v1beta1/env/env.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package env 18 | 19 | import ( 20 | "os" 21 | ) 22 | 23 | func GetEnvOrDefault(key string, fallback string) string { 24 | if value, ok := os.LookupEnv(key); ok { 25 | return value 26 | } 27 | return fallback 28 | } 29 | -------------------------------------------------------------------------------- /pkg/util/v1beta1/env/env_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package env 18 | 19 | import ( 20 | "os" 21 | "testing" 22 | ) 23 | 24 | func TestGetEnvWithDefault(t *testing.T) { 25 | expected := "FAKE" 26 | key := "TEST" 27 | v := GetEnvOrDefault(key, expected) 28 | if v != expected { 29 | t.Errorf("Expected %s, got %s", expected, v) 30 | } 31 | expected = "FAKE1" 32 | os.Setenv(key, expected) 33 | v = GetEnvOrDefault(key, "") 34 | if v != expected { 35 | t.Errorf("Expected %s, got %s", expected, v) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /pkg/webhook/v1beta1/common/const.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubeflow Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package common 18 | 19 | const ( 20 | KatibMetricsCollectorInjection = "katib.kubeflow.org/metrics-collector-injection" 21 | KatibMetricsCollectorInjectionEnabled = "enabled" 22 | ) 23 | -------------------------------------------------------------------------------- /scripts/v1beta1/undeploy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright 2022 The Kubeflow Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -o xtrace 18 | set -o errexit 19 | 20 | # Delete all Katib Experiment in all namespaces. 21 | kubectl delete experiment --all --all-namespaces 22 | sleep 10 23 | 24 | SCRIPT_ROOT="$(dirname "${BASH_SOURCE[0]}")/../.." 25 | 26 | cd "${SCRIPT_ROOT}" 27 | kustomize build manifests/v1beta1/installs/katib-standalone | kubectl delete -f - 28 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/.gitignore: -------------------------------------------------------------------------------- 1 | # Distribution / packaging 2 | dist/ 3 | 4 | # Katib gRPC APIs 5 | kubeflow/katib/katib_api_pb2.py 6 | kubeflow/katib/katib_api_pb2_grpc.py 7 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/OWNERS: -------------------------------------------------------------------------------- 1 | reviewers: 2 | - helenxie-bit 3 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1AlgorithmSetting.md: -------------------------------------------------------------------------------- 1 | # V1beta1AlgorithmSetting 2 | 3 | AlgorithmSetting represents key-value pair for HP or NAS algorithm settings. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **str** | Name is setting name. | [optional] 8 | **value** | **str** | Value is the setting value. | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1AlgorithmSpec.md: -------------------------------------------------------------------------------- 1 | # V1beta1AlgorithmSpec 2 | 3 | AlgorithmSpec is the specification for a HP or NAS algorithm. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **algorithm_name** | **str** | HP or NAS algorithm name. | [optional] 8 | **algorithm_settings** | [**list[V1beta1AlgorithmSetting]**](V1beta1AlgorithmSetting.md) | Key-value pairs representing settings for suggestion algorithms. | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1CollectorSpec.md: -------------------------------------------------------------------------------- 1 | # V1beta1CollectorSpec 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **custom_collector** | [**V1Container**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Container.md) | | [optional] 7 | **kind** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1ConfigMapSource.md: -------------------------------------------------------------------------------- 1 | # V1beta1ConfigMapSource 2 | 3 | ConfigMapSource references the config map where trial template is located 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **config_map_name** | **str** | Name of config map where trial template is located | [optional] 8 | **config_map_namespace** | **str** | Namespace of config map where trial template is located | [optional] 9 | **template_path** | **str** | Path in config map where trial template is located | [optional] 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | 14 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1EarlyStoppingRule.md: -------------------------------------------------------------------------------- 1 | # V1beta1EarlyStoppingRule 2 | 3 | EarlyStoppingRule represents each rule for early stopping. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **comparison** | **str** | Comparison defines correlation between name and value. | [optional] 8 | **name** | **str** | Name contains metric name for the rule. | [optional] 9 | **start_step** | **int** | StartStep defines quantity of intermediate results that should be received before applying the rule. If start step is empty, rule is applied from the first recorded metric. | [optional] 10 | **value** | **str** | Value contains metric value for the rule. | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1EarlyStoppingSetting.md: -------------------------------------------------------------------------------- 1 | # V1beta1EarlyStoppingSetting 2 | 3 | EarlyStoppingSetting represents key-value pair for early stopping algorithm settings. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **str** | Name is the setting name. | [optional] 8 | **value** | **str** | Value is the setting value. | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1EarlyStoppingSpec.md: -------------------------------------------------------------------------------- 1 | # V1beta1EarlyStoppingSpec 2 | 3 | EarlyStoppingSpec is the specification for a early stopping algorithm. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **algorithm_name** | **str** | Early stopping algorithm name. | [optional] 8 | **algorithm_settings** | [**list[V1beta1EarlyStoppingSetting]**](V1beta1EarlyStoppingSetting.md) | Key-value pairs representing settings for early stopping algorithm. | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md: -------------------------------------------------------------------------------- 1 | # V1beta1ExperimentCondition 2 | 3 | ExperimentCondition describes the state of the experiment at a certain point. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **last_transition_time** | **datetime** | | [optional] 8 | **last_update_time** | **datetime** | | [optional] 9 | **message** | **str** | A human readable message indicating details about the transition. | [optional] 10 | **reason** | **str** | The reason for the condition's last transition. | [optional] 11 | **status** | **str** | Status of the condition, one of True, False, Unknown. | [default to ''] 12 | **type** | **str** | Type of experiment condition. | [default to ''] 13 | 14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 15 | 16 | 17 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1FeasibleSpace.md: -------------------------------------------------------------------------------- 1 | # V1beta1FeasibleSpace 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **distribution** | **str** | | [optional] 7 | **list** | **list[str]** | | [optional] 8 | **max** | **str** | | [optional] 9 | **min** | **str** | | [optional] 10 | **step** | **str** | | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1FileSystemPath.md: -------------------------------------------------------------------------------- 1 | # V1beta1FileSystemPath 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **format** | **str** | | [optional] 7 | **kind** | **str** | | [optional] 8 | **path** | **str** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1FilterSpec.md: -------------------------------------------------------------------------------- 1 | # V1beta1FilterSpec 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **metrics_format** | **list[str]** | When the metrics output follows format as this field specified, metricsCollector collects it and reports to metrics server, it can be \"<metric_name>: <float>\" or else | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1GraphConfig.md: -------------------------------------------------------------------------------- 1 | # V1beta1GraphConfig 2 | 3 | GraphConfig contains a config of DAG 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **input_sizes** | **list[int]** | | [optional] 8 | **num_layers** | **int** | | [optional] 9 | **output_sizes** | **list[int]** | | [optional] 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | 14 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1Metric.md: -------------------------------------------------------------------------------- 1 | # V1beta1Metric 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **latest** | **str** | | [optional] 7 | **max** | **str** | | [optional] 8 | **min** | **str** | | [optional] 9 | **name** | **str** | | [optional] 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | 14 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1MetricStrategy.md: -------------------------------------------------------------------------------- 1 | # V1beta1MetricStrategy 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | **value** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1MetricsCollectorSpec.md: -------------------------------------------------------------------------------- 1 | # V1beta1MetricsCollectorSpec 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **collector** | [**V1beta1CollectorSpec**](V1beta1CollectorSpec.md) | | [optional] 7 | **source** | [**V1beta1SourceSpec**](V1beta1SourceSpec.md) | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1NasConfig.md: -------------------------------------------------------------------------------- 1 | # V1beta1NasConfig 2 | 3 | NasConfig contains config for NAS job 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **graph_config** | [**V1beta1GraphConfig**](V1beta1GraphConfig.md) | | [optional] 8 | **operations** | [**list[V1beta1Operation]**](V1beta1Operation.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1Observation.md: -------------------------------------------------------------------------------- 1 | # V1beta1Observation 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **metrics** | [**list[V1beta1Metric]**](V1beta1Metric.md) | Key-value pairs for metric names and values | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1Operation.md: -------------------------------------------------------------------------------- 1 | # V1beta1Operation 2 | 3 | Operation contains type of operation in DAG 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **operation_type** | **str** | | [optional] 8 | **parameters** | [**list[V1beta1ParameterSpec]**](V1beta1ParameterSpec.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1OptimalTrial.md: -------------------------------------------------------------------------------- 1 | # V1beta1OptimalTrial 2 | 3 | OptimalTrial is the metrics and assignments of the best trial. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **best_trial_name** | **str** | BestTrialName is the name of the best trial. | [optional] 8 | **observation** | [**V1beta1Observation**](V1beta1Observation.md) | | [optional] 9 | **parameter_assignments** | [**list[V1beta1ParameterAssignment]**](V1beta1ParameterAssignment.md) | Key-value pairs for hyperparameters and assignment values. | [optional] 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | 14 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1ParameterAssignment.md: -------------------------------------------------------------------------------- 1 | # V1beta1ParameterAssignment 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | **value** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1ParameterSpec.md: -------------------------------------------------------------------------------- 1 | # V1beta1ParameterSpec 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **feasible_space** | [**V1beta1FeasibleSpace**](V1beta1FeasibleSpace.md) | | [optional] 7 | **name** | **str** | | [optional] 8 | **parameter_type** | **str** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1SourceSpec.md: -------------------------------------------------------------------------------- 1 | # V1beta1SourceSpec 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **file_system_path** | [**V1beta1FileSystemPath**](V1beta1FileSystemPath.md) | | [optional] 7 | **filter** | [**V1beta1FilterSpec**](V1beta1FilterSpec.md) | | [optional] 8 | **http_get** | [**V1HTTPGetAction**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1HTTPGetAction.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md: -------------------------------------------------------------------------------- 1 | # V1beta1SuggestionCondition 2 | 3 | SuggestionCondition describes the state of the Suggestion at a certain point. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **last_transition_time** | **datetime** | | [optional] 8 | **last_update_time** | **datetime** | | [optional] 9 | **message** | **str** | A human readable message indicating details about the transition. | [optional] 10 | **reason** | **str** | The reason for the condition's last transition. | [optional] 11 | **status** | **str** | Status of the condition, one of True, False, Unknown. | [default to ''] 12 | **type** | **str** | Type of Suggestion condition. | [default to ''] 13 | 14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 15 | 16 | 17 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1SuggestionSpec.md: -------------------------------------------------------------------------------- 1 | # V1beta1SuggestionSpec 2 | 3 | SuggestionSpec is the specification of a Suggestion. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **algorithm** | [**V1beta1AlgorithmSpec**](V1beta1AlgorithmSpec.md) | | [optional] 8 | **early_stopping** | [**V1beta1EarlyStoppingSpec**](V1beta1EarlyStoppingSpec.md) | | [optional] 9 | **requests** | **int** | Number of suggestions requested. | [optional] 10 | **resume_policy** | **str** | ResumePolicy describes resuming policy which usually take effect after experiment terminated. Default value is Never. | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1TrialAssignment.md: -------------------------------------------------------------------------------- 1 | # V1beta1TrialAssignment 2 | 3 | TrialAssignment is the assignment for one trial. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **early_stopping_rules** | [**list[V1beta1EarlyStoppingRule]**](V1beta1EarlyStoppingRule.md) | Rules for early stopping techniques Contains rule name, value and comparison type | [optional] 8 | **labels** | **dict(str, str)** | Suggestion label metadata to attach to Trial job | [optional] 9 | **name** | **str** | Name of the suggestion | [optional] 10 | **parameter_assignments** | [**list[V1beta1ParameterAssignment]**](V1beta1ParameterAssignment.md) | Suggestion results with Trial parameters | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1TrialCondition.md: -------------------------------------------------------------------------------- 1 | # V1beta1TrialCondition 2 | 3 | TrialCondition describes the state of the trial at a certain point. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **last_transition_time** | **datetime** | | [optional] 8 | **last_update_time** | **datetime** | | [optional] 9 | **message** | **str** | A human readable message indicating details about the transition. | [optional] 10 | **reason** | **str** | The reason for the condition's last transition. | [optional] 11 | **status** | **str** | Status of the condition, one of True, False, Unknown. | [default to ''] 12 | **type** | **str** | Type of trial condition. | [default to ''] 13 | 14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 15 | 16 | 17 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1TrialParameterSpec.md: -------------------------------------------------------------------------------- 1 | # V1beta1TrialParameterSpec 2 | 3 | TrialParameterSpec describes parameters that must be replaced in trial template 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **description** | **str** | Description of the parameter | [optional] 8 | **name** | **str** | Name of the parameter that must be replaced in trial template | [optional] 9 | **reference** | **str** | Reference to the parameter in search space | [optional] 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | 14 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1TrialSource.md: -------------------------------------------------------------------------------- 1 | # V1beta1TrialSource 2 | 3 | TrialSource represent the source for trial template Only one source can be specified 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **config_map** | [**V1beta1ConfigMapSource**](V1beta1ConfigMapSource.md) | | [optional] 8 | **trial_spec** | **object** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/docs/V1beta1TrialStatus.md: -------------------------------------------------------------------------------- 1 | # V1beta1TrialStatus 2 | 3 | TrialStatus is the current status of a Trial. 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **completion_time** | **datetime** | | [optional] 8 | **conditions** | [**list[V1beta1TrialCondition]**](V1beta1TrialCondition.md) | List of observed runtime conditions for this Trial. | [optional] 9 | **last_reconcile_time** | **datetime** | | [optional] 10 | **observation** | [**V1beta1Observation**](V1beta1Observation.md) | | [optional] 11 | **start_time** | **datetime** | | [optional] 12 | 13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 14 | 15 | 16 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/kubeflow/__init__.py: -------------------------------------------------------------------------------- 1 | __path__ = __import__("pkgutil").extend_path(__path__, __name__) 2 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/kubeflow/katib/api/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # flake8: noqa 4 | 5 | # import apis into api package 6 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/kubeflow/katib/constants/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/sdk/python/v1beta1/kubeflow/katib/constants/__init__.py -------------------------------------------------------------------------------- /sdk/python/v1beta1/kubeflow/katib/types/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/sdk/python/v1beta1/kubeflow/katib/types/__init__.py -------------------------------------------------------------------------------- /sdk/python/v1beta1/kubeflow/katib/types/types.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import Dict 3 | 4 | 5 | # Trainer resources for distributed training. 6 | @dataclass 7 | class TrainerResources: 8 | num_workers: int 9 | num_procs_per_worker: int 10 | resources_per_worker: Dict[str, str] 11 | -------------------------------------------------------------------------------- /sdk/python/v1beta1/kubeflow/katib/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/sdk/python/v1beta1/kubeflow/katib/utils/__init__.py -------------------------------------------------------------------------------- /test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubeflow/katib/9421f2322be3e41ba0a009854d2878a75bd16d78/test/__init__.py -------------------------------------------------------------------------------- /test/conftest.py: -------------------------------------------------------------------------------- 1 | import os 2 | from sys import path 3 | 4 | root = os.path.join(os.path.dirname(__file__), "..") 5 | path.extend( 6 | [ 7 | os.path.join(root, "pkg/apis/manager/v1beta1/python"), 8 | os.path.join(root, "pkg/apis/manager/health/python"), 9 | os.path.join(root, "pkg/metricscollector/v1beta1/common"), 10 | os.path.join(root, "pkg/metricscollector/v1beta1/tfevent-metricscollector"), 11 | ] 12 | ) 13 | -------------------------------------------------------------------------------- /test/unit/v1beta1/metricscollector/utils.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Kubeflow Authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | from google.protobuf import json_format 16 | from tfevent_loader import MetricsCollector 17 | 18 | 19 | def get_metric_logs(logs_dir, metric_names): 20 | mc = MetricsCollector(metric_names) 21 | observation_log = mc.parse_file(logs_dir) 22 | dict_observation_log = json_format.MessageToDict(observation_log) 23 | return dict_observation_log["metricLogs"] 24 | -------------------------------------------------------------------------------- /test/unit/v1beta1/requirements.txt: -------------------------------------------------------------------------------- 1 | grpcio-testing==1.64.1 2 | pytest==7.2.0 3 | tensorboardX==2.6.2.2 4 | kubeflow-training[huggingface]==1.9.0 5 | --------------------------------------------------------------------------------