upgini 1.1.285a3418.post1__py3-none-any.whl → 1.1.286a3418.post1__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/features_enricher.py +7 -8
- upgini/utils/custom_loss_utils.py +39 -36
- upgini/version_validator.py +1 -1
- {upgini-1.1.285a3418.post1.dist-info → upgini-1.1.286a3418.post1.dist-info}/METADATA +1 -1
- {upgini-1.1.285a3418.post1.dist-info → upgini-1.1.286a3418.post1.dist-info}/RECORD +8 -8
- {upgini-1.1.285a3418.post1.dist-info → upgini-1.1.286a3418.post1.dist-info}/WHEEL +0 -0
- {upgini-1.1.285a3418.post1.dist-info → upgini-1.1.286a3418.post1.dist-info}/licenses/LICENSE +0 -0
upgini/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.1.
|
|
1
|
+
__version__ = "1.1.286a3418-1"
|
upgini/features_enricher.py
CHANGED
|
@@ -423,7 +423,7 @@ class FeaturesEnricher(TransformerMixin):
|
|
|
423
423
|
|
|
424
424
|
self.logger.info("Start fit")
|
|
425
425
|
|
|
426
|
-
self.__validate_search_keys(self.search_keys
|
|
426
|
+
self.__validate_search_keys(self.search_keys)
|
|
427
427
|
|
|
428
428
|
# Validate client estimator params
|
|
429
429
|
self._get_client_cat_features(estimator, X, self.search_keys)
|
|
@@ -557,7 +557,7 @@ class FeaturesEnricher(TransformerMixin):
|
|
|
557
557
|
|
|
558
558
|
self.logger.info("Start fit_transform")
|
|
559
559
|
|
|
560
|
-
self.__validate_search_keys(self.search_keys
|
|
560
|
+
self.__validate_search_keys(self.search_keys)
|
|
561
561
|
|
|
562
562
|
search_progress = SearchProgress(0.0, ProgressStage.START_FIT)
|
|
563
563
|
if progress_callback is not None:
|
|
@@ -972,6 +972,8 @@ class FeaturesEnricher(TransformerMixin):
|
|
|
972
972
|
|
|
973
973
|
# 2 Fit and predict with KFold estimator on enriched tds
|
|
974
974
|
# and calculate final metric (and uplift)
|
|
975
|
+
enriched_metric = None
|
|
976
|
+
uplift = None
|
|
975
977
|
enriched_estimator = None
|
|
976
978
|
if set(fitting_X.columns) != set(fitting_enriched_X.columns):
|
|
977
979
|
self.logger.info(
|
|
@@ -992,18 +994,15 @@ class FeaturesEnricher(TransformerMixin):
|
|
|
992
994
|
has_date=has_date,
|
|
993
995
|
)
|
|
994
996
|
enriched_metric = enriched_estimator.cross_val_predict(fitting_enriched_X, enriched_y_sorted)
|
|
995
|
-
if
|
|
997
|
+
if enriched_metric is None:
|
|
996
998
|
self.logger.warning(
|
|
997
999
|
f"Enriched {metric} on train combined features is None (maybe all features was removed)"
|
|
998
1000
|
)
|
|
999
1001
|
enriched_estimator = None
|
|
1000
|
-
uplift = None
|
|
1001
1002
|
else:
|
|
1002
1003
|
self.logger.info(f"Enriched {metric} on train combined features: {enriched_metric}")
|
|
1004
|
+
if etalon_metric is not None and enriched_metric is not None:
|
|
1003
1005
|
uplift = (enriched_metric - etalon_metric) * multiplier
|
|
1004
|
-
else:
|
|
1005
|
-
enriched_metric = None
|
|
1006
|
-
uplift = None
|
|
1007
1006
|
|
|
1008
1007
|
train_metrics = {
|
|
1009
1008
|
self.bundle.get("quality_metrics_segment_header"): self.bundle.get(
|
|
@@ -2147,7 +2146,7 @@ class FeaturesEnricher(TransformerMixin):
|
|
|
2147
2146
|
]
|
|
2148
2147
|
return excluded_features[feature_name_header].values.tolist()
|
|
2149
2148
|
|
|
2150
|
-
def __validate_search_keys(self, search_keys: Dict[str, SearchKey], search_id: Optional[str]):
|
|
2149
|
+
def __validate_search_keys(self, search_keys: Dict[str, SearchKey], search_id: Optional[str] = None):
|
|
2151
2150
|
if (search_keys is None or len(search_keys) == 0) and self.country_code is None:
|
|
2152
2151
|
if search_id:
|
|
2153
2152
|
self.logger.debug(f"search_id {search_id} provided without search_keys")
|
|
@@ -11,46 +11,49 @@ def get_runtime_params_custom_loss(
|
|
|
11
11
|
runtime_parameters: RuntimeParameters,
|
|
12
12
|
logger: Optional[logging.Logger] = None,
|
|
13
13
|
) -> RuntimeParameters:
|
|
14
|
+
if not loss:
|
|
15
|
+
return runtime_parameters
|
|
16
|
+
|
|
14
17
|
if logger is None:
|
|
15
18
|
logger = logging.getLogger()
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
)
|
|
40
|
-
else False
|
|
19
|
+
|
|
20
|
+
selection_loss_reg = [
|
|
21
|
+
"regression",
|
|
22
|
+
"regression_l1",
|
|
23
|
+
"huber",
|
|
24
|
+
"poisson",
|
|
25
|
+
"quantile",
|
|
26
|
+
"mape",
|
|
27
|
+
"mean_absolute_percentage_error",
|
|
28
|
+
"gamma",
|
|
29
|
+
"tweedie",
|
|
30
|
+
]
|
|
31
|
+
selection_loss_binary = ["binary"]
|
|
32
|
+
selection_loss_multi_clf = ["multiclass", "multiclassova", "multiclass_ova", "ova", "ovr"]
|
|
33
|
+
use_custom_loss = (
|
|
34
|
+
True
|
|
35
|
+
if (
|
|
36
|
+
(model_task_type == ModelTaskType.REGRESSION)
|
|
37
|
+
and (loss in selection_loss_reg)
|
|
38
|
+
or (model_task_type == ModelTaskType.BINARY)
|
|
39
|
+
and (loss in selection_loss_binary)
|
|
40
|
+
or (model_task_type == ModelTaskType.MULTICLASS)
|
|
41
|
+
and (loss in selection_loss_multi_clf)
|
|
41
42
|
)
|
|
43
|
+
else False
|
|
44
|
+
)
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
if use_custom_loss:
|
|
47
|
+
runtime_parameters.properties["lightgbm_params_preselection.objective"] = loss
|
|
48
|
+
runtime_parameters.properties["lightgbm_params_base.objective"] = loss
|
|
49
|
+
runtime_parameters.properties["lightgbm_params_segment.objective"] = loss
|
|
50
|
+
msg = bundle.get("loss_selection_info").format(loss)
|
|
51
|
+
logger.info(msg)
|
|
52
|
+
print(msg)
|
|
53
|
+
else:
|
|
54
|
+
msg = bundle.get("loss_selection_warn").format(loss, model_task_type)
|
|
55
|
+
logger.warning(msg)
|
|
56
|
+
print(msg)
|
|
54
57
|
|
|
55
58
|
return runtime_parameters
|
|
56
59
|
|
upgini/version_validator.py
CHANGED
|
@@ -35,7 +35,7 @@ def validate_version(logger: logging.Logger):
|
|
|
35
35
|
try:
|
|
36
36
|
current_version = parse(__version__)
|
|
37
37
|
latest_version = get_version("upgini")
|
|
38
|
-
if current_version < latest_version:
|
|
38
|
+
if current_version < latest_version:
|
|
39
39
|
msg = bundle.get("version_warning").format(current_version, latest_version)
|
|
40
40
|
logger.warning(msg)
|
|
41
41
|
print(msg)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: upgini
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.286a3418.post1
|
|
4
4
|
Summary: Intelligent data search & enrichment for Machine Learning
|
|
5
5
|
Project-URL: Bug Reports, https://github.com/upgini/upgini/issues
|
|
6
6
|
Project-URL: Homepage, https://upgini.com/
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
upgini/__about__.py,sha256=
|
|
1
|
+
upgini/__about__.py,sha256=0u63MOlVTOemZweLQMeRYfiEkk1aAgsmjnV5cXKvCxk,31
|
|
2
2
|
upgini/__init__.py,sha256=asENHgEVHQBIkV-e_0IhE_ZWqkCG6398U3ZLrNzAH6k,407
|
|
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=EKngUPR5dpX8bZWrwl8qW61TtzssbxGEVwVO7XM3d3o,177530
|
|
7
7
|
upgini/http.py,sha256=khrYSldpY-HbVLCcApfV1BjBFK6Uyuatb4colKybxgY,42301
|
|
8
8
|
upgini/metadata.py,sha256=qDAIO7NLSSQp_XiXCv3U4XJTLO0KH3YuQ8lvCLYPqzs,9781
|
|
9
9
|
upgini/metrics.py,sha256=DLvA2YLV4f7lnzBCcfZ5T4NkqAv3pbstbjTepavuT7U,30688
|
|
10
10
|
upgini/search_task.py,sha256=LtRJ9bCPjMo1gJ-sUDKERhDwGcWKImrzwVFHjkMSQHQ,17071
|
|
11
11
|
upgini/spinner.py,sha256=4iMd-eIe_BnkqFEMIliULTbj6rNI2HkN_VJ4qYe0cUc,1118
|
|
12
|
-
upgini/version_validator.py,sha256=
|
|
12
|
+
upgini/version_validator.py,sha256=ddSKUK_-eGJB3NgrqOMoWJU-OxQ253WsNLp8aqJkaIM,1389
|
|
13
13
|
upgini/ads_management/__init__.py,sha256=qzyisOToVRP-tquAJD1PblZhNtMrOB8FiyF9JvfkvgE,50
|
|
14
14
|
upgini/ads_management/ads_manager.py,sha256=igVbN2jz80Umb2BUJixmJVj-zx8unoKpecVo-R-nGdw,2648
|
|
15
15
|
upgini/autofe/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -39,7 +39,7 @@ upgini/utils/__init__.py,sha256=O_KgzKiJjW3g4NoqZ7lAxUpoHcBi_gze6r3ndEjCH74,842
|
|
|
39
39
|
upgini/utils/base_search_key_detector.py,sha256=UNs2uxEcD1N_mOtkx3k6U70DCajW-QEO2vZp41GF0mU,855
|
|
40
40
|
upgini/utils/blocked_time_series.py,sha256=Uqr3vp4YqNclj2-PzEYqVy763GSXHn86sbpIl1UOB4s,3382
|
|
41
41
|
upgini/utils/country_utils.py,sha256=yE8oRgMpXuJxPfQm4fioY6dg6700HgVnHSk4Cv9sUyM,6511
|
|
42
|
-
upgini/utils/custom_loss_utils.py,sha256=
|
|
42
|
+
upgini/utils/custom_loss_utils.py,sha256=kieNZYBYZm5ZGBltF1F_jOSF4ea6C29rYuCyiDcqVNY,3857
|
|
43
43
|
upgini/utils/cv_utils.py,sha256=w6FQb9nO8BWDx88EF83NpjPLarK4eR4ia0Wg0kLBJC4,3525
|
|
44
44
|
upgini/utils/datetime_utils.py,sha256=-LsDTThsGKsTZ57V1uNiHtLcoTtqktk5tui4WnqggJo,10673
|
|
45
45
|
upgini/utils/deduplicate_utils.py,sha256=6AbARehUCghJZ4PppFtrej2s3gFRruh41MEm6mzakHs,8607
|
|
@@ -56,7 +56,7 @@ upgini/utils/sklearn_ext.py,sha256=N-eJrfAJxYpDPc85sKQyMFcIeL9Ug2lwlqDyS4jFOdE,4
|
|
|
56
56
|
upgini/utils/target_utils.py,sha256=Y96_PJ5cC-WsEbeqg20v9uqywDQobLoTb-xoP7S3o4E,7807
|
|
57
57
|
upgini/utils/track_info.py,sha256=G5Lu1xxakg2_TQjKZk4b5SvrHsATTXNVV3NbvWtT8k8,5663
|
|
58
58
|
upgini/utils/warning_counter.py,sha256=dIWBB4dI5XRRJZudvIlqlIYKEiwLLPcXarsZuYRt338,227
|
|
59
|
-
upgini-1.1.
|
|
60
|
-
upgini-1.1.
|
|
61
|
-
upgini-1.1.
|
|
62
|
-
upgini-1.1.
|
|
59
|
+
upgini-1.1.286a3418.post1.dist-info/METADATA,sha256=9SFdoA6_qWRERhq8uJc8up6Rapixox3ccmmut3lg2Es,48128
|
|
60
|
+
upgini-1.1.286a3418.post1.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
|
61
|
+
upgini-1.1.286a3418.post1.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
|
|
62
|
+
upgini-1.1.286a3418.post1.dist-info/RECORD,,
|
|
File without changes
|
{upgini-1.1.285a3418.post1.dist-info → upgini-1.1.286a3418.post1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|