You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by li...@apache.org on 2020/05/12 01:46:19 UTC
[submarine] branch master updated: SUBMARINE-496. Add JobLog rest
api document
This is an automated email from the ASF dual-hosted git repository.
liuxun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new b809586 SUBMARINE-496. Add JobLog rest api document
b809586 is described below
commit b80958612d8b2ebfb487b4b69927cd0b47322ad2
Author: JohnTing <jo...@gmail.com>
AuthorDate: Mon May 11 20:40:07 2020 +0800
SUBMARINE-496. Add JobLog rest api document
### What is this PR for?
Add JobLog rest api document to https://github.com/apache/submarine/blob/master/docs/submarine-server/README.md
### What type of PR is it?
Improvement
### Todos
* [x] - Add JobLog rest api document
### What is the Jira issue?
https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-496
### How should this be tested?
* First time? Setup Travis CI as described on https://submarine.apache.org/contribution/contributions.html#continuous-integration
* Strongly recommended: add automated unit tests for any new or changed behavior
* Outline any manual steps to test the PR here.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? Yes/No
* Is there breaking changes for older versions? Yes/No
* Does this needs documentation? Yes/No
Author: JohnTing <jo...@gmail.com>
Closes #282 from JohnTing/SUBMARINE-496 and squashes the following commits:
61b8d97 [JohnTing] JobLog doc
---
docs/submarine-server/README.md | 75 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/docs/submarine-server/README.md b/docs/submarine-server/README.md
index 9afc3cf..05bcd89 100644
--- a/docs/submarine-server/README.md
+++ b/docs/submarine-server/README.md
@@ -400,3 +400,78 @@ curl -X DELETE http://127.0.0.1/api/v1/jobs/job_123_01
}
}
```
+
+### List Job Log
+`GET /api/v1/jobs/logs`
+
+**Example Request:**
+```sh
+curl -X GET http://127.0.0.1/api/v1/jobs/logs
+```
+
+**Example Response:**
+```sh
+{
+ "status": "OK",
+ "code": 200,
+ "success": null,
+ "message": null,
+ "result": [
+ {
+ "jobId": "job_1589199154923_0001",
+ "logContent": [
+ {
+ "podName": "mnist-worker-0",
+ "podLog": null
+ }
+ ]
+ },
+ {
+ "jobId": "job_1589199154923_0002",
+ "logContent": [
+ {
+ "podName": "pytorch-dist-mnist-gloo-master-0",
+ "podLog": null
+ },
+ {
+ "podName": "pytorch-dist-mnist-gloo-worker-0",
+ "podLog": null
+ }
+ ]
+ }
+ ],
+ "attributes": {}
+}
+```
+
+### Get Job Log
+`GET /api/v1/jobs/logs/{id}`
+
+**Example Request:**
+```sh
+curl -X GET http://127.0.0.1/api/v1/jobs/logs/job_1589199154923_0002
+```
+
+**Example Response:**
+```sh
+{
+ "status": "OK",
+ "code": 200,
+ "success": null,
+ "message": null,
+ "result": {
+ "jobId": "job_1589199154923_0002",
+ "logContent": [
+ {
+ "podName": "pytorch-dist-mnist-gloo-master-0",
+ "podLog": "Using distributed PyTorch with gloo backend\nDownloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz\nDownloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz\nDownloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz\nDownloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz\nProcessing...\nDone!\nTrain Epoch: 1 [0/60000 (0%)]\tloss=2.3000\nTrain Epoch: 1 [640/60000 (1%)]\tloss=2.2135\nTrain Epoch: 1 [12 [...]
+ },
+ {
+ "podName": "pytorch-dist-mnist-gloo-worker-0",
+ "podLog": "Using distributed PyTorch with gloo backend\nDownloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz\nDownloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz\nDownloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz\nDownloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz\nProcessing...\nDone!\nTrain Epoch: 1 [0/60000 (0%)]\tloss=2.3000\nTrain Epoch: 1 [640/60000 (1%)]\tloss=2.2135\nTrain Epoch: 1 [12 [...]
+ }
+ ]
+ },
+ "attributes": {}
+}
+```
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org