Install Neuron Plugin for TensorBoard

The Neuron plugin for TensorBoard is available starting with Neuron v1.13.0.

To install the Neuron plugin, first enable ML framework Conda environment of your choice, by running one of the following:

  • Enable PyTorch-Neuron Conda enviroment:

source activate aws_neuron_pytorch_p36
  • Enable TensorFlow-Neuron Conda enviroment:

    To activate TensorFlow 1.x:

    source activate aws_neuron_tensorflow_p36
    

    To activate TensorFlow 2.x:

    # Setup a new Python virtual environment
    sudo apt-get install python3-venv
    python3 -m venv neuron_tf2_env
    source neuron_tf2_env/bin/activate
    pip install --upgrade pip
    pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com
    pip install tensorflow-neuron[cc]
    pip install ipykernel
    python -m ipykernel install --user --name neuron_tf2 --display-name "Python (Neuron TensorFlow 2)"
    pip install jupyter notebook
    pip install environment_kernels
    
  • Enable MXNet-Neuron Conda enviroment:

    source activate aws_neuron_mxnet_p36
    

Then run the following:

If you are using the DLAMI TensorFlow-Neuron Conda environment, please run the following to update TensorBoard before installing the Neuron plugin.

pip install "tensorboard<=2.4.0" --force-reinstall

Modify Pip repository configurations to point to the Neuron repository:

tee $VIRTUAL_ENV/pip.conf > /dev/null <<EOF
[global]
extra-index-url = https://pip.repos.neuron.amazonaws.com
EOF
pip install tensorboard-plugin-neuron

Install Neuron TensorBoard (Deprecated)

Warning

TensorBoard-Neuron is deprecated and no longer compatible with Neuron tools version 1.5 and higher. Neuron tools version 1.5 is first introduced in Neuron v1.13.0 release. Please use the Neuron plugin for TensorBoard instead.

To install Tensorboard, first enable ML framework Conda environment of your choice, by running one of the following:

  • Enable PyTorch-Neuron Conda enviroment:

source activate aws_neuron_pytorch_p36
  • Enable TensorFlow-Neuron Conda enviroment:

    To activate TensorFlow 1.x:

    source activate aws_neuron_tensorflow_p36
    

    To activate TensorFlow 2.x:

    # Setup a new Python virtual environment
    sudo apt-get install python3-venv
    python3 -m venv neuron_tf2_env
    source neuron_tf2_env/bin/activate
    pip install --upgrade pip
    pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com
    pip install tensorflow-neuron[cc]
    pip install ipykernel
    python -m ipykernel install --user --name neuron_tf2 --display-name "Python (Neuron TensorFlow 2)"
    pip install jupyter notebook
    pip install environment_kernels
    
  • Enable Neuron Conda enviroment for Neuron Apache MXNet (Incubating):

    source activate aws_neuron_mxnet_p36
    

Then run the following:

pip install tensorboard-neuron
  • Installing tensorflow-neuron<=1.15.5.1.2.9.0 will automatically install tensorboard-neuron as a dependency. The final version, 1.15.5.1.2.9.0, is part of Neuron v1.12.2 release.

  • To verify tensorboard-neuron is installed correctly, run tensorboard_neuron -h | grep run_neuron_profile. If nothing is shown, please retry installation with the --force-reinstall option.