From 232225f06efe19e59ecb322f507b048eef499bde Mon Sep 17 00:00:00 2001 From: Afroz Mohiuddin Date: Thu, 3 Oct 2019 12:36:55 -0700 Subject: [PATCH] Execute `jupyter nbconvert` on python3 instead of python2. python2 fails with: `RuntimeError: Kernel died before replying to kernel_info` python3 seems to pass. PiperOrigin-RevId: 272718077 --- oss_scripts/oss_tests.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/oss_scripts/oss_tests.sh b/oss_scripts/oss_tests.sh index 2c956e138..ede0fa1f8 100755 --- a/oss_scripts/oss_tests.sh +++ b/oss_scripts/oss_tests.sh @@ -166,9 +166,18 @@ then # Can't add disable warning here since it parses flags. pytest tensor2tensor/rl/trainer_model_based_test.py set_status - jupyter nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute tensor2tensor/notebooks/hello_t2t.ipynb +fi + +if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]] && [[ "$TF_VERSION" == "$TF_LATEST" ]] +then + jupyter nbconvert --ExecutePreprocessor.kernel_name=python3 \ + --ExecutePreprocessor.timeout=600 --to notebook --execute \ + tensor2tensor/notebooks/hello_t2t.ipynb; set_status - jupyter nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute tensor2tensor/notebooks/t2t_problem.ipynb; + + jupyter nbconvert --ExecutePreprocessor.kernel_name=python3 \ + --ExecutePreprocessor.timeout=600 --to notebook --execute \ + tensor2tensor/notebooks/t2t_problem.ipynb; set_status fi