TensorBoard Example Web App
View full source code on GitHub
This example demonstrates how to run TensorBoard inside a DNAnexus applet.
TensorBoard is a web application used to visualize and inspect what is going on inside TensorFlow training. To use TensorBoard, our training script in TensorFlow needs to include code that saves various data to a log directory where TensorBoard can then find the data to display it.
This example uses an example script from the TensorBoard authors. For more guidance on how to use TensorBoard, check out the tensorflow website (external link).
Creating the web application
The applet code runs a training script, which is placed in resources/home/dnanexus/
to make it available in the current working directory of the worker, and then it starts tensorboard on port 443 (HTTPS).
We run the training script in the background to start TensorBoard immediately, which will let us see the results while training is still running. This is particularly important for long-running training scripts.
Note that for all web apps, if everything is running smoothly and no errors are encountered (the ideal case), the line of code that starts the server will keep it running forever. The applet stops only when it is terminated. This also means that any lines of code after the server starts will not be executed.
As with all web apps, the dxapp.json
must include "httpsApp": {"ports":[443], "shared_access": "VIEW"}
to tell the worker to expose port 443.
Creating an applet on DNAnexus
Build the asset with the libraries first:
Take the record ID it outputs and add it to the dxapp.json for the applet.
Then build the applet
Once it spins up, you can go to that job’s designated URL based on its job ID, https://job-xxxx.dnanexus.cloud/, to see the result.
Last updated