upgini 1.2.119__py3-none-any.whl → 1.2.120__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.
- upgini/__about__.py +1 -1
- upgini/features_enricher.py +7 -10
- upgini/utils/sklearn_ext.py +3 -4
- {upgini-1.2.119.dist-info → upgini-1.2.120.dist-info}/METADATA +1 -1
- {upgini-1.2.119.dist-info → upgini-1.2.120.dist-info}/RECORD +7 -7
- {upgini-1.2.119.dist-info → upgini-1.2.120.dist-info}/WHEEL +0 -0
- {upgini-1.2.119.dist-info → upgini-1.2.120.dist-info}/licenses/LICENSE +0 -0
upgini/__about__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "1.2.
|
1
|
+
__version__ = "1.2.120"
|
upgini/features_enricher.py
CHANGED
@@ -1028,13 +1028,7 @@ class FeaturesEnricher(TransformerMixin):
|
|
1028
1028
|
columns_renaming,
|
1029
1029
|
_,
|
1030
1030
|
) = prepared_data
|
1031
|
-
|
1032
|
-
# rename baseline_score_column
|
1033
|
-
reversed_renaming = {v: k for k, v in columns_renaming.items()}
|
1034
|
-
baseline_score_column = self.baseline_score_column
|
1035
|
-
if baseline_score_column is not None:
|
1036
|
-
baseline_score_column = reversed_renaming[baseline_score_column]
|
1037
|
-
|
1031
|
+
|
1038
1032
|
gc.collect()
|
1039
1033
|
|
1040
1034
|
if fitting_X.shape[1] == 0 and fitting_enriched_X.shape[1] == 0:
|
@@ -1089,7 +1083,7 @@ class FeaturesEnricher(TransformerMixin):
|
|
1089
1083
|
has_time=has_time,
|
1090
1084
|
)
|
1091
1085
|
baseline_cv_result = baseline_estimator.cross_val_predict(
|
1092
|
-
fitting_X, y_sorted, baseline_score_column
|
1086
|
+
fitting_X, y_sorted, self.baseline_score_column
|
1093
1087
|
)
|
1094
1088
|
baseline_metric = baseline_cv_result.get_display_metric()
|
1095
1089
|
if baseline_metric is None:
|
@@ -1192,7 +1186,7 @@ class FeaturesEnricher(TransformerMixin):
|
|
1192
1186
|
f"on client features: {eval_X_sorted.columns.to_list()}"
|
1193
1187
|
)
|
1194
1188
|
etalon_eval_results = baseline_estimator.calculate_metric(
|
1195
|
-
eval_X_sorted, eval_y_sorted, baseline_score_column
|
1189
|
+
eval_X_sorted, eval_y_sorted, self.baseline_score_column
|
1196
1190
|
)
|
1197
1191
|
etalon_eval_metric = etalon_eval_results.get_display_metric()
|
1198
1192
|
self.logger.info(
|
@@ -2502,6 +2496,9 @@ if response.status_code == 200:
|
|
2502
2496
|
) -> tuple[pd.DataFrame, dict[str, str], list[str], dict[str, SearchKey]]:
|
2503
2497
|
if self._search_task is None:
|
2504
2498
|
raise NotFittedError(self.bundle.get("transform_unfitted_enricher"))
|
2499
|
+
features_meta = self._search_task.get_all_features_metadata_v2()
|
2500
|
+
if features_meta is None:
|
2501
|
+
raise NotFittedError(self.bundle.get("transform_unfitted_enricher"))
|
2505
2502
|
|
2506
2503
|
start_time = time.time()
|
2507
2504
|
search_id = self.search_id or (self._search_task.search_task_id if self._search_task is not None else None)
|
@@ -2531,7 +2528,6 @@ if response.status_code == 200:
|
|
2531
2528
|
self.__display_support_link(msg)
|
2532
2529
|
return None, {}, [], self.search_keys
|
2533
2530
|
|
2534
|
-
features_meta = self._search_task.get_all_features_metadata_v2()
|
2535
2531
|
online_api_features = [fm.name for fm in features_meta if fm.from_online_api and fm.shap_value > 0]
|
2536
2532
|
if len(online_api_features) > 0:
|
2537
2533
|
self.logger.warning(
|
@@ -3382,6 +3378,7 @@ if response.status_code == 200:
|
|
3382
3378
|
except KeyboardInterrupt as e:
|
3383
3379
|
print(self.bundle.get("search_stopping"))
|
3384
3380
|
self.rest_client.stop_search_task_v2(trace_id, self._search_task.search_task_id)
|
3381
|
+
self._search_task = None
|
3385
3382
|
self.logger.warning(f"Search {self._search_task.search_task_id} stopped by user")
|
3386
3383
|
print(self.bundle.get("search_stopped"))
|
3387
3384
|
raise e
|
upgini/utils/sklearn_ext.py
CHANGED
@@ -1301,6 +1301,7 @@ def _encode_cat_features(X_train, y_train, X_test, y_test, cat_features, estimat
|
|
1301
1301
|
encoder = OrdinalEncoder(handle_unknown="use_encoded_value", unknown_value=-1)
|
1302
1302
|
encoder.fit(X_train[cat_features], y_train)
|
1303
1303
|
|
1304
|
+
# OrdinalEncoder doesn't support progressive encoding with target
|
1304
1305
|
X_train[cat_features] = encoder.transform(X_train[cat_features]).astype(int)
|
1305
1306
|
X_test[cat_features] = encoder.transform(X_test[cat_features]).astype(int)
|
1306
1307
|
|
@@ -1314,10 +1315,8 @@ def _encode_cat_features(X_train, y_train, X_test, y_test, cat_features, estimat
|
|
1314
1315
|
encoder = OrdinalEncoder(handle_unknown="use_encoded_value", unknown_value=-1)
|
1315
1316
|
encoder.fit(X_train[cat_features], y_train)
|
1316
1317
|
|
1317
|
-
#
|
1318
|
-
X_train[cat_features] = encoder.transform(X_train[cat_features]
|
1319
|
-
|
1320
|
-
# Static encoding on validation (no y)
|
1318
|
+
# OrdinalEncoder doesn't support progressive encoding with target
|
1319
|
+
X_train[cat_features] = encoder.transform(X_train[cat_features]).astype(int)
|
1321
1320
|
X_test[cat_features] = encoder.transform(X_test[cat_features]).astype(int)
|
1322
1321
|
|
1323
1322
|
return X_train, y_train, X_test, y_test, [], encoder
|
@@ -1,9 +1,9 @@
|
|
1
|
-
upgini/__about__.py,sha256=
|
1
|
+
upgini/__about__.py,sha256=C4MPkUjPY8txHqkpCAHzv554Bvc9hUrOFMic1aakSTI,24
|
2
2
|
upgini/__init__.py,sha256=LXSfTNU0HnlOkE69VCxkgIKDhWP-JFo_eBQ71OxTr5Y,261
|
3
3
|
upgini/ads.py,sha256=nvuRxRx5MHDMgPr9SiU-fsqRdFaBv8p4_v1oqiysKpc,2714
|
4
4
|
upgini/dataset.py,sha256=pQ8JQe0cdygD-W9GefJmfE6bnj4EYzXsjlgWdIS9nS8,31578
|
5
5
|
upgini/errors.py,sha256=2b_Wbo0OYhLUbrZqdLIx5jBnAsiD1Mcenh-VjR4HCTw,950
|
6
|
-
upgini/features_enricher.py,sha256=
|
6
|
+
upgini/features_enricher.py,sha256=Du1S72F55cqyKbHT3VGSPnJO3XicWABFVkA2-G3chdA,231696
|
7
7
|
upgini/http.py,sha256=-J_wOpnwVnT0ebPC6sOs6fN3AWtCD0LJLu6nlYmxaqk,44348
|
8
8
|
upgini/metadata.py,sha256=VzgtgEbPPtNxTrj9LM5qSDP3DujHwAXqbUSKBjPcb9c,12477
|
9
9
|
upgini/metrics.py,sha256=KCPE_apPN-9BIdv6GqASbJVaB_gBcy8wzNApAcyaGo4,46020
|
@@ -68,13 +68,13 @@ upgini/utils/postal_code_utils.py,sha256=5M0sUqH2DAr33kARWCTXR-ACyzWbjDq_-0mmEml
|
|
68
68
|
upgini/utils/progress_bar.py,sha256=N-Sfdah2Hg8lXP_fV9EfUTXz_PyRt4lo9fAHoUDOoLc,1550
|
69
69
|
upgini/utils/psi.py,sha256=vw8QEktXSx29IiMJMxmDeFU_4lJInJBXt_XL5Muekzo,11114
|
70
70
|
upgini/utils/sample_utils.py,sha256=xpfYaZ2cYP7I2JrcooVc13QNBFawB81cJRuh38451Q4,15123
|
71
|
-
upgini/utils/sklearn_ext.py,sha256=
|
71
|
+
upgini/utils/sklearn_ext.py,sha256=Pcy8sWD6f4YcE5Bu0UmXD4j0ICmXtrT8DJlTArM-_a0,49356
|
72
72
|
upgini/utils/sort.py,sha256=8uuHs2nfSMVnz8GgvbOmgMB1PgEIZP1uhmeRFxcwnYw,7039
|
73
73
|
upgini/utils/target_utils.py,sha256=GCPn4QeJ83JJ_vyBJ3IhY5fyIRkLC9q9BE59S2FRO1I,10882
|
74
74
|
upgini/utils/track_info.py,sha256=G5Lu1xxakg2_TQjKZk4b5SvrHsATTXNVV3NbvWtT8k8,5663
|
75
75
|
upgini/utils/ts_utils.py,sha256=26vhC0pN7vLXK6R09EEkMK3Lwb9IVPH7LRdqFIQ3kPs,1383
|
76
76
|
upgini/utils/warning_counter.py,sha256=-GRY8EUggEBKODPSuXAkHn9KnEQwAORC0mmz_tim-PM,254
|
77
|
-
upgini-1.2.
|
78
|
-
upgini-1.2.
|
79
|
-
upgini-1.2.
|
80
|
-
upgini-1.2.
|
77
|
+
upgini-1.2.120.dist-info/METADATA,sha256=KFxeOoYvqFTE347dhf5EmvIskXqWMZvxYWy3AAwOyWI,50743
|
78
|
+
upgini-1.2.120.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
79
|
+
upgini-1.2.120.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
|
80
|
+
upgini-1.2.120.dist-info/RECORD,,
|
File without changes
|
File without changes
|