Skip to content

Commit 311d3b7

Browse files
authored
Merge pull request #689 from GoogleCloudPlatform/update_vertex_xai
Add TF_USE_LEGACY_KERAS env variable to Vertex XAI notebook
2 parents 660aaf1 + b3d1e41 commit 311d3b7

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

notebooks/responsible_ai/explainable_ai/labs/xai_image_vertex.ipynb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,18 @@
5959
"metadata": {},
6060
"outputs": [],
6161
"source": [
62-
"import base64\n",
6362
"import os\n",
63+
"\n",
64+
"os.environ[\"TF_USE_LEGACY_KERAS\"] = \"1\""
65+
]
66+
},
67+
{
68+
"cell_type": "code",
69+
"execution_count": null,
70+
"metadata": {},
71+
"outputs": [],
72+
"source": [
73+
"import base64\n",
6474
"import random\n",
6575
"from datetime import datetime\n",
6676
"from io import BytesIO\n",
@@ -978,9 +988,9 @@
978988
},
979989
"environment": {
980990
"kernel": "conda-base-py",
981-
"name": "workbench-notebooks.m121",
991+
"name": "workbench-notebooks.m133",
982992
"type": "gcloud",
983-
"uri": "us-docker.pkg.dev/deeplearning-platform-release/gcr.io/workbench-notebooks:m121"
993+
"uri": "us-docker.pkg.dev/deeplearning-platform-release/gcr.io/workbench-notebooks:m133"
984994
},
985995
"kernelspec": {
986996
"display_name": "Python 3 (ipykernel) (Local)",
@@ -997,7 +1007,7 @@
9971007
"name": "python",
9981008
"nbconvert_exporter": "python",
9991009
"pygments_lexer": "ipython3",
1000-
"version": "3.10.14"
1010+
"version": "3.10.18"
10011011
}
10021012
},
10031013
"nbformat": 4,

notebooks/responsible_ai/explainable_ai/solutions/xai_image_vertex.ipynb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,25 @@
5656
{
5757
"cell_type": "code",
5858
"execution_count": null,
59-
"metadata": {},
59+
"metadata": {
60+
"tags": []
61+
},
6062
"outputs": [],
6163
"source": [
62-
"import base64\n",
6364
"import os\n",
65+
"\n",
66+
"os.environ[\"TF_USE_LEGACY_KERAS\"] = \"1\""
67+
]
68+
},
69+
{
70+
"cell_type": "code",
71+
"execution_count": null,
72+
"metadata": {
73+
"tags": []
74+
},
75+
"outputs": [],
76+
"source": [
77+
"import base64\n",
6478
"import random\n",
6579
"from datetime import datetime\n",
6680
"from io import BytesIO\n",

0 commit comments

Comments
 (0)