diff --git a/src/python/nimbusml/internal/core/base_pipeline_item.py b/src/python/nimbusml/internal/core/base_pipeline_item.py index b2daf9a..e45b3d0 100644 --- a/src/python/nimbusml/internal/core/base_pipeline_item.py +++ b/src/python/nimbusml/internal/core/base_pipeline_item.py @@ -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, \ diff --git a/src/python/nimbusml/internal/utils/entrypoints.py b/src/python/nimbusml/internal/utils/entrypoints.py index 94510eb..8d9ef08 100644 --- a/src/python/nimbusml/internal/utils/entrypoints.py +++ b/src/python/nimbusml/internal/utils/entrypoints.py @@ -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 diff --git a/src/python/nimbusml/utils/__init__.py b/src/python/nimbusml/utils/__init__.py index ef1288e..3243711 100644 --- a/src/python/nimbusml/utils/__init__.py +++ b/src/python/nimbusml/utils/__init__.py @@ -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' ] diff --git a/src/python/setup.py b/src/python/setup.py index e1059ce..ee6dc3b 100644 --- a/src/python/setup.py +++ b/src/python/setup.py @@ -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',