Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the web-ui for the mnist example #473

Merged
merged 3 commits into from
Jan 14, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tensorboard; tensorboard only partially works behind Ambassador. …
…It seems like some requests don't work behind a reverse proxy.
  • Loading branch information
jlewi committed Jan 13, 2019
commit 479de1822768ce86f86316dc3afeb59f568997ea
26 changes: 22 additions & 4 deletions mnist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,14 +464,32 @@ There are various ways to monitor workflow/training job. In addition to using `k

TODO: This section needs to be updated

Tensorboard is deployed just before training starts. To connect:
Configure TensorBoard to point to your model location

```
PODNAME=$(kubectl get pod -l app=tensorboard-${JOB_NAME} -o jsonpath='{.items[0].metadata.name}')
kubectl port-forward ${PODNAME} 6006:6006
ks param set tensorboard --env=${KSENV} logDir ${LOGDIR}

```

Assuming you followed the directions above if you used GCS you can use the following value

```
LOGDIR=gs://${BUCKET}/${MODEL_PATH}
```

Then you can deploy tensorboard

```
ks apply ${KSENV} -c tensorboard
```

To access tensorboard using port-forwarding

```
kubectl -n jlewi port-forward service/tensorboard-tb 8090:80
```
Tensorboard can now be accessed at [http://127.0.0.1:8090](http://127.0.0.1:8090).

Tensorboard can now be accessed at [http://127.0.0.1:6006](http://127.0.0.1:6006).

## Serving the model

Expand Down
2 changes: 1 addition & 1 deletion mnist/ks_app/components/params.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
trafficRule: 'v1:100',
},
"tensorboard": {
image: "tensorflow/tensorflow:1.11.1",
image: "tensorflow/tensorflow:1.11.0",
logDir: "gs://example/to/model/logdir",
name: "tensorboard",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ local service = {
"apiVersion: ambassador/v0",
"kind: Mapping",
"name: " + name + "_mapping",
"prefix: /tensorboard/" + name + "/",
"prefix: /" + env.namespace + "/tensorboard/mnist",
"rewrite: /",
"service: " + name + "-tb." + namespace,
"---",
"apiVersion: ambassador/v0",
"kind: Mapping",
"name: " + name + "_mapping_data",
"prefix: /" + env.namespace + "/tensorboard/mnist/data/",
"rewrite: /data/",
"service: " + name + "-tb." + namespace,
]),
}, //annotations
},
Expand Down
3 changes: 3 additions & 0 deletions mnist/ks_app/environments/jlewi/params.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ local envParams = params + {
"mnist-service"+: {
namespace: 'jlewi',
},
tensorboard+: {
logDir: 'gs://kubeflow-ci_temp/mnist-jlewi/',
},
},
};

Expand Down