-
Notifications
You must be signed in to change notification settings - Fork 253
SUBMARINE-558. Define Swagger API for pre-defined template submission #382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @JohnTing for working on this.
Some suggestion in the below.
- Could we remove
test_template_2.json
? it's same astest_template_1.json
- Need to change directory name
submarine-server/server-core/src/test/resources/experimenttemplate/test_template_1.json
tosubmarine-server/server-core/src/test/resources/experimentTemplate/test_template_1.json
.../src/main/java/org/apache/submarine/server/experimenttemplate/ExperimentTemplateManager.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/submarine/server/experimenttemplate/ExperimentTemplateManager.java
Outdated
Show resolved
Hide resolved
...est/test-k8s/src/test/java/org/apache/submarine/rest/ExperimentTemplateManagerRestApiIT.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/submarine/server/experimenttemplate/ExperimentTemplateManager.java
Outdated
Show resolved
Hide resolved
…e/server/experimenttemplate/ExperimentTemplateManager.java Co-authored-by: HUAN-PING SU <pingsutw@gmail.com>
…e/server/experimenttemplate/ExperimentTemplateManager.java Co-authored-by: HUAN-PING SU <pingsutw@gmail.com>
…e/server/experimenttemplate/ExperimentTemplateManager.java Co-authored-by: HUAN-PING SU <pingsutw@gmail.com>
…t/ExperimentTemplateManagerRestApiIT.java Co-authored-by: HUAN-PING SU <pingsutw@gmail.com>
Thanks @JohnTing for the patch, I reviewed registration flow, and what does the API looks like. I actually like the new implementation more than the original design of https://github.com/apache/submarine/blob/master/docs/design/experiment-implementation.md. The parameterized implementation is very clean and very easy for users to register and understand. Great job! I will leave the detailed code review works to others, at a high-level, the implementation looks good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JohnTing Thanks for your contribution. But I have a doubt "how can the user submit the experiment by template?" I saw the REST api /api/v1/template/submit
, but I can't get its meaning. Such as 'create new template' or others? In my opinion, if we provide the template resource, the experiment resource depends on template. So we should extend the experiment api to support accepts the template id and related params to training.
@jiwq, Thanks for your review My last PR (SUBMARINE-559) get template list/api/v1/template get templateget /api/v1/template/{templateName} post templatepost /api/v1/template patch templatepatch /api/v1/template/{templateName} delete templatedelete /api/v1/template/{templateName} then this PR uses the registered template to submit as an experiment submit template as an experimentpost /api/v1/template/submit The format of the registered template includes a complete experiment, but the template maker can change some parameters into variables for template users to adjust. |
Got. I think |
@jiwq |
I recommend use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JohnTing , What is the status of this PR now? Has this PR been completed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JohnTing Thank you contibution this feature.
Will merge if no more comments.
What is this PR for?
Make basic rest api for submi template.
Convert submitted template to experiment
post
http://localhost/V1/template/submit
What type of PR is it?
[Bug Fix | Improvement | Feature | Documentation | Hot Fix | Refactoring]
Todos
What is the Jira issue?
https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-558
How should this be tested?
If the submission is successful, it will return
Screenshots (if appropriate)
Questions: