Skip to content

Commit

Permalink
Add Python 3.9 compatibility, bump sklearn (snipsco#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
dariowho committed Feb 28, 2023
1 parent 74b2893 commit 7e2777b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ language: python

matrix:
include:
- python: 3.9
env: TOXENV=py39
dist: xenial
sudo: true
- python: 3.8
env: TOXENV=py38
dist: xenial
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog
All notable changes to this project will be documented in this file.

## [0.20.3] - Under development
### Added
- Support for Python 3.9

### Fixed
- Fixed sklearn compatibility

## [0.20.2] - 2020-01-15
### Added
- Add intents filter parameter in parsing CLI [#858](https://github.com/snipsco/snips-nlu/pull/858)
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"pyaml>=17.0,<20.0",
"requests>=2.0,<3.0",
"scikit-learn>=0.20,<0.21; python_version<'3.5'",
"scikit-learn>=0.21.1,<0.23; python_version>='3.5'",
"scikit-learn>=0.21.1,<1.0; python_version>='3.5'",
"scipy>=1.0,<2.0",
"sklearn-crfsuite>=0.3.6,<0.4",
"snips-nlu-parsers>=0.3.1,<0.5",
Expand Down Expand Up @@ -76,6 +76,7 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
keywords="nlu nlp language machine learning text processing intent",
Expand Down
2 changes: 1 addition & 1 deletion snips_nlu/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
__email__ = "[email protected], [email protected]"
__license__ = "Apache License, Version 2.0"

__version__ = "0.20.2"
__version__ = "0.20.3"
__model_version__ = "0.20.0"

__download_url__ = "https://github.com/snipsco/snips-nlu-language-resources/releases/download"
Expand Down
2 changes: 1 addition & 1 deletion snips_nlu/intent_classifier/log_reg_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def fit(self, dataset):
alpha = get_regularization_factor(dataset)

class_weights_arr = compute_class_weight(
"balanced", range(none_class + 1), classes)
"balanced", classes=range(none_class + 1), y=classes)
# Re-weight the noise class
class_weights_arr[-1] *= self.config.noise_reweight_factor
class_weight = {idx: w for idx, w in enumerate(class_weights_arr)}
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27, py35, py36, py37, py38, integration-test, codecov, docs-html
envlist = py27, py35, py36, py37, py38, py3.9, integration-test, codecov, docs-html

[testenv]
skip_install = true
Expand Down

0 comments on commit 7e2777b

Please sign in to comment.