Skip to content

Commit de59893

Browse files
arjungtensorflow-copybara
authored andcommitted
Change NSL graph tutorials to use TF 2.2.x because of a bug in TensorFlow core, and update the README and the INSTALL guides accordingly.
PiperOrigin-RevId: 290796523
1 parent 5303d7c commit de59893

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ from source in various environments, please see the
4949
[installation guide](g3doc/install.md)
5050

5151
Note that NSL requires a TensorFlow version of 1.15 or higher. NSL also supports
52-
TensorFlow 2.0.
52+
TensorFlow 2.x with the exception of v2.1, which contains a bug that is
53+
incompatible with NSL.
5354

5455
## Contributing to NSL
5556

g3doc/install.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Learning (NSL) in TensorFlow:
1212
* If you have a unique machine configuration,
1313
[build NSL](#build-the-neural-structured-learning-pip-package) from source.
1414

15-
Note: NSL requires a TensorFlow version of 1.15 or higher.
15+
Note: NSL requires a TensorFlow version of 1.15 or higher. NSL also supports
16+
TensorFlow 2.x with the exception of v2.1, which contains a bug that is
17+
incompatible with NSL.
1618

1719
## Install Neural Structured Learning using pip
1820

g3doc/tutorials/graph_keras_lstm_imdb.ipynb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"source": [
115115
"## Requirements\n",
116116
"\n",
117-
"1. Select TensorFlow 2.x to create an interactive development environment with eager execution.\n",
117+
"1. Install TensorFlow 2.2.x to create an interactive development environment with eager execution.\n",
118118
"2. Install the Neural Structured Learning package.\n",
119119
"3. Install tensorflow-hub."
120120
]
@@ -129,11 +129,7 @@
129129
},
130130
"outputs": [],
131131
"source": [
132-
"try:\n",
133-
" # %tensorflow_version only exists in Colab.\n",
134-
" %tensorflow_version 2.x\n",
135-
"except Exception:\n",
136-
" !pip install tensorflow-gpu>=2.0.0"
132+
"!pip install --quiet tf-nightly==2.2.0.dev20200119"
137133
]
138134
},
139135
{

g3doc/tutorials/graph_keras_mlp_cora.ipynb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"id": "hgSLDi0SyBuO"
117117
},
118118
"source": [
119-
"1. Select TensorFlow 2.x to create an interactive development environment with eager execution.\n",
119+
"1. Install TensorFlow 2.2.x to create an interactive development environment with eager execution.\n",
120120
"2. Install the Neural Structured Learning package."
121121
]
122122
},
@@ -130,11 +130,7 @@
130130
},
131131
"outputs": [],
132132
"source": [
133-
"try:\n",
134-
" # %tensorflow_version only exists in Colab.\n",
135-
" %tensorflow_version 2.x\n",
136-
"except Exception:\n",
137-
" !pip install tensorflow-gpu>=2.0.0"
133+
"!pip install --quiet tf-nightly==2.2.0.dev20200119"
138134
]
139135
},
140136
{

0 commit comments

Comments
 (0)