Now you can spin up a Jupyter notebook from the Polyaxon CLI with the following command
polyaxon notebook start -f polyaxonfile.yml
If you wish to upload your code before starting the notebook you can add the
-u flag, i.e.
polyaxon notebook start -f polyaxonfile.yml -u
The polyaxonfile.yml should follow same specification for experiments and experiment groups.
Here’s a minimal polyaxonfile.yml for jupyter notebook
version: 1 kind: notebook build: image: python:3 steps: - pip3 install jupyter
This should start a jupyter notebook using python3 environment. You can open the notebook directly from the link in the command output or you can find it on the project page on the Polyaxon dashboard.
The notebook will follow the same permissions of the project that it belongs to, in other terms, only users with access rights to the project can access the notebook.
Restart notebooks with different configuration
If you which to restart the notebook with a different configuration, i.e. different dependencies or custom resources, for example you might need tensorflow and scikit learn in your environment, and you might need to set custom resources for the deployment, here’s an example of a polyaxonfile
version: 1 kind: notebook environment: resources: cpu: requests: 2 limits: 4 gpu: requests: 1 limits: 1 memory: requests: 512 limits: 2048 build: image: tensorflow/tensorflow:1.4.1-py3 steps: - pip3 install scikit-learn - pip3 install jupyter
You just need to stop the current notebook with the following command:
polyaxon notebook stop
And restart the notebook with the new polyaxonfile
polyaxon notebook start -f new_polyaxonfile.yml
Now you can continue working from where you left off in your previous deployment.
This is a great way to start your experiment and do some preliminary exploration. When you are ready, you can switch to running your Notebook with GPU .
although tensorboard was supported from the early versions of Polyaxon, it was not possible to start tensorboard with custom configuration, i.e. different versions and different resources.
The only difference between tensorboard and notebooks deployments, is that you can optionally start tensorboard without a polyaxonfile, in that case it will use default values.
polyaxon tensorborad start
Tensorboard also will follow the same permissions of the project that it belongs to, which means it will be only accessible to users with access rights to the project.
Restart tensorboard with different configuration
Same as notebooks, tensorboard can be deployed with custom configuration, i.e. custom image, custom dependencies, and custom resources.
You just need to stop the running tensorboard
polyaxon tensorboard stop
And restart tensorboard with the custom polyaxonfile specification
polyaxon tensorboard start -f new_polyaxonfile.yml
We hope that this new features will help you with your workflow, and as always, let us know if you have any feedback on this and other features on Polyaxon.
Subscribe to Polyaxon
Get the latest posts delivered right to your inbox