feat: Scaffold OptimizationJob CRD v1alpha1 types and clients#2624
feat: Scaffold OptimizationJob CRD v1alpha1 types and clients#2624aniket2405 wants to merge 4 commits intokubeflow:masterfrom
Conversation
|
🎉 Welcome to the Kubeflow Katib repo! 🎉 Thanks for opening your first PR! We're excited to have you onboard 🚀 Next steps:
Feel free to ask questions in the comments. Thanks again for contributing! 🙏 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @aniket2405, Great foundational work on the OptimizationJob CRD! I’d love to collaborate and help with reviews, feedback, or any other support you might need as this progresses as I was working on this as well Looking forward to working together ! also could you please sign your commits |
| } | ||
|
|
||
| // OptimizationJobSpec defines the desired state of OptimizationJob. | ||
| type OptimizationJobSpec struct { |
There was a problem hiding this comment.
Should the spec have initializer config at top level? We want have a common initializer for all jobs/trials
There was a problem hiding this comment.
Agreed, added an Initializer config.
|
|
||
| // OptimizationJobStatus defines the observed state of OptimizationJob. | ||
| type OptimizationJobStatus struct { | ||
| // Add status fields here (e.g., Conditions, BestTrial, etc.) as the controller matures. |
There was a problem hiding this comment.
Should also integrate with train job status tracking feature
|
Thanks @aniket2405. Could you start a KEP for this effort to finalize the features and approach |
Thanks @Krishna-kg732 |
Thanks @aniket2405 — would you be open to starting a Slack thread so we can discuss potential features and improvements together before drafting the KEP? I think it would help us align on scope and approach. Also, if you already have a Google Doc prepared, could you please share it here as well? Thanks! |
|
Thanks for this work @aniket2405! |
|
Certainly. |
Signed-off-by: aniket2405 <aniketshaha2001@gmail.com>
|
Have a draft document ready, will fine-tune some points, and share this by tomorrow. |
|
Hi @andreyvelich @akshaychitneni Some more things need to be updated in this, but I feel it's a good point to start. Please go through it and suggest improvements. |
41511af to
68b7f47
Compare
This reverts commit 68b7f47.
|
Hi @aniket2405, great work on the scaffolding! I've been going through the types and the design doc, and had a couple of observations: 1. SearchSpace typingCurrently Should we introduce typed structs here? Something like: type ParameterSpec struct {
Name string `json:"name"`
Continuous *ContinuousParameter `json:"continuous,omitempty"`
Categorical *CategoricalParameter `json:"categorical,omitempty"`
Discrete *DiscreteParameter `json:"discrete,omitempty"`
}
type ContinuousParameter struct {
Min float64 `json:"min"`
Max float64 `json:"max"`
Distribution string `json:"distribution,omitempty"` // uniform, logUniform
}
type CategoricalParameter struct {
Choices []string `json:"choices"`
}
type DiscreteParameter struct {
Values []float64 `json:"values"`
}And then in the spec: 2. Direction as string vs. enum
type ObjectiveDirection string
const (
ObjectiveDirectionMinimize ObjectiveDirection = "minimize"
ObjectiveDirectionMaximize ObjectiveDirection = "maximize"
)Happy to help with any of these if you'd like to collaborate! Looking forward to working together on this. cc: @akshaychitneni |
|
Yes, @Krishna-kg732
Kept it open for discussion (Discussion 2 in the KEP doc.) to get inputs from @akshaychitneni or @andreyvelich if there's a better way to go about doing it. Otherwise, the Katib's existing ParameterSpec implementation is the way to go! Agreed with |
|
@akshaychitneni Did you get some time to go over the initial draft of KEP, or would you like to discuss this once we've come up with an in-depth CRD transition details. (I'm going over the existing Katib API and will be adding a few points over the next day or two). Thanks for all the help! |
|
Hi @akshaychitneni Please go through it and point out any shortcomings. Since it's a pretty extensive doc, there might be some inconsistencies. I'm actively rectifying them. cc: @andreyvelich |
|
Hi @aniket2405, great work on this scaffold! I'm also interested in Project 2 for GSoC. I'd love to collaborate — happy to help with the initializer config feedback @akshaychitneni mentioned, or with TrainJob status integration. Let me know how I can contribute. |
What this PR does / why we need it:
This PR lays the foundational Go API types for the new OptimizationJob CRD, which represents the backend controller implementation of KEP-46 (Hyperparameter Optimization APIs).
Specific changes:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Updates #2605
Checklist: