Skip to content

Commit

Permalink
make release-tag: Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahmish committed Jan 21, 2023
2 parents 406ee1e + cb97e0b commit dcd295a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest, macos-latest]
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install package
Expand All @@ -29,11 +29,11 @@ jobs:
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest, macos-latest]
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install package and dependencies
Expand All @@ -46,11 +46,11 @@ jobs:
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest, macos-latest]
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install package and dependencies
Expand Down
10 changes: 10 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# History

## 0.3.3 - 2023-01-20

### General Imporvements

* Update dependencies - [Issue #276](https://github.com/MLBazaar/MLPrimitives/issues/276) by @sarahmish

### Adapter Improvements

* Building model within fit in keras adapter- [Issue #267](https://github.com/MLBazaar/MLPrimitives/issues/267) by @sarahmish

## 0.3.2 - 2021-11-09

### Adapter Improvements
Expand Down
2 changes: 1 addition & 1 deletion mlprimitives/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

__author__ = 'MIT Data To AI Lab'
__email__ = '[email protected]'
__version__ = '0.3.2'
__version__ = '0.3.3.dev1'

import os

Expand Down
10 changes: 7 additions & 3 deletions mlprimitives/adapters/keras.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def __init__(self, layers, loss, optimizer, classification, callbacks=tuple(),
self.validation_split = validation_split
self.batch_size = batch_size
self.shuffle = shuffle
self._fitted = False

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

def fit(self, X, y, **kwargs):
self._augment_hyperparameters(X, 'input', kwargs)
self._augment_hyperparameters(y, 'target', kwargs)
self.model = self._build_model(**kwargs)
if not self._fitted:
self._augment_hyperparameters(X, 'input', kwargs)
self._augment_hyperparameters(y, 'target', kwargs)
self.model = self._build_model(**kwargs)

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

self._fitted = True

def predict(self, X):
y = self.model.predict(X, batch_size=self.batch_size, verbose=self.verbose)

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.2
current_version = 0.3.3.dev1
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'networkx>=2.0,<3',
'nltk>=3.3,<4',
'numpy<1.21.0,>=1.16.0',
'opencv-python>=3.4.0.12,<5',
'opencv-python>=3.4.0.12,<4.7',
'pandas>=1,<2',
'python-louvain>=0.10,<0.14', # community
'scikit-image>=0.15',
Expand All @@ -30,6 +30,7 @@
'statsmodels>=0.9.0,<0.13',
'tensorflow>=2,<2.5',
'xgboost>=0.72.1,<1',
'protobuf<4',
]


Expand All @@ -55,6 +56,8 @@
'sphinx_rtd_theme>=0.2.4,<0.5',
'docutils>=0.14,<0.18',
'ipython>=6.5.0',
'mistune>=0.7,<2',
'Jinja2>=2,<3.1',

# style check
'flake8>=3.7.7,<4',
Expand All @@ -63,6 +66,7 @@
# fix style issues
'autoflake>=1.1,<2',
'autopep8>=1.4.3,<2',
'importlib-metadata<5',

# distribute on PyPI
'twine>=1.10.0,<4',
Expand Down Expand Up @@ -118,6 +122,6 @@
test_suite='tests',
tests_require=tests_require,
url='https://github.com/MLBazaar/MLPrimitives',
version='0.3.2',
version='0.3.3.dev1',
zip_safe=False,
)

0 comments on commit dcd295a

Please sign in to comment.