Skip to content

Commit 4c2f4ef

Browse files
authored
importlib.reload(pkg_resources) for tensorflow.org (#631)
1 parent 1b6f944 commit 4c2f4ef

9 files changed

+137
-2
lines changed

docs/tutorials/barren_plateaus.ipynb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,21 @@
123123
"!pip install tensorflow-quantum"
124124
]
125125
},
126+
{
127+
"cell_type": "code",
128+
"execution_count": 0,
129+
"metadata": {
130+
"colab": {},
131+
"colab_type": "code",
132+
"id": "4Ql5PW-ACO0J"
133+
},
134+
"outputs": [],
135+
"source": [
136+
"# Update package resources to account for version changes.\n",
137+
"import importlib, pkg_resources\n",
138+
"importlib.reload(pkg_resources)"
139+
]
140+
},
126141
{
127142
"cell_type": "markdown",
128143
"metadata": {

docs/tutorials/gradients.ipynb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,21 @@
125125
"!pip install tensorflow-quantum"
126126
]
127127
},
128+
{
129+
"cell_type": "code",
130+
"execution_count": 0,
131+
"metadata": {
132+
"colab": {},
133+
"colab_type": "code",
134+
"id": "4Ql5PW-ACO0J"
135+
},
136+
"outputs": [],
137+
"source": [
138+
"# Update package resources to account for version changes.\n",
139+
"import importlib, pkg_resources\n",
140+
"importlib.reload(pkg_resources)"
141+
]
142+
},
128143
{
129144
"cell_type": "markdown",
130145
"metadata": {

docs/tutorials/hello_many_worlds.ipynb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,21 @@
123123
"!pip install tensorflow-quantum"
124124
]
125125
},
126+
{
127+
"cell_type": "code",
128+
"execution_count": 0,
129+
"metadata": {
130+
"colab": {},
131+
"colab_type": "code",
132+
"id": "4Ql5PW-ACO0J"
133+
},
134+
"outputs": [],
135+
"source": [
136+
"# Update package resources to account for version changes.\n",
137+
"import importlib, pkg_resources\n",
138+
"importlib.reload(pkg_resources)"
139+
]
140+
},
126141
{
127142
"cell_type": "markdown",
128143
"metadata": {

docs/tutorials/mnist.ipynb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,21 @@
123123
"!pip install tensorflow-quantum"
124124
]
125125
},
126+
{
127+
"cell_type": "code",
128+
"execution_count": 0,
129+
"metadata": {
130+
"colab": {},
131+
"colab_type": "code",
132+
"id": "4Ql5PW-ACO0J"
133+
},
134+
"outputs": [],
135+
"source": [
136+
"# Update package resources to account for version changes.\n",
137+
"import importlib, pkg_resources\n",
138+
"importlib.reload(pkg_resources)"
139+
]
140+
},
126141
{
127142
"cell_type": "markdown",
128143
"metadata": {

docs/tutorials/noise.ipynb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,21 @@
122122
"execution_count": null,
123123
"outputs": []
124124
},
125+
{
126+
"cell_type": "code",
127+
"execution_count": 0,
128+
"metadata": {
129+
"colab": {},
130+
"colab_type": "code",
131+
"id": "4Ql5PW-ACO0J"
132+
},
133+
"outputs": [],
134+
"source": [
135+
"# Update package resources to account for version changes.\n",
136+
"import importlib, pkg_resources\n",
137+
"importlib.reload(pkg_resources)"
138+
]
139+
},
125140
{
126141
"cell_type": "code",
127142
"metadata": {
@@ -787,4 +802,4 @@
787802
]
788803
}
789804
]
790-
}
805+
}

docs/tutorials/qcnn.ipynb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,21 @@
125125
"!pip install tensorflow-quantum"
126126
]
127127
},
128+
{
129+
"cell_type": "code",
130+
"execution_count": 0,
131+
"metadata": {
132+
"colab": {},
133+
"colab_type": "code",
134+
"id": "4Ql5PW-ACO0J"
135+
},
136+
"outputs": [],
137+
"source": [
138+
"# Update package resources to account for version changes.\n",
139+
"import importlib, pkg_resources\n",
140+
"importlib.reload(pkg_resources)"
141+
]
142+
},
128143
{
129144
"cell_type": "markdown",
130145
"metadata": {

docs/tutorials/quantum_data.ipynb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,21 @@
114114
"!pip install tensorflow==2.4.1 tensorflow-quantum"
115115
]
116116
},
117+
{
118+
"cell_type": "code",
119+
"execution_count": 0,
120+
"metadata": {
121+
"colab": {},
122+
"colab_type": "code",
123+
"id": "4Ql5PW-ACO0J"
124+
},
125+
"outputs": [],
126+
"source": [
127+
"# Update package resources to account for version changes.\n",
128+
"import importlib, pkg_resources\n",
129+
"importlib.reload(pkg_resources)"
130+
]
131+
},
117132
{
118133
"cell_type": "code",
119134
"execution_count": 3,

docs/tutorials/quantum_reinforcement_learning.ipynb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,21 @@
175175
"Now import TensorFlow and the module dependencies:"
176176
]
177177
},
178+
{
179+
"cell_type": "code",
180+
"execution_count": 0,
181+
"metadata": {
182+
"colab": {},
183+
"colab_type": "code",
184+
"id": "4Ql5PW-ACO0J"
185+
},
186+
"outputs": [],
187+
"source": [
188+
"# Update package resources to account for version changes.\n",
189+
"import importlib, pkg_resources\n",
190+
"importlib.reload(pkg_resources)"
191+
]
192+
},
178193
{
179194
"cell_type": "code",
180195
"execution_count": 1,

docs/tutorials/research_tools.ipynb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,22 @@
8686
"!pip install tensorflow==2.4.1 tensorflow-quantum tensorboard_plugin_profile==2.4.0"
8787
]
8888
},
89-
{
89+
{
90+
"cell_type": "code",
91+
"execution_count": 0,
92+
"metadata": {
93+
"colab": {},
94+
"colab_type": "code",
95+
"id": "4Ql5PW-ACO0J"
96+
},
97+
"outputs": [],
98+
"source": [
99+
"# Update package resources to account for version changes.\n",
100+
"import importlib, pkg_resources\n",
101+
"importlib.reload(pkg_resources)"
102+
]
103+
},
104+
{
90105
"cell_type": "code",
91106
"execution_count": null,
92107
"metadata": {

0 commit comments

Comments
 (0)