Skip to content

Commit 9b94ebf

Browse files
committed
Upgrade the latest gym for notebook tutorial.
1 parent 39a811d commit 9b94ebf

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

scripts/ci_validate_tutorials.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
# ==============================================================================
1616

1717
# Run the tutorials using the installed pip package
18-
pip install jupyter nbconvert==6.4.3 jupyter-client==6.1.12 ipython==7.22.0
18+
pip install jupyter nbclient==0.6.5 jupyter-client==6.1.12 ipython==7.22.0
1919
# Workaround for ipykernel - see https://github.com/ipython/ipykernel/issues/422
2020
pip install ipykernel==5.1.1
2121
# OpenAI Gym pip package needed for the quantum reinforcement learning tutorial
22-
pip install gym==0.18.0
22+
pip install gym==0.24.1
2323
# tf_docs pip package needed for noise tutorial.
2424
pip install -q git+https://github.com/tensorflow/docs
2525
# Leave the quantum directory, otherwise errors may occur

scripts/test_tutorials.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from absl.testing import parameterized
2020
import nbformat
21-
import nbconvert
21+
import nbclient
2222
import tensorflow as tf
2323

2424
# Must be run from the directory containing `quantum` repo.
@@ -46,9 +46,7 @@ def test_notebook(self, path):
4646
src = re.sub('n_epochs ?= ?.*', 'n_epochs = 2', src)
4747
cell['source'] = src
4848

49-
_ = nbconvert.preprocessors.execute.executenb(nb,
50-
timeout=900,
51-
kernel_name="python3")
49+
_ = nbclient.execute(nb, timeout=900, kernel_name="python3")
5250

5351

5452
if __name__ == "__main__":

0 commit comments

Comments
 (0)