Skip to content

Commit

Permalink
[MRG] Remove dependance of packaging (#287)
Browse files Browse the repository at this point in the history
* add contributor guide

* remove dependance to packaging

* fix lint

* add dep in pyproject
  • Loading branch information
tgnassou authored Dec 6, 2024
1 parent 37a567f commit ec2f00c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ readme = "README.md"
dependencies = [
"numpy >= 1.24",
"scipy >= 1.10",
"scikit-learn >= 1.4.0",
"scikit-learn >= 1.5.0",
"POT >= 0.9.3",
]
keywords = ["domain-adaptation", "scikit-learn", "pytorch",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy>=1.24
scipy>=1.10
scikit-learn>=1.4.0
scikit-learn>=1.5.0
pot>=0.9.0
9 changes: 1 addition & 8 deletions skada/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
from numbers import Real

import numpy as np
import sklearn
from packaging.version import Version
from sklearn.covariance import (
empirical_covariance,
ledoit_wolf,
Expand All @@ -21,8 +19,6 @@
from sklearn.utils import check_random_state
from sklearn.utils.multiclass import type_of_target

_SKLEARN_OLDER_15 = Version(sklearn.__version__) >= Version("1.5.0")

_logger = logging.getLogger("skada")
_logger.setLevel(logging.DEBUG)

Expand Down Expand Up @@ -231,7 +227,4 @@ def _shuffle_arrays(*arrays, random_state=None):


def _route_params(request, params, caller):
if _SKLEARN_OLDER_15:
return request._route_params(params=params, parent=caller, caller=caller)
else:
return request._route_params(params=params)
return request._route_params(params=params, parent=caller, caller=caller)

0 comments on commit ec2f00c

Please sign in to comment.