[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-04-22 Thread Zhankun Tang (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17090257#comment-17090257
 ] 

Zhankun Tang commented on SUBMARINE-481:


[~pingsutw], Thanks for the investigation. How did you generate the 
swagger.yaml?  Did you use swagger annotation to do this?

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Priority: Major
> Attachments: swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-04-22 Thread Zhankun Tang (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17090259#comment-17090259
 ] 

Zhankun Tang commented on SUBMARINE-481:


In my understanding, we add swagger dependency and annotation to our code. So 
that /swagger-core will generate the swagger.yaml file. 

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Priority: Major
> Attachments: swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-04-23 Thread Kevin Su (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091123#comment-17091123
 ] 

Kevin Su commented on SUBMARINE-481:


I used the Swagger editor to write swagger.yaml. I will try to add annotations 
in our code.

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Priority: Major
> Attachments: swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-04-28 Thread Wangda Tan (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094813#comment-17094813
 ] 

Wangda Tan commented on SUBMARINE-481:
--

Thanks [~pingsutw], I still saw it is using "Job" as the name, I think we 
should switch to "Experiment" for the first cut.

Here're my rough ideas about how to define the experiments API:

Top-level APIs:
 - POST /experiment : add new experiment
 - GET /experiment/ \{experiment-id}: get an experiment
 - GET /experiment/list (with parameters): get experiments with parameters.
 - DELETE /experiment/\{experiment-id}
: delete an experiment.

Objects definition:
{code:java}
Experiment {
// runtime status of an experiment
ExperimentStatus: {
   ExperimentState: Running (stringm, common states of Experiments, 
such as Running, New, Pending, Completed, Failed, etc.)

   startTime: string, (in UTC format, like 2020-04-28T19:01:37Z) 

   runningTimeInMilliSeconds: long (how long the job is running), 

   terminatedTime: string, (in UTC format, empty if not terminated).
}, 

// experiment spec (static) 
Experiment: {
  // below are common fields for all experiments
  name: $unique-name-for-the-experiment (string)
  
  environment: $name-for-environment (string)

  // Where we can sync the code, 
  code:
  $ref: "#/definitions/CodeSpec"

  timeout:
$ref: "#/definitions/Time"

  type: string with following values:
("Script", "Tensorflow", "PyTorch", "Template")

  // based on the type, one of the following types
  parameters:
oneOf: // Use oneOf keyword of swagger, see 
https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism/
- $ref: "#/definitions/ScriptParameterSpec"
- $ref: "#/definitions/TensorflowParameterSpec"
- ...
},
}

CodeSpec {
syncMode: s3/git (string)
url: string (git://, or s3://)
}

ScriptParameterSpec {
cli: 
  - $ref: "#/definitions/CommandLineOptions"
resource:
  - $ref: "#/definitions/ResourceSpec"
}

TensorflowParameterSpec {
// reference to the below like: 

   ps: 
environment: "team-default-ml-cpu"
resource_constraint: 
 res="mem=20gb, vcore=3, gpu=0"
   worker: 
environment: "team-default-ml-gpu"
resource_constraint: 
 res="mem=20gb, vcore=3, gpu=2"
}

Time {
time: 30
unit: "Minute" (or other units)
}

CommandLineOptions {
type: array 
items:
   type: string
}

ResourceSpec {
// Should be a list of key (resource type) to value, and unit. 
like cpu=10, memory = 20 GB, etc.
}

{code}

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Priority: Major
>  Labels: pull-request-available
> Attachments: swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-04-28 Thread Wangda Tan (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094814#comment-17094814
 ] 

Wangda Tan commented on SUBMARINE-481:
--

[~tangzhankun], [~jiwq], I'm wondering how much effort we need to update our 
existing code to use the job spec. but I do think we need to update it before 
0.4.0 release.

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Priority: Major
>  Labels: pull-request-available
> Attachments: swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-04-28 Thread Wanqiang Ji (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094963#comment-17094963
 ] 

Wanqiang Ji commented on SUBMARINE-481:
---

[~wangda], I'll reassess the effort ASAP.

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Priority: Major
>  Labels: pull-request-available
> Attachments: swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-04-29 Thread Kevin Su (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17096212#comment-17096212
 ] 

Kevin Su commented on SUBMARINE-481:


I have attached the experiment.yaml and simple doc about experiments spec, feel 
free to comment and edit.

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Assignee: Kevin Su
>Priority: Major
>  Labels: pull-request-available
> Attachments: experiment.yaml, swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-04-30 Thread Sunil G (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17096394#comment-17096394
 ] 

Sunil G commented on SUBMARINE-481:
---

Thanks [~pingsutw]

One major doubt. swagger: "2.0" is used here.
 # Did you generate the experiment.yaml spec from source code? 
 # Or is it freshly prepared from a spec definition?

If we are planning to move to swagger: "3.0", its better we generate a template 
and prepare spec from it. swag command which converts annotation into json spec 
wont work in swagger 3.0

As far as I see, there are no annotations in source code, so cud u pls confirm 
whether we are going 1) or 2) model ?

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Assignee: Kevin Su
>Priority: Major
>  Labels: pull-request-available
> Attachments: experiment.yaml, swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-05-01 Thread Wangda Tan (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17097715#comment-17097715
 ] 

Wangda Tan commented on SUBMARINE-481:
--

Thanks [~pingsutw], 

I just posted some comments to 
[https://docs.google.com/document/d/1T-NowARlz0EGrsMiAdUmA6af1b_G4bUPu-eKi7nvuk8/edit#heading=h.t713oano4cl4,
 
|https://docs.google.com/document/d/1T-NowARlz0EGrsMiAdUmA6af1b_G4bUPu-eKi7nvuk8/edit#heading=h.t713oano4cl4]

I will let [~sunilg]/[~tangzhankun], etc. to help with further reviews 
especially how we do implementation by using Swagger. 

Swagger 3.0 should be a better choice as we have some recent projects are 
struggling to upgrade to 3.0. 3.0 has some important features like inheritance 
support, etc. 
[https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism/]

[~jiwq], do you have any more updates about how much work needed to use the new 
API? Draft see 
[https://docs.google.com/document/d/1T-NowARlz0EGrsMiAdUmA6af1b_G4bUPu-eKi7nvuk8/edit#heading=h.t713oano4cl4]

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Assignee: Kevin Su
>Priority: Major
>  Labels: pull-request-available
> Attachments: experiment.yaml, swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-05-02 Thread Wanqiang Ji (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17097868#comment-17097868
 ] 

Wanqiang Ji commented on SUBMARINE-481:
---

Hi, [~wangda]. Recently I read your proposal and the draft, and comment in the 
draft docs.

Due to the spec is describe the experiment, so I think we should do some works 
as below:
 * Refactor the spec and parser (precondition, important)
 * Refactor the REST controller to adapt the new API
 * Refactor the submitter interface and implement
 * Refactor the integration testing
 * Add the swagger to describe the API

If the spec is released, I think it takes about 24h to refactor and test.

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Assignee: Kevin Su
>Priority: Major
>  Labels: pull-request-available
> Attachments: experiment.yaml, swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-05-04 Thread Kevin Su (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099266#comment-17099266
 ] 

Kevin Su commented on SUBMARINE-481:


Thanks [~wangda] [~sunilg] [~jiwq] [~tangzhankun] for the review.
{quote}One major doubt. swagger: "2.0" is used here.
 # Did you generate the experiment.yaml spec from source code?
 # Or is it freshly prepared from a spec definition?

If we are planning to move to swagger: "3.0", its better we generate a template 
and prepare spec from it. swag command which converts annotation into json spec 
wont work in swagger 3.0

As far as I see, there are no annotations in source code, so cud u pls confirm 
whether we are going 1) or 2) model  ?
{quote}
The new experiment API definition that had not yet been implemented, I use 
Swagger editor to generate API definition by swagger 2.0, but swagger support 
[https://mermade.org.uk/openapi-converter] let us not take too much effort to 
migrate to swagger 3.0.

I also tried to add swagger annotations in the current API 
[PR-271|https://github.com/apache/submarine/pull/271], so after source code 
refactor, we could modify correspond annotation to generate experiment.yaml

Updated 
[experiment.yaml|https://app.swaggerhub.com/apis/pingsutw/Submarine/1.0.0] and 
doc, including
 - Add script spec
 - Add distributed TF spec
 - Add distributed PyTorch spec
 - made the pre-defined spec to flat key-value pairs like [predefined 
experiment-template-api|https://github.com/apache/submarine/blob/master/docs/design/experiment-implementation.md#predefined%20experiment-template-api-to-run-experiment]
 - Add Resource spec instead of a string like "cpu=1,memory=1024M"

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Assignee: Kevin Su
>Priority: Major
>  Labels: pull-request-available
> Attachments: experiment.yaml, swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-05-06 Thread Zhankun Tang (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17100633#comment-17100633
 ] 

Zhankun Tang commented on SUBMARINE-481:


[~pingsutw], thanks for the hand-written "experiment.yaml" spec!

How about this? We merge the PR-271 and let [~jiwq] continue the "job-> 
experiment" refactoring based on the new experiment spec.

[~wangda], [~liuxun]  thoughts?

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Assignee: Kevin Su
>Priority: Major
>  Labels: pull-request-available
> Attachments: experiment.yaml, swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org



[jira] [Commented] (SUBMARINE-481) Use Swagger to describe and document submarine RESTful APIs

2020-05-06 Thread Kevin Su (Jira)


[ 
https://issues.apache.org/jira/browse/SUBMARINE-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17101296#comment-17101296
 ] 

Kevin Su commented on SUBMARINE-481:


[~tangzhankun] Thanks for the help. I've updated PR.

> Use Swagger to describe and document submarine RESTful APIs
> ---
>
> Key: SUBMARINE-481
> URL: https://issues.apache.org/jira/browse/SUBMARINE-481
> Project: Apache Submarine
>  Issue Type: Improvement
>  Components: Doc
>Reporter: Kevin Su
>Assignee: Kevin Su
>Priority: Major
>  Labels: pull-request-available
> Attachments: experiment.yaml, swagger.yaml
>
>
> Follow 
> [JobManagerRestApi.java|https://github.com/apache/submarine/blob/31f9322216307f958a1c3ec79e8a09cb0a5f5b5e/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/JobManagerRestApi.java#L44]
>  and [Job.java 
> |https://github.com/apache/submarine/blob/master/submarine-server/server-api/src/main/java/org/apache/submarine/server/api/job/Job.java],
>  [submarine-server 
> doc|https://github.com/apache/submarine/tree/master/docs/submarine-server] to 
> define our job API by swagger
> We could copy swagger.ymal to [https://editor.swagger.io/] so that we could 
> automatically generate doc and related client API.
> Anything I miss or something that needs to modify, please let me know
> cc [~leftnoteasy] [~liuxun] [~jiwq] [~tangzhankun] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org