Граф коммитов

160 Коммитов

Автор SHA1 Сообщение Дата
Masahiro Hiramori 0b566c3250
[CI] Upgrade macos runner image (#785)
* upgrade macos image 12->14

* do not brew unlink libomp

* rtol=4 * 1e-4, atol=2 * 1e-4
2024-08-12 09:29:55 -07:00
Karla Saur 65c4220326
Deprecating Python 3.8 (#775) 2024-05-30 22:39:37 +00:00
Pusunuru Giri Prasad 3eb83937d3
Polynomial features will support degree from 0 to n (#763)
* PolynomialFeatures doesn	 support negtive degree

* polyfeatures for n degree

---------

Co-authored-by: Pusunuru <giri.pusunuru@cgi.com>
2024-02-21 09:40:12 -08:00
Karla Saur 2a56526788
Forcing users to set override flag to unzip without hash integrity check (#761) 2024-02-14 21:36:13 +00:00
Masahiro Hiramori c28c06e5ad
Update apache-tvm to v0.15.0 (#709)
* define pytorch version as an env variable

* update tvm to v0.15.0

* disable all the tvm tests in tests/
2024-02-13 19:53:20 +00:00
Pusunuru Giri Prasad 1aed136607
All loss functions which supports SGDClassifer are added (#758)
* hinge is added

* test cases are added for SGDClassifier of all loss functions


---------

Co-authored-by: Pusunuru <giri.pusunuru@cgi.com>
2024-02-13 10:15:56 -08:00
Karla Saur 2036a4a4fc
Warnings maintenance (#757)
* python 3.8 has outdated skl version (1.3) and we should use newer python for Coverage step

* fix in-place warning

* fix  'UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow.'

* skipping docgen entirely on non-main

* fixing Warning: 'Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20:'
2024-01-25 18:39:45 +00:00
Karla Saur 72b1011de2
Changes for scikit-learn ==1.4.0 (#756)
* s/base_estimator/estimator/g

* s/sparse/sparse_output/g

* in progress, todo implement parser for function

* first attempt at _parse_sklearn_function_transformer
2024-01-22 11:12:37 -08:00
Karla Saur eaac74faa8
Adding hash to save/load (#713)
* Revert "Update setup.py (#705)"

This reverts commit 33b5fba5b9.

* adding hash feature to save load

* removing unused imports

* Revert "Revert "Update setup.py (#705)""

This reverts commit 4c7228c5e2.

* cleanup

* docstrings
2023-06-20 17:43:26 -07:00
Masahiro Hiramori 828ab68260
add support for BGMM (#677) 2023-01-25 11:53:16 -08:00
Joppe Geluykens c862916676
allow for identity POST_TRANSFORM (#674)
* allow for identity POST_TRANSFORM

* add test
2023-01-10 14:58:00 -08:00
Karla Saur dc24aa3e9c
Changes for SKL1.2 (#661)
* s/boston/cali/g

* removing the Normalizer with wrong params as it is no longer possible

* Whiten parameter of PCA must now be bool

* lint

* pulling from github for skl to unblock for now

* trying again with skl2onnx

* skl2onnx install keeps getting overwritten, must be in two places for now

* we skipped identity in parse, causing it to miss probab

* lint
2022-12-09 13:23:37 -08:00
Chris Hua d0bb48151d
fix: support varying batch sizes (#654)
* feat: dynamic axes

* feat: add test for varying batch size

* chore: cleanup variable naming

* chore: lint

`pre-commit run --all-files` was quite aggressive

* fix: check onnx conv, not torch

* chore: remove `fix_graph`

* chore: lint

* fix: skip onnx test if not installed

* chore: add more tests

notably, the multi-classification models appear to still have the previous behavior.

* Revert "chore: lint"

This reverts commit 8b4ea4ed33.

* fix: limit array properly

* chore: clean up remaining print statements

* fix: set first dimension in tests to custom

Necessary to support arbitrary batch sizes
Also refactors tests to properly separate out model conversion and testing

* chore: update LGBM-ONNXML notebook

Must set first dimension to None in the ONNXMLTools conversion.

* fix: more bumpversion locations
2022-11-29 10:09:14 -08:00
Chris Hua 37849b5d79
chore: update deprecated calls (#655)
* chore: address deprecations

* chore: remove LooseVersion

grep find replace

* feat: remove distutils

Deprecated, uses setuptools instead

* chore: drop Python 2 references

These exist as backports for Python 2, but the package requires >=3.8 anyways.
2022-11-25 14:52:09 -08:00
Matteo Interlandi 29c3f68923
added support for Tweedie, Poisson and Gamma regressors (#650) 2022-11-04 14:31:51 -07:00
Rafail Giavrimis 2b712a30de
Added support for more decision conditions in trees and ONNX conversion (#631)
* Added support for more decision conditions in trees and ONNX conversion

* Added test for BRANCH_LT in ONNXML

* Use convert_model from onnxmltools instead of manually picking converter for test
2022-09-11 19:22:15 -07:00
Roman Bredehoft c38178c4d1
fix linear models conversion when fit_intercept set to False (#630) 2022-08-31 10:37:00 -07:00
Luis Montero 0a1f21ea91
Add ElasticNet, Lasso and Ridge support (#625)
Using the same function as for LinearRegression this adds support for
ElasticNet, Lasso and Ridge.

closes #624
2022-08-29 10:34:37 -07:00
Masahiro Hiramori 45c9851cc9
Fix deprecation warnings for sklearn/scipy (#610)
* remove `import enable_hist_gradient_boosting` because it's not needed since skl 1.0

* remove the `except` part and use `n_features_in_` for HistGradientBoosting

* use `var_` instead of `sigma_` because it was deprecated in skl 1.0 and will be removed in skl 1.2

* Use `algorithm=lloyd` for KMeans instead of `algorithm=full/auto`

* Use `csr_matrix` from the `scipy.sparse` namespace because the `scipy.sparse.csr` namespace is deprecated.

* Use `loss='log_loss'` instead of `loss='log'` because it was deprecated in v1.1 and will be removed in version 1.3.

* Use `eigenvalues_` instead of `lambdas_` because it was deprecated in version 1.0 and will be removed in 1.2.

* Use `eigenvectors_` instead of `alphas_` because it was deprecated in version 1.0 and will be removed in 1.2.
2022-08-10 09:12:14 -07:00
SangamSwadik 2d474359b1
check for Sklearn model NotFitted before conversion (#607)
* check for model  NotFitted before conversion

* check for model type

* better model type check and basic tests for conversion without fit()

Co-authored-by: SangamSwadiK <sangamswadiK@users.noreply.github.com>
2022-07-13 09:25:15 -07:00
Masahiro Hiramori d98426d94d
Use `python -m pip` instead of the `pip` executable (#605)
* Use `n_features_in_` instead of `n_features_`.

* use `python -m pip` instead of the `pip` executable
2022-07-08 09:26:28 -07:00
Karla Saur a4aaabf0ee
deprecate torch1.7, push to macOS11 (#594) 2022-06-20 19:05:25 -07:00
Karla Saur 833447520f
Updating library versions (#593)
* Testing skl 1.1.1 again

* scikit-learn 1.1.1 requires Python (>= 3.8).  I think it's best to deprecate 3.7

* checking errors if remove pin

* pulling two tests for now

* putting this back before i forget. TODO: fix and add back 2 onnx tests

* adding raises for falsefalse scaler.

* simplifying test
2022-06-20 17:40:00 -07:00
Karla Saur 2fe2e35e2b
Fix the things broken by SKL==1.1.1 (#588)
* debugging skl hist gb

* skip test for dbg

* for now, bad hack around extra params

* adding back others as well

* adding back others as well

* n_components == 10, must be <= 3; updates to PCA in skl 1.1.1

* matteo's changes
2022-06-15 17:10:13 -04:00
Masahiro Hiramori 65de4b21fb
Bump TVM to v0.8 (#581)
* Bump TVM to v0.8.0

* Update TVM repo URL

* add support for TVM v0.8.0 and later

* fix
2022-06-10 11:28:25 -07:00
Matteo Interlandi 09663b2d47
fix xgboost tests for xgb > 1.6.0 (#576) 2022-04-25 13:14:14 -07:00
Matteo Interlandi cba2e41e35
skip wminkoski for sklearn > 1.0 (#567) 2022-02-07 09:48:31 -08:00
Karla Saur 2705c42585
cleaning up versions for python3.9 (#560) 2022-01-12 14:31:17 -08:00
Matteo Interlandi 5954f54edb
Fix problem with pandas used with latest xgb models (#562) 2022-01-08 09:50:10 -08:00
Akshay Jain 1b099b073b
Add delete location bool param to PyTorchContainer load() call (#558)
Thanks for the contribution @akshjain83!
2021-12-13 17:46:47 -08:00
Karla Saur 72a313007e
Fixing KNN tests (scipy issue and dataset depr warning) (#552) 2021-12-07 14:12:59 -08:00
Matteo Interlandi 42288ed1c6
add pls regressor (#549) 2021-11-14 21:01:41 -08:00
Karla Saur 3a9b97ecd6
adding VI param to test for mahalalalalalal (#545) 2021-09-27 14:08:55 -07:00
Ziheng Wang 946dcb09ae
added support for lightgbm booster (#540)
* added support for lightgbm booster
2021-08-29 18:19:45 -07:00
Matteo Interlandi 8fb3f414da
Add prophet integration (with only trend prediction) (#519)
* add initial integration with prophet

* add notebook
2021-06-18 16:04:16 -07:00
Xavier Dupré 5081f6acfa
Remove constraint on dependencies version (#523)
* remove constraint on dependencies version

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* fix attributeerror

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* uninstall hummingbird-ml

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* uninstall hummingbird-ml

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* newer version of scikit-learn

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* fix xgboost

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* lint

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* fix xgb

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* lint

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* add ONNXMLSub

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* update

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* fix index

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* fix missing import

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* tr

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* none

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* discrepencies

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* ci

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* yml

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* lint

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* replace by string.format

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

* comment

Signed-off-by: xavier dupré <xavier.dupre@gmail.com>

Co-authored-by: xavier dupré <xavier.dupre@gmail.com>
2021-06-18 12:00:19 -07:00
Supun Nakandala 0c9a71e32a
Fix several numerical precision issues in tree-based models (#511)
* wip

* fixing param order

* fix atol for regression chain

* more fixes

* fixing flake issues

* test data in float32

* test data in float32

* limiting tree depth for perf_tree_trav

* rtol 1e-4

* converting back to float32 after float64 tree operations

* better renaming of variables

* fix order

* wip

* explicitly specify dtype

* removing .predict test. increasing tolerance

* small refactoring

* fix missing self

* just the tensor without dtype is sufficient

* per-init one

Co-authored-by: Matteo Interlandi <mainterl@microsoft.com>
Co-authored-by: snakanda <snakanda@node.testvm.orion-pg0.wisc.cloudlab.us>
2021-06-15 13:23:43 -07:00
Karla Saur 0ea7c44500
adding assert and test for onnx->torch input (#514) 2021-05-18 19:30:21 -07:00
Matteo Interlandi 4d0bc20583
Add modules versions when saving models (#504)
* remove dirs when loading the model

* add tests
2021-04-24 08:06:45 -07:00
Matteo Interlandi 6866deab52
Remove temp dirs when loading / saving models (#502) 2021-04-23 16:24:17 -07:00
Matteo Interlandi 76e69ce06a
Use pickle instead of dill for pytorch models (#498) 2021-04-23 14:57:45 -07:00
Karla Saur 2944097b81
adding assert w/error msg (#499)
* adding assert w/error msg

* adding asserts w/no extens

* separating out tests
2021-04-22 23:39:35 -07:00
Matteo Interlandi 79b0a13840
add spark back? (#494)
* add spark back

* switch to spark session
2021-04-13 09:16:17 -07:00
Matteo Interlandi 0e8d435878
Add support for bagging (#490)
* add support for bagging

* check only proba to avoid problems with old pytorch version

* fix type problem with bagging for older versions of pytorch
2021-04-12 16:16:20 -07:00
Matteo Interlandi 8040a6a12c
fix flake8 style errors (#488)
Co-authored-by: Karla Saur <1703543+ksaur@users.noreply.github.com>
2021-04-05 12:00:19 -07:00
Matteo Interlandi 78e9dd2376
Fix error when pandas is passed as input to predict but no test_input is used at convert time (#487) 2021-04-05 11:30:40 -07:00
Matteo Interlandi 3f115b4433 Fix kmeans over doubles 2021-04-05 16:55:14 +02:00
Supun Nakandala 48e410be21
Adding support GridSearchCV and RandomizedGridSearchCV (#476)
* adding support GridSearchCV and RandomizedGridSearchCV

* comment fix

* removing not needed extra config

* adding missing supported ops
2021-03-30 02:49:53 -07:00
Matteo Interlandi 7b717b98f3
Add MeanShift (#473)
* add meanshift
2021-03-25 09:44:34 -07:00
Matteo Interlandi 55f63fe3a3
Add kmeans (#472)
* add kmeans
2021-03-24 17:25:59 -07:00