Skip to content

Commit dcd295a

Browse files
committed
make release-tag: Merge branch 'master' into stable
2 parents 406ee1e + cb97e0b commit dcd295a

File tree

6 files changed

+31
-13
lines changed

6 files changed

+31
-13
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
strategy:
1313
matrix:
1414
python-version: [3.6, 3.7, 3.8]
15-
os: [ubuntu-latest, macos-latest]
15+
os: [ubuntu-20.04, macos-latest]
1616
steps:
1717
- uses: actions/checkout@v1
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v1
19+
uses: actions/setup-python@v2
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Install package
@@ -29,11 +29,11 @@ jobs:
2929
strategy:
3030
matrix:
3131
python-version: [3.6, 3.7, 3.8]
32-
os: [ubuntu-latest, macos-latest]
32+
os: [ubuntu-20.04, macos-latest]
3333
steps:
3434
- uses: actions/checkout@v1
3535
- name: Set up Python ${{ matrix.python-version }}
36-
uses: actions/setup-python@v1
36+
uses: actions/setup-python@v2
3737
with:
3838
python-version: ${{ matrix.python-version }}
3939
- name: Install package and dependencies
@@ -46,11 +46,11 @@ jobs:
4646
strategy:
4747
matrix:
4848
python-version: [3.6, 3.7, 3.8]
49-
os: [ubuntu-latest, macos-latest]
49+
os: [ubuntu-20.04, macos-latest]
5050
steps:
5151
- uses: actions/checkout@v1
5252
- name: Set up Python ${{ matrix.python-version }}
53-
uses: actions/setup-python@v1
53+
uses: actions/setup-python@v2
5454
with:
5555
python-version: ${{ matrix.python-version }}
5656
- name: Install package and dependencies

HISTORY.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# History
22

3+
## 0.3.3 - 2023-01-20
4+
5+
### General Imporvements
6+
7+
* Update dependencies - [Issue #276](https://github.com/MLBazaar/MLPrimitives/issues/276) by @sarahmish
8+
9+
### Adapter Improvements
10+
11+
* Building model within fit in keras adapter- [Issue #267](https://github.com/MLBazaar/MLPrimitives/issues/267) by @sarahmish
12+
313
## 0.3.2 - 2021-11-09
414

515
### Adapter Improvements

mlprimitives/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
__author__ = 'MIT Data To AI Lab'
66
__email__ = '[email protected]'
7-
__version__ = '0.3.2'
7+
__version__ = '0.3.3.dev1'
88

99
import os
1010

mlprimitives/adapters/keras.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def __init__(self, layers, loss, optimizer, classification, callbacks=tuple(),
7272
self.validation_split = validation_split
7373
self.batch_size = batch_size
7474
self.shuffle = shuffle
75+
self._fitted = False
7576

7677
for callback in callbacks:
7778
callback['class'] = import_object(callback['class'])
@@ -99,9 +100,10 @@ def _augment_hyperparameters(self, X, mode, kwargs):
99100
return kwargs
100101

101102
def fit(self, X, y, **kwargs):
102-
self._augment_hyperparameters(X, 'input', kwargs)
103-
self._augment_hyperparameters(y, 'target', kwargs)
104-
self.model = self._build_model(**kwargs)
103+
if not self._fitted:
104+
self._augment_hyperparameters(X, 'input', kwargs)
105+
self._augment_hyperparameters(y, 'target', kwargs)
106+
self.model = self._build_model(**kwargs)
105107

106108
if self.classification:
107109
y = keras.utils.to_categorical(y)
@@ -115,6 +117,8 @@ def fit(self, X, y, **kwargs):
115117
validation_split=self.validation_split, batch_size=self.batch_size,
116118
shuffle=self.shuffle)
117119

120+
self._fitted = True
121+
118122
def predict(self, X):
119123
y = self.model.predict(X, batch_size=self.batch_size, verbose=self.verbose)
120124

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.3.2
2+
current_version = 0.3.3.dev1
33
commit = True
44
tag = True
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
'networkx>=2.0,<3',
2222
'nltk>=3.3,<4',
2323
'numpy<1.21.0,>=1.16.0',
24-
'opencv-python>=3.4.0.12,<5',
24+
'opencv-python>=3.4.0.12,<4.7',
2525
'pandas>=1,<2',
2626
'python-louvain>=0.10,<0.14', # community
2727
'scikit-image>=0.15',
@@ -30,6 +30,7 @@
3030
'statsmodels>=0.9.0,<0.13',
3131
'tensorflow>=2,<2.5',
3232
'xgboost>=0.72.1,<1',
33+
'protobuf<4',
3334
]
3435

3536

@@ -55,6 +56,8 @@
5556
'sphinx_rtd_theme>=0.2.4,<0.5',
5657
'docutils>=0.14,<0.18',
5758
'ipython>=6.5.0',
59+
'mistune>=0.7,<2',
60+
'Jinja2>=2,<3.1',
5861

5962
# style check
6063
'flake8>=3.7.7,<4',
@@ -63,6 +66,7 @@
6366
# fix style issues
6467
'autoflake>=1.1,<2',
6568
'autopep8>=1.4.3,<2',
69+
'importlib-metadata<5',
6670

6771
# distribute on PyPI
6872
'twine>=1.10.0,<4',
@@ -118,6 +122,6 @@
118122
test_suite='tests',
119123
tests_require=tests_require,
120124
url='https://github.com/MLBazaar/MLPrimitives',
121-
version='0.3.2',
125+
version='0.3.3.dev1',
122126
zip_safe=False,
123127
)

0 commit comments

Comments
 (0)