upgini 1.1.281__py3-none-any.whl → 1.1.282__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "1.1.281"
1
+ __version__ = "1.1.282"
upgini/metrics.py CHANGED
@@ -298,6 +298,7 @@ class EstimatorWrapper:
298
298
  scorer = check_scoring(self.estimator, scoring=self.scorer)
299
299
 
300
300
  if baseline_score_column is not None and self.metric_name == "GINI":
301
+ self.logger.info("Calculate baseline GINI on passed baseline_score_column and target")
301
302
  metric = roc_auc_score(y, x[baseline_score_column])
302
303
  else:
303
304
  cv_results = cross_validate(
@@ -17,7 +17,7 @@ from sklearn.base import clone, is_classifier
17
17
  from sklearn.exceptions import FitFailedWarning, NotFittedError
18
18
  from sklearn.metrics import check_scoring
19
19
  from sklearn.metrics._scorer import _MultimetricScorer
20
- from sklearn.model_selection import check_cv
20
+ from sklearn.model_selection import StratifiedKFold, check_cv
21
21
  from sklearn.utils.fixes import np_version, parse_version
22
22
  from sklearn.utils.validation import indexable
23
23
 
@@ -312,25 +312,34 @@ def cross_validate(
312
312
  ret[key] = train_scores_dict[name]
313
313
 
314
314
  return ret
315
- except Exception:
315
+ except ValueError as e:
316
316
  # logging.exception("Failed to execute overriden cross_validate. Fallback to original")
317
- raise
318
- # fit_params["use_best_model"] = False
319
- # return original_cross_validate(
320
- # estimator,
321
- # X,
322
- # y,
323
- # groups=groups,
324
- # scoring=scoring,
325
- # cv=cv,
326
- # n_jobs=n_jobs,
327
- # verbose=verbose,
328
- # fit_params=fit_params,
329
- # pre_dispatch=pre_dispatch,
330
- # return_train_score=return_train_score,
331
- # return_estimator=return_estimator,
332
- # error_score=error_score,
333
- # )
317
+ if hasattr(e, "args") and len(e.args) > 0 and "Only one class present in y_true" in e.args[0]:
318
+ # Try change CV to StratifiedKFold and retry
319
+ if hasattr(cv, "shuffle"):
320
+ shuffle = cv.shuffle
321
+ else:
322
+ shuffle = False
323
+ if hasattr(cv, "random_state"):
324
+ random_state = cv.random_state
325
+ else:
326
+ random_state = None
327
+ return cross_validate(
328
+ estimator,
329
+ x,
330
+ y,
331
+ groups=groups,
332
+ scoring=scoring,
333
+ cv=StratifiedKFold(n_splits=cv.get_n_splits(), shuffle=shuffle, random_state=random_state),
334
+ n_jobs=n_jobs,
335
+ verbose=verbose,
336
+ fit_params=fit_params,
337
+ pre_dispatch=pre_dispatch,
338
+ return_train_score=return_train_score,
339
+ return_estimator=return_estimator,
340
+ error_score=error_score,
341
+ )
342
+ raise e
334
343
 
335
344
 
336
345
  def _fit_and_score(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: upgini
3
- Version: 1.1.281
3
+ Version: 1.1.282
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/
@@ -839,4 +839,4 @@ Some convenient ways to start contributing are:
839
839
  - [More perks for registered users](https://profile.upgini.com)
840
840
 
841
841
  <sup>😔 Found mistype or a bug in code snippet? Our bad! <a href="https://github.com/upgini/upgini/issues/new?assignees=&title=readme%2Fbug">
842
- Please report it here.</a></sup>
842
+ Please report it here</a></sup>
@@ -1,4 +1,4 @@
1
- upgini/__about__.py,sha256=QXQ0qAoJaXwuS49QdPQRJ572R1Vxd94TndilBoFpK_s,24
1
+ upgini/__about__.py,sha256=30UsKi2T1u8S760-6ZTTqIlaw1c8DxzyxYb96KBjFr0,24
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
@@ -6,7 +6,7 @@ upgini/errors.py,sha256=2b_Wbo0OYhLUbrZqdLIx5jBnAsiD1Mcenh-VjR4HCTw,950
6
6
  upgini/features_enricher.py,sha256=J1x1YMoJBWMFWhdvP-_h7X67qEoTcLqkRRMrz8I1XKQ,176885
7
7
  upgini/http.py,sha256=khrYSldpY-HbVLCcApfV1BjBFK6Uyuatb4colKybxgY,42301
8
8
  upgini/metadata.py,sha256=CFJekYGD7Ep7pRFH7wCEcsXS4bz83do33FNmtcCY9P4,9729
9
- upgini/metrics.py,sha256=tTXAgjEuoo_vDe4n-R0AFK95IIx_7kugIJJJv2Hr_1o,30128
9
+ upgini/metrics.py,sha256=kCRJ5vCEN76EbVtA1OpKpk6jrxwbfyRFBFtB2fBuq1Y,30227
10
10
  upgini/search_task.py,sha256=LtRJ9bCPjMo1gJ-sUDKERhDwGcWKImrzwVFHjkMSQHQ,17071
11
11
  upgini/spinner.py,sha256=4iMd-eIe_BnkqFEMIliULTbj6rNI2HkN_VJ4qYe0cUc,1118
12
12
  upgini/version_validator.py,sha256=RGg87VweujTNlibgsOuqPLIEiBgIOkuXNVTGuNCD234,1405
@@ -52,11 +52,11 @@ upgini/utils/ip_utils.py,sha256=Zf3F2cnQmOCH09QLQHetpjMFu1PnD0cTmDymn0SnSy8,1672
52
52
  upgini/utils/phone_utils.py,sha256=JNSkF8G6mgsN8Czy11pamaJdsY6rBINEMpi7jbVt_RA,408
53
53
  upgini/utils/postal_code_utils.py,sha256=_8CR9tBqsPptQsmMUvnrCAmBaMIQSWH3JfJ4ly3x_zs,409
54
54
  upgini/utils/progress_bar.py,sha256=N-Sfdah2Hg8lXP_fV9EfUTXz_PyRt4lo9fAHoUDOoLc,1550
55
- upgini/utils/sklearn_ext.py,sha256=c23MGSUVfxLnaDWKAxavHgnOtm5dGKkF3YswdWQcFzs,43984
55
+ upgini/utils/sklearn_ext.py,sha256=N-eJrfAJxYpDPc85sKQyMFcIeL9Ug2lwlqDyS4jFOdE,44499
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.281.dist-info/METADATA,sha256=l6PW4_vWrlqKTTbhXFb9Qsm9FIYMQH5BrU3Vca5WzKo,48118
60
- upgini-1.1.281.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
61
- upgini-1.1.281.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
62
- upgini-1.1.281.dist-info/RECORD,,
59
+ upgini-1.1.282.dist-info/METADATA,sha256=8zARH7w4JgCbcnxAP3J61kr0Eiv6BSW5T0KBKQeHHq0,48117
60
+ upgini-1.1.282.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
61
+ upgini-1.1.282.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
62
+ upgini-1.1.282.dist-info/RECORD,,