Skip to content

feat(api): Introduce OptimizationJob v1alpha1 API Types and CEL Validation Rules (KEP-3562) - #3875

Closed
Haseebx162006 wants to merge 1 commit into
kubeflow:masterfrom
Haseebx162006:feat/optimizationjob-v1alpha1-api
Closed

feat(api): Introduce OptimizationJob v1alpha1 API Types and CEL Validation Rules (KEP-3562)#3875
Haseebx162006 wants to merge 1 commit into
kubeflow:masterfrom
Haseebx162006:feat/optimizationjob-v1alpha1-api

Conversation

@Haseebx162006

Copy link
Copy Markdown

What this PR does / why we need it

This PR introduces the initial v1alpha1 API types and validation framework for OptimizationJob, as part of KEP-3562.

The API provides the foundational Kubernetes types required to represent hyperparameter optimization jobs in Kubeflow Trainer, including objectives, search algorithms, search spaces, parameters, and optimization results.

Proposed Changes

  • Added OptimizationJob and OptimizationJobList API types.
  • Added OptimizationJobSpec and OptimizationJobStatus.
  • Added objective and optimization result types.
  • Added Random and Grid search algorithm types.
  • Added Uniform, LogUniform, and Categorical search-space types.
  • Added parameter definitions and numeric bounds.
  • Added CEL validation rules for search algorithms, search spaces, and parameter bounds.
  • Registered OptimizationJob and OptimizationJobList with the v1alpha1 API scheme.
  • Added unit tests covering JSON serialization and DeepCopy() behavior.

These types provide the API foundation for the OptimizationJob controller and subsequent optimization/suggestion-service integration described in KEP-3562.

Testing

  • go test -v ./pkg/apis/trainer/v1alpha1/...

Which issue(s) this PR relates to

Part of #3562
Related to #3749

Checklist

  • Unit tests added/updated
  • API types registered with the scheme
  • Validation rules included
  • Docs included (not user-facing)

Signed-off-by: Haseebx162006 <haseebahmad0160@gmail.com>
Copilot AI balanced review requested due to automatic review settings August 8, 2026 12:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jeffwan for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🎉 Welcome to the Kubeflow Trainer! 🎉

Thanks for opening your first PR! We're happy to have you as part of our community 🚀

Here's what happens next:

  • If you haven't already, please check out our Contributing Guide for repo-specific guidelines and the Kubeflow Contributor Guide for general community standards.
  • Our team will review your PR soon! cc @kubeflow/kubeflow-trainer-team

Join the community:

Feel free to ask questions in the comments if you need any help or clarification!
Thanks again for contributing to Kubeflow! 🙏

@Haseebx162006

Copy link
Copy Markdown
Author

Closing this PR because the OptimizationJob API types have already been implemented upstream in #3552.

My PR is therefore redundant. I’ll look for an open follow-up task under KEP-3562 where I can contribute further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants