You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@submarine.apache.org by GitBox <gi...@apache.org> on 2020/06/11 14:39:53 UTC
[GitHub] [submarine] tangzhankun edited a comment on pull request #305: SUBMARINE-499. Refactor job API to experiment API
tangzhankun edited a comment on pull request #305:
URL: https://github.com/apache/submarine/pull/305#issuecomment-642701325
And this is JSON format of this PR:
```
{
"name": "mnist",
"namespace": "default",
"type": "adhoc",
"spec": {
"type": "tensorflow",
"ps": {
"name": "tensorflow",
"cmd": [
"python",
"/var/tf_mnist/mnist_with_summaries.py",
"--log_dir=/train/log",
"--learning_rate=0.01",
"--batch_size=150"
],
"envVars": {
"ENV_1": "ENV1"
},
"resource": {
"cpu": "1",
"memory": "512M"
},
"replicas": 1
},
"worker": {
"name": "tensorflow",
"cmd": [
"python",
"/var/tf_mnist/mnist_with_summaries.py",
"--log_dir=/train/log",
"--learning_rate=0.01",
"--batch_size=150"
],
"envVars": {
"ENV_1": "ENV1"
},
"resource": {
"cpu": "1",
"memory": "512M"
},
"replicas": 1
}
},
"code": {
"mode": "docker",
"url": "gcr.io/kubeflow-ci/tf-mnist-with-summaries:1.0"
}
}
```
And our Job Spec in JSON format:
```
{
"name": "mnist",
"librarySpec": {
"name": "TensorFlow",
"version": "2.1.0",
"image": "gcr.io/kubeflow-ci/tf-mnist-with-summaries:1.0",
"cmd": "python /var/tf_mnist/mnist_with_summaries.py --log_dir=/train/log --learning_rate=0.01 --batch_size=150",
"envVars": {
"ENV_1": "ENV1"
}
},
"submitterSpec": {
"type": "k8s",
"namespace": "submarine"
},
"taskSpecs": {
"Ps": {
"name": "tensorflow",
"replicas": 2,
"resources": "cpu=4,memory=2048M,nvidia.com/gpu=1"
},
"Worker": {
"name": "tensorflow",
"replicas": 2,
"resources": "cpu=4,memory=2048M,nvidia.com/gpu=1"
}
}
}
```
And our new expected experiment spec:
```
{
"name": "mnist",
"namespace": "default",
“type”: “adhoc”,
"environment": {
"dockerImage": "gcr.io/kubeflow-ci/tf-mnist-with-summaries:1.0"
}
"cmd": "python /var/tf_mnist/mnist_with_summaries.py --log_dir=/train/log --learning_rate=0.01 --batch_size=150",
"spec": {
“type”: "TensorFlow",
"Ps": {
"name": "ps",
"replicas": 2,
"resources": "cpu=4,memory=2048M,nvidia.com/gpu=1"
},
"Worker": {
"name": "worker",
"replicas": 2,
"resources": "cpu=4,memory=2048M,nvidia.com/gpu=1"
}
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org