This document is relevant for: Inf1
, Inf2
, Trn1
, Trn2
Running Jupyter Notebook as script#
Converting the Jupyter Notebook and running#
Go into the aws-neuron-sdk repository directory containing the Jupyter Notebook (.ipynb file),
cd aws-neuron-sdk/src/examples/<framework like pytorch, tensorflow, etc>
The Jupyter Notebook (.ipynb) can be converted to python script using jupyter-nbconvert. For example,
jupyter nbconvert --to script tutorial_pretrained_bert.ipynb
and can be run in the virtual env (if needed),
# if not already in the virtual env,
source activate <virtual env>
# Run the converted script
python <tutorial.py>
This document is relevant for: Inf1
, Inf2
, Trn1
, Trn2