I want to develop using Sagemaker notebooks but I want to use TF 2.0,
Is there a way to do it?
That's a great question. To enable TF 2.0 on the SageMaker notebooks, you can go to the Conda tab (on Jupyter and not JupyterLab) and select the tensorflow_p36 environment. On the bottom left, you can search "tensorflow" in the available Conda packages. There will be a TF2.0 option. Check that box, and the click on the right arrow, which will install TF2.0 into your tensorflow_p36 environment.
Restart any existing notebooks that are open.
Note: This works only with Jupyter and not JupyterLab.
Alex Chung
Senior Product Manager - AWS
Related
I am Using SageMaker Notebook for some deep learning tasks. However, raw SageMaker does not provide much of nbextension options such as auto complete for Hinter, not even provide a configurator as traditional Notebook. So, I installed jupyter_contrib_nbextensions and try to enable Hinter by jupyter nbextension enable Hinter/main.
However, the functionality still does not show up.
When I run Jupyter nbextension list, it shows like:
Can someone tell me how to successfully add and use nbextension on SageMaker Notebook?
Thanks in advance
Every time my notebook shuts down and restarts, I lose the plugins and have to reinstall them from the terminal
Is there a way to set jupyterlab extensions to be installed automatically on starting my sagemaker notebook?
The plugin I'm trying to install is:
jupyter nbextension enable --py widgetsnbextension
jupyter labextension install #jupyter-widgets/jupyterlab-manager
Any insight would be appreciated
Lifecycle Configuration can be used to install a extension every time your Notebook Instance starts up.
There are sample Lifecycle Configuration scripts for installing a JupyterLab extension [1] as well as an NBExtension [2] that can be used for this purpose.
[1] https://github.com/aws-samples/amazon-sagemaker-notebook-instance-lifecycle-config-samples/blob/master/scripts/install-lab-extension/on-start.sh
[2] https://github.com/aws-samples/amazon-sagemaker-notebook-instance-lifecycle-config-samples/blob/master/scripts/install-nb-extension/on-start.sh
I started using VM instances in Google Cloud Platform to train deep learning. In a Linux machine what is the best way to start running cells of Jupyter Notebook without opening browser, just by command in terminal. Also I want to see all the output in terminal.
Yes this is possible and there are different ways of doing it;
One way is to use runipy. This will run all cells in a notebook.
The source code is here runipy
You can also save the output as html report or a notebook
You can install runipy using pip
$ pip3 install runipy
Another method is to use the python3 module nbconvert.
This would allow you to use a python interactive shell.
See the official Python documentation here Executing notebooks from the command line
Is there a way to do it right from a cell in the notebook? similar to pip install ... --upgrade
I didn't know how to do what's instructed on https://docs.qubole.com/en/latest/faqs/general-questions/install-custom-python-libraries.html#pre-installed-python-libraries
The current Python version is 3.5.3, and Pandas 0.20.1. I need to upgrade Pandas, and Matplotlib
In Qubole are two ways to upgrade/install a package for the python environment. Currently there is no interface available inside notebook to install new packages.
New and Recommended Way (via Package Mangement) : User can enable Package Management functionality for an account and add new packages to a cluster via UI. There are lot of advantages of using package management over cluster versions in terms of performance and usability. Refer to https://docs.qubole.com/en/latest/user-guide/package-management/index.html for further details.
Old Way (via bootstrap) : User can configure a bootstrap which is basically a shell script executed on each node when the cluster starts and or upscales (more nodes are getting added to cluster). This can be configured via clusters UI and need a cluster start for every change. This is what is instructed in link you shared.
You cannot download/upgrade packages directly from the cell in the notebook. This is because your notebook is associated to a cluster. Now, to ensure that all the nodes of the cluster have the package installed, you must either use the package management (https://docs.qubole.com/en/latest/user-guide/package-management/package-management-environment.html) or the cluster's node bootstrap (https://docs.qubole.com/en/latest/user-guide/clusters/run-scripts-cluster.html#examples-node-scripts).
Do let me know if you have any further questions.
I am using Zeppelin sandbox with aws EMR.
Is there a way to download or save the zeppelin notebook in a way so that it can be imported into another Zeppelin server ?
As noted in the comments above, this feature is available starting in version 0.5.6. You can find more details in the release notes. Downloading and installing this version would solve that issue.
Given that you are using EMR, it looks like you will have to work with the version available. As Samuel mentioned above, you can backup the contents of the incubator-zeppelin/notebook folder and make the transfer.