[Proposal] Support PostHook for Experiment
See original GitHub issue/kind feature
Describe the solution you’d like [A clear and concise description of what you want to happen.]
I think there could be someone who would like to do something right after my experiments finished (succeeded or failed). For examples:
- send slack notification with results
- request some HTTP API (Delete data in minio except top K models)
Thus, I suggest to support this feature with postHook in Experiment CRD. (I’m not sure whether preHook will be necessary or not.)
Followings are my rough draft
type ExperimentSpec struct {
StartTime *metav1.Time `json:"startTime,omitempty"`
...
...
PostHooks []PostHookSpec `json:"postHooks,omitempty"`
}
type PostHookSpec struct {
HookType PostHookType
Job *batchv1.Job
}
type PostHookType string
const (
OnSucceed PostHookType = "OnSucceeded"
OnFailure PostHookType = "OnFailed"
}
I think supporting the main interface as k8s Job would be enough to handle any requests, but if there are another options, suggest them would be appreciated.
Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]
Here are some references for support hooks in kubernetes :
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/
- only
Exec
andHTTP
is possible
- only
- https://helm.sh/docs/topics/charts_hooks/
- use Job to define hook
- https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks/
- use Job to define hook
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Proposal Elements: Bridging the Gap - Hook
Hooks: A good hook grabs the learner's interest and helps define the roles the student will take during the engaged learning experience: ...
Read more >Implement the experimental Hooks proposal behind a feature ...
We have presented the Hooks proposal at React Conf 2018. This pull request implements all proposed built-in Hooks behind a feature flag, both...
Read more >NIH Grant Applications - The Anatomy of a Specific Aims Page
First Sentence/Hook: In this sentence, briefly describe what your proposal will be about. Ideally, this sentence should convey a sense of importance or ......
Read more >13 Types of Project Proposals That Get Approved (and How to ...
Project proposals are how you can get management to act on your ideas. They're the bottom-up version of a project request form.
Read more >How to Write a Research Paper Proposal
List the items you will cover in the body of the paper that support your thesis statement. For example, under the thesis statement...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it’s better to handle out side of Katib, using event driven framework such as argo-events or knative-events. (I chose argo-events in our company). Maybe we can close this issue I think.
I am closing it. Feel free to re-open it if there is a new design.