upgini 1.1.281__tar.gz → 1.1.282__tar.gz

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.

Files changed (64) hide show
  1. {upgini-1.1.281 → upgini-1.1.282}/PKG-INFO +2 -2
  2. {upgini-1.1.281 → upgini-1.1.282}/README.md +1 -1
  3. upgini-1.1.282/src/upgini/__about__.py +1 -0
  4. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/metrics.py +1 -0
  5. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/sklearn_ext.py +28 -19
  6. upgini-1.1.281/src/upgini/__about__.py +0 -1
  7. {upgini-1.1.281 → upgini-1.1.282}/.gitignore +0 -0
  8. {upgini-1.1.281 → upgini-1.1.282}/LICENSE +0 -0
  9. {upgini-1.1.281 → upgini-1.1.282}/pyproject.toml +0 -0
  10. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/__init__.py +0 -0
  11. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/ads.py +0 -0
  12. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/ads_management/__init__.py +0 -0
  13. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/ads_management/ads_manager.py +0 -0
  14. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/autofe/__init__.py +0 -0
  15. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/autofe/all_operands.py +0 -0
  16. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/autofe/binary.py +0 -0
  17. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/autofe/date.py +0 -0
  18. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/autofe/feature.py +0 -0
  19. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/autofe/groupby.py +0 -0
  20. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/autofe/operand.py +0 -0
  21. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/autofe/unary.py +0 -0
  22. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/autofe/vector.py +0 -0
  23. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/data_source/__init__.py +0 -0
  24. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/data_source/data_source_publisher.py +0 -0
  25. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/dataset.py +0 -0
  26. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/errors.py +0 -0
  27. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/features_enricher.py +0 -0
  28. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/http.py +0 -0
  29. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/mdc/__init__.py +0 -0
  30. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/mdc/context.py +0 -0
  31. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/metadata.py +0 -0
  32. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/normalizer/__init__.py +0 -0
  33. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/normalizer/phone_normalizer.py +0 -0
  34. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/resource_bundle/__init__.py +0 -0
  35. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/resource_bundle/exceptions.py +0 -0
  36. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/resource_bundle/strings.properties +0 -0
  37. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/resource_bundle/strings_widget.properties +0 -0
  38. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/sampler/__init__.py +0 -0
  39. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/sampler/base.py +0 -0
  40. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/sampler/random_under_sampler.py +0 -0
  41. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/sampler/utils.py +0 -0
  42. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/search_task.py +0 -0
  43. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/spinner.py +0 -0
  44. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/__init__.py +0 -0
  45. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/base_search_key_detector.py +0 -0
  46. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/blocked_time_series.py +0 -0
  47. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/country_utils.py +0 -0
  48. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/custom_loss_utils.py +0 -0
  49. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/cv_utils.py +0 -0
  50. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/datetime_utils.py +0 -0
  51. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/deduplicate_utils.py +0 -0
  52. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/display_utils.py +0 -0
  53. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/email_utils.py +0 -0
  54. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/fallback_progress_bar.py +0 -0
  55. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/features_validator.py +0 -0
  56. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/format.py +0 -0
  57. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/ip_utils.py +0 -0
  58. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/phone_utils.py +0 -0
  59. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/postal_code_utils.py +0 -0
  60. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/progress_bar.py +0 -0
  61. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/target_utils.py +0 -0
  62. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/track_info.py +0 -0
  63. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/utils/warning_counter.py +0 -0
  64. {upgini-1.1.281 → upgini-1.1.282}/src/upgini/version_validator.py +0 -0
@@ -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>
@@ -799,4 +799,4 @@ Some convenient ways to start contributing are:
799
799
  - [More perks for registered users](https://profile.upgini.com)
800
800
 
801
801
  <sup>😔 Found mistype or a bug in code snippet? Our bad! <a href="https://github.com/upgini/upgini/issues/new?assignees=&title=readme%2Fbug">
802
- Please report it here.</a></sup>
802
+ Please report it here</a></sup>
@@ -0,0 +1 @@
1
+ __version__ = "1.1.282"
@@ -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 +0,0 @@
1
- __version__ = "1.1.281"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes