зеркало из https://github.com/microsoft/NimbusML.git
Fix signature import error when using latest version of scikit-learn. (#116)
* Fix signature import error when using latest version of scikit-learn. Fixes #111 * Move the conditional import of the signature method in to the utils package.
This commit is contained in:
Родитель
b4ec723c2e
Коммит
91478d1146
|
@ -18,7 +18,7 @@ from itertools import chain
|
|||
from textwrap import wrap
|
||||
|
||||
import six
|
||||
from sklearn.utils.fixes import signature
|
||||
from nimbusml.utils import signature
|
||||
|
||||
from ..utils.data_roles import DataRoles, Role
|
||||
from ..utils.data_stream import ViewBasePipelineItem, DataStream, \
|
||||
|
|
|
@ -16,7 +16,7 @@ import pandas as pd
|
|||
import six
|
||||
from pandas import DataFrame
|
||||
from scipy.sparse import csr_matrix
|
||||
from sklearn.utils.fixes import signature
|
||||
from nimbusml.utils import signature
|
||||
|
||||
from .data_stream import BinaryDataStream
|
||||
from .data_stream import FileDataStream
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
from .utils import get_X_y, evaluate_binary_classifier, check_accuracy, \
|
||||
check_accuracy_scikit, load_img, ColumnSelector
|
||||
|
||||
all = [
|
||||
try:
|
||||
from inspect import signature
|
||||
except ImportError:
|
||||
from funcsigs import signature
|
||||
|
||||
__all__ = [
|
||||
'get_X_y',
|
||||
'evaluate_binary_classifier',
|
||||
'check_accuracy',
|
||||
'check_accuracy_scikit',
|
||||
'load_img',
|
||||
'ColumnSelector'
|
||||
'ColumnSelector',
|
||||
'signature'
|
||||
]
|
||||
|
|
|
@ -37,6 +37,7 @@ if sys.version_info.major == 3:
|
|||
if sys.version_info[0:2] == (2,7):
|
||||
_install_requires.append('decorator')
|
||||
_install_requires.append('enum')
|
||||
_install_requires.append('funcsigs>=1.0.2')
|
||||
|
||||
setup(
|
||||
name='nimbusml',
|
||||
|
|
Загрузка…
Ссылка в новой задаче