Skip to content

Commit 75bf6fd

Browse files
committed
update kt install
1 parent 9047ac8 commit 75bf6fd

File tree

7 files changed

+36
-17
lines changed

7 files changed

+36
-17
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
run: |
1818
python -m pip install --upgrade pip setuptools
1919
pip install git+https://github.com/gabrieldemarmiesse/[email protected]
20+
pip install git+https://github.com/keras-team/[email protected]
2021
pip install -e .[tests] --progress-bar off
2122
pip install twine
2223
- name: Lint

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- name: Install dependencies
1818
run: |
1919
python -m pip install --upgrade pip setuptools
20+
pip install git+https://github.com/keras-team/[email protected]
2021
pip install -e .[tests] --progress-bar off
2122
- name: Test with pytest
2223
run: |
@@ -46,6 +47,7 @@ jobs:
4647
- name: Install dependencies
4748
run: |
4849
python -m pip install --upgrade pip setuptools
50+
pip install git+https://github.com/keras-team/[email protected]
4951
pip install -e .
5052
pip install -r docs/requirements.txt
5153
- name: Build the docs

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ For detailed tutorial, please check [here](https://autokeras.com/tutorial/overvi
3636
To install the package, please use the `pip` installation as follows:
3737

3838
```shell
39-
pip3 install autokeras
39+
pip3 install git+https://github.com/keras-team/[email protected]
40+
pip3 install autokeras==1.0.3
4041
```
4142

4243
Please follow the [installation guide](https://autokeras.com/install) for more details.
4344

44-
**Note:** Currently, AutoKeras is only compatible with **Python >= 3.5** and **TensorFlow >= 2.1.0**.
45+
**Note:** Currently, AutoKeras is only compatible with **Python >= 3.5** and **TensorFlow >= 2.2.0**.
4546

4647
## Community
4748
<p float="left">

autokeras/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@
3939
from autokeras.tuners import Greedy
4040
from autokeras.tuners import Hyperband
4141
from autokeras.tuners import RandomSearch
42+
from autokeras.utils.utils import check_kt_version
4243
from autokeras.utils.utils import check_tf_version
4344

44-
__version__ = '1.0.3rc0'
45+
__version__ = '1.0.3'
46+
4547
check_tf_version()
48+
check_kt_version()

autokeras/utils/utils.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import json
22
import re
33

4+
import kerastuner
45
import tensorflow as tf
56
from packaging.version import parse
67
from tensorflow.python.util import nest
@@ -42,19 +43,31 @@ def to_type_key(dictionary, convert_func):
4243

4344

4445
def check_tf_version() -> None:
45-
if parse(tf.__version__) < parse('2.1.0'):
46+
if parse(tf.__version__) < parse('2.2.0'):
4647
raise ImportError(
47-
'The Tensorflow package version needs to be at least v2.1.0 \n'
48+
'The Tensorflow package version needs to be at least 2.2.0 \n'
4849
'for AutoKeras to run. Currently, your TensorFlow version is \n'
49-
'v{version}. Please upgrade with \n'
50-
'`$ pip install --upgrade tensorflow` -> GPU version \n'
51-
'or \n'
52-
'`$ pip install --upgrade tensorflow-cpu` -> CPU version. \n'
50+
'{version}. Please upgrade with \n'
51+
'`$ pip install --upgrade tensorflow`. \n'
5352
'You can use `pip freeze` to check afterwards that everything is '
5453
'ok.'.format(version=tf.__version__)
5554
)
5655

5756

57+
def check_kt_version() -> None:
58+
if parse(kerastuner.__version__) < parse('1.0.2rc0'):
59+
raise ImportError(
60+
'The Keras Tuner package version needs to be at least 1.0.2rc0 \n'
61+
'for AutoKeras to run. Currently, your Keras Tuner version is \n'
62+
'{version}. Please upgrade with \n'
63+
'`$ pip install '
64+
'git+https://github.com/keras-team/[email protected]'
65+
'#egg=keras-tuner-1.0.2rc0`. \n'
66+
'You can use `pip freeze` to check afterwards that everything is '
67+
'ok.'.format(version=kerastuner.__version__)
68+
)
69+
70+
5871
def save_json(path, obj):
5972
obj = json.dumps(obj)
6073
with tf.io.gfile.GFile(path, 'w') as f:

docs/templates/install.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**Pip**: Follow the TensorFlow install steps to install Pip.
66

7-
**Tensorflow >= 2.1.0**: AutoKeras is based on TensorFlow.
7+
**Tensorflow >= 2.2.0**: AutoKeras is based on TensorFlow.
88
Please follow
99
[this tutorial](https://www.tensorflow.org/install/pip) to install TensorFlow for python3.
1010

@@ -17,12 +17,14 @@ AutoKeras only support **Python 3**.
1717
If you followed previous steps to use virtualenv to install tensorflow,
1818
you can just activate the virtualenv and use the following command to install AutoKeras.
1919
```
20-
pip install autokeras
20+
pip install git+https://github.com/keras-team/[email protected]
21+
pip install autokeras==1.0.3
2122
```
2223

2324
If you did not use virtualenv, and you use `python3` command to execute your python program,
2425
please use the following command to install AutoKeras.
2526
```
26-
python3 -m pip install autokeras
27+
python3 -m pip install git+https://github.com/keras-team/[email protected]
28+
python3 -m pip install autokeras==1.0.3
2729
```
2830

setup.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
setup(
1010
name='autokeras',
11-
version='1.0.3rc0',
11+
version='1.0.3',
1212
description='AutoML for deep learning',
1313
package_data={'': ['README.md']},
1414
long_description=readme.read_text(encoding='utf-8'),
1515
long_description_content_type='text/markdown',
1616
author='Data Analytics at Texas A&M (DATA) Lab, Keras Team',
1717
author_email='[email protected]',
1818
url='http://autokeras.com',
19-
download_url='https://github.com/keras-team/autokeras/archive/1.0.3rc0.tar.gz',
19+
download_url='https://github.com/keras-team/autokeras/archive/1.0.3.tar.gz',
2020
keywords=['AutoML', 'Keras'],
2121
install_requires=[
2222
'packaging',
@@ -25,9 +25,6 @@
2525
'numpy',
2626
'pandas',
2727
],
28-
dependency_links=[
29-
'https://github.com/keras-team/[email protected]#egg=keras-tuner-1.0.2rc0',
30-
],
3128
extras_require={
3229
'tests': ['pytest>=4.4.0',
3330
'flake8',

0 commit comments

Comments
 (0)