upgini 1.1.292__py3-none-any.whl → 1.1.294__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of upgini might be problematic. Click here for more details.
- upgini/__about__.py +1 -1
- upgini/__init__.py +6 -20
- upgini/data_source/data_source_publisher.py +5 -0
- upgini/features_enricher.py +3 -3
- upgini/lazy_import.py +22 -0
- {upgini-1.1.292.dist-info → upgini-1.1.294.dist-info}/METADATA +1 -1
- {upgini-1.1.292.dist-info → upgini-1.1.294.dist-info}/RECORD +9 -8
- {upgini-1.1.292.dist-info → upgini-1.1.294.dist-info}/WHEEL +1 -1
- {upgini-1.1.292.dist-info → upgini-1.1.294.dist-info}/licenses/LICENSE +0 -0
upgini/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.1.
|
|
1
|
+
__version__ = "1.1.294"
|
upgini/__init__.py
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
from
|
|
1
|
+
from .lazy_import import LazyImport
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ModelTaskType,
|
|
9
|
-
SearchKey,
|
|
10
|
-
)
|
|
11
|
-
from .search_task import SearchTask
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def search_history() -> List[SearchTask]:
|
|
15
|
-
# TODO
|
|
16
|
-
return []
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def datasets_history() -> List[Dataset]:
|
|
20
|
-
# TODO
|
|
21
|
-
return []
|
|
3
|
+
FeaturesEnricher = LazyImport('upgini.features_enricher', 'FeaturesEnricher')
|
|
4
|
+
SearchKey = LazyImport('upgini.metadata', 'SearchKey')
|
|
5
|
+
RuntimeParameters = LazyImport('upgini.metadata', 'RuntimeParameters')
|
|
6
|
+
CVType = LazyImport('upgini.metadata', 'CVType')
|
|
7
|
+
ModelTaskType = LazyImport('upgini.metadata', 'ModelTaskType')
|
|
@@ -95,6 +95,11 @@ class DataSourcePublisher:
|
|
|
95
95
|
"With MSISDN and DATE keys one of the snapshot_frequency_days or"
|
|
96
96
|
" join_date_abs_limit_days parameters is required"
|
|
97
97
|
)
|
|
98
|
+
if (
|
|
99
|
+
set(search_keys.values()) == {SearchKey.PHONE, SearchKey.DATE}
|
|
100
|
+
or set(search_keys.values()) == {SearchKey.HEM, SearchKey.DATE}
|
|
101
|
+
) and not date_format:
|
|
102
|
+
raise ValidationError("date_format argument is required for PHONE+DATE and HEM+DATE search keys")
|
|
98
103
|
|
|
99
104
|
request = {
|
|
100
105
|
"dataTableUri": data_table_uri,
|
upgini/features_enricher.py
CHANGED
|
@@ -2557,9 +2557,6 @@ class FeaturesEnricher(TransformerMixin):
|
|
|
2557
2557
|
return [c for c, v in search_keys_with_autodetection.items() if v.value.value in keys]
|
|
2558
2558
|
|
|
2559
2559
|
def _validate_X(self, X, is_transform=False) -> pd.DataFrame:
|
|
2560
|
-
if _num_samples(X) == 0:
|
|
2561
|
-
raise ValidationError(self.bundle.get("x_is_empty"))
|
|
2562
|
-
|
|
2563
2560
|
if isinstance(X, pd.DataFrame):
|
|
2564
2561
|
if isinstance(X.columns, pd.MultiIndex) or isinstance(X.index, pd.MultiIndex):
|
|
2565
2562
|
raise ValidationError(self.bundle.get("x_multiindex_unsupported"))
|
|
@@ -2573,6 +2570,9 @@ class FeaturesEnricher(TransformerMixin):
|
|
|
2573
2570
|
else:
|
|
2574
2571
|
raise ValidationError(self.bundle.get("unsupported_x_type").format(type(X)))
|
|
2575
2572
|
|
|
2573
|
+
if _num_samples(X) == 0:
|
|
2574
|
+
raise ValidationError(self.bundle.get("x_is_empty"))
|
|
2575
|
+
|
|
2576
2576
|
if len(set(validated_X.columns)) != len(validated_X.columns):
|
|
2577
2577
|
raise ValidationError(self.bundle.get("x_contains_dup_columns"))
|
|
2578
2578
|
if not is_transform and not validated_X.index.is_unique:
|
upgini/lazy_import.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class LazyImport:
|
|
5
|
+
def __init__(self, module_name, class_name):
|
|
6
|
+
self.module_name = module_name
|
|
7
|
+
self.class_name = class_name
|
|
8
|
+
self._module = None
|
|
9
|
+
self._class = None
|
|
10
|
+
|
|
11
|
+
def _load(self):
|
|
12
|
+
if self._module is None:
|
|
13
|
+
self._module = importlib.import_module(self.module_name)
|
|
14
|
+
self._class = getattr(self._module, self.class_name)
|
|
15
|
+
|
|
16
|
+
def __call__(self, *args, **kwargs):
|
|
17
|
+
self._load()
|
|
18
|
+
return self._class(*args, **kwargs)
|
|
19
|
+
|
|
20
|
+
def __getattr__(self, name):
|
|
21
|
+
self._load()
|
|
22
|
+
return getattr(self._class, name)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
upgini/__about__.py,sha256=
|
|
2
|
-
upgini/__init__.py,sha256=
|
|
1
|
+
upgini/__about__.py,sha256=2vfGkEyxotARb9WDVVoCNdQiOrrhNqGA_vyl426_y5w,24
|
|
2
|
+
upgini/__init__.py,sha256=ObEtjFkIssl83qeKNMLpIQygfwK8TzztwiI43YTsAP0,353
|
|
3
3
|
upgini/ads.py,sha256=nvuRxRx5MHDMgPr9SiU-fsqRdFaBv8p4_v1oqiysKpc,2714
|
|
4
4
|
upgini/dataset.py,sha256=7TLVVhGtjgx_9yaiaIUK3kZSe_R9wg5dY0d4F5qCGM4,45636
|
|
5
5
|
upgini/errors.py,sha256=2b_Wbo0OYhLUbrZqdLIx5jBnAsiD1Mcenh-VjR4HCTw,950
|
|
6
|
-
upgini/features_enricher.py,sha256=
|
|
6
|
+
upgini/features_enricher.py,sha256=rLy6BwhL94VkRCp8W4RxJ0lBb7sZqTOsz-bUVI8nXZU,177530
|
|
7
7
|
upgini/http.py,sha256=bp6jWl422Icy3AhHMdCcJv5NjExE45gSMmzMTPJjPuk,42600
|
|
8
|
+
upgini/lazy_import.py,sha256=EwoM0msNGbSmWBhGbrLDny1DSnOlvTxCjmMKPxYlDms,610
|
|
8
9
|
upgini/metadata.py,sha256=qDAIO7NLSSQp_XiXCv3U4XJTLO0KH3YuQ8lvCLYPqzs,9781
|
|
9
10
|
upgini/metrics.py,sha256=DLvA2YLV4f7lnzBCcfZ5T4NkqAv3pbstbjTepavuT7U,30688
|
|
10
11
|
upgini/search_task.py,sha256=LtRJ9bCPjMo1gJ-sUDKERhDwGcWKImrzwVFHjkMSQHQ,17071
|
|
@@ -22,7 +23,7 @@ upgini/autofe/operand.py,sha256=MKEsl3zxpWzRDpTkE0sNJxTu62U20sWOvEKhPjUWS6s,2915
|
|
|
22
23
|
upgini/autofe/unary.py,sha256=ZWjLd-CUkNt_PpM8YuWLLipW1v_RdBlsl4JxXIVo9aM,3652
|
|
23
24
|
upgini/autofe/vector.py,sha256=dLxfAstJs-gw_OQ1xxoxcM6pVzORlV0HVzdzt7cLXVQ,606
|
|
24
25
|
upgini/data_source/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
-
upgini/data_source/data_source_publisher.py,sha256=
|
|
26
|
+
upgini/data_source/data_source_publisher.py,sha256=6paupnciqagACnSzjGSkA2a5i-c9ETvZheLqBYOJemk,17810
|
|
26
27
|
upgini/mdc/__init__.py,sha256=aM08nIWFc2gWdWUa3_IuEnNND0cQPkBGnYpRMnfFN8k,1019
|
|
27
28
|
upgini/mdc/context.py,sha256=3u1B-jXt7tXEvNcV3qmR9SDCseudnY7KYsLclBdwVLk,1405
|
|
28
29
|
upgini/normalizer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -56,7 +57,7 @@ upgini/utils/sklearn_ext.py,sha256=13jQS_k7v0aUtudXV6nGUEWjttPQzAW9AFYL5wgEz9k,4
|
|
|
56
57
|
upgini/utils/target_utils.py,sha256=Y96_PJ5cC-WsEbeqg20v9uqywDQobLoTb-xoP7S3o4E,7807
|
|
57
58
|
upgini/utils/track_info.py,sha256=G5Lu1xxakg2_TQjKZk4b5SvrHsATTXNVV3NbvWtT8k8,5663
|
|
58
59
|
upgini/utils/warning_counter.py,sha256=dIWBB4dI5XRRJZudvIlqlIYKEiwLLPcXarsZuYRt338,227
|
|
59
|
-
upgini-1.1.
|
|
60
|
-
upgini-1.1.
|
|
61
|
-
upgini-1.1.
|
|
62
|
-
upgini-1.1.
|
|
60
|
+
upgini-1.1.294.dist-info/METADATA,sha256=mOES85LZo9_PlVh9tpbFPRp2QI16iINyIk5ywPby7Dc,48117
|
|
61
|
+
upgini-1.1.294.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
62
|
+
upgini-1.1.294.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
|
|
63
|
+
upgini-1.1.294.dist-info/RECORD,,
|
|
File without changes
|