Skip to content

Commit e58d417

Browse files
check lpot version should be less than 1.2 for API issue. update the installation guide
1 parent 8d667ab commit e58d417

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

AI-and-Analytics/Getting-Started-Samples/LPOT-Sample-for-Tensorflow/README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,7 @@ conda activate tensorflow
117117
### Install LPOT by Local Channel
118118

119119
```
120-
cd /opt/intel/oneapi/LPOT/latest
121-
sudo ./install_LPOT.sh
122-
```
123-
or
124-
```
125-
cd /opt/intel/oneapi/iLiT/latest
126-
sudo ./install_iLiT.sh
127-
120+
conda install -c ${ONEAPI_ROOT}/conda_channel numpy pyyaml scikit-learn schema lpot -y
128121
```
129122

130123
### Install Jupyter Notebook

AI-and-Analytics/Getting-Started-Samples/LPOT-Sample-for-Tensorflow/lpot_quantize_model.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
import sys
12
try:
23
import lpot
34
except:
45
import ilit as lpot
56

7+
if lpot.__version__ > '1.1':
8+
print("This script doesn't support LPOT 1.2 or newer, please install LPOT 1.1")
9+
sys.exit(1)
10+
611
import alexnet
712
import math
813
import mnist_dataset

AI-and-Analytics/Getting-Started-Samples/LPOT-Sample-for-Tensorflow/lpot_sample_tensorflow.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"source": [
5252
"Import python packages and check version.\n",
5353
"\n",
54-
"Make sure the Tensorflow is **2.2** or newer and LPOT, matplotlib are installed.\n",
54+
"Make sure the Tensorflow is **2.2** or newer and LPOT is **1.0** or **1.1**, matplotlib are installed.\n",
5555
"\n",
5656
"Note, LPOT has an old name **ilit**. Following script supports to old package name **ilit**."
5757
]
@@ -67,7 +67,7 @@
6767
"\n",
6868
"try:\n",
6969
" import lpot\n",
70-
" print(\"LPOT version {}\".format(lpot.__version__)) \n",
70+
" print(\"LPOT version {}\".format(lpot.__version__)) \n",
7171
"except:\n",
7272
" import ilit as lpot\n",
7373
" print(\"iLiT version {}\".format(lpot.__version__)) \n",
@@ -558,7 +558,7 @@
558558
],
559559
"metadata": {
560560
"kernelspec": {
561-
"display_name": "Python [conda env:miniconda3-vlpot]",
561+
"display_name": "Python [conda env:miniconda3-vlpot] *",
562562
"language": "python",
563563
"name": "conda-env-miniconda3-vlpot-py"
564564
},

0 commit comments

Comments
 (0)