autogluon.tabular 1.2.1b20250226__py3-none-any.whl → 1.2.1b20250227__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.
@@ -39,19 +39,19 @@ class AbstractTabularLearner(AbstractLearner):
39
39
  self,
40
40
  path_context: str,
41
41
  label: str,
42
- feature_generator: PipelineFeatureGenerator,
42
+ feature_generator: PipelineFeatureGenerator | None = None,
43
43
  ignored_columns: list = None,
44
- label_count_threshold=10,
45
- problem_type=None,
46
- quantile_levels=None,
47
- eval_metric=None,
48
- positive_class=None,
49
- cache_data=True,
50
- is_trainer_present=False,
51
- random_state=0,
52
- sample_weight=None,
53
- weight_evaluation=False,
54
- groups=None,
44
+ label_count_threshold: int = 10,
45
+ problem_type: str | None = None,
46
+ quantile_levels: list[float] | None = None,
47
+ eval_metric: Scorer | None = None,
48
+ positive_class: str | None = None,
49
+ cache_data: bool = True,
50
+ is_trainer_present: bool = False,
51
+ random_state: int = 0,
52
+ sample_weight: str | None = None,
53
+ weight_evaluation: bool = False,
54
+ groups: str | None = None,
55
55
  ):
56
56
  super().__init__(path_context=path_context, random_state=random_state)
57
57
  self.label = label
@@ -43,16 +43,17 @@ class DefaultLearner(AbstractTabularLearner):
43
43
  def _fit(
44
44
  self,
45
45
  X: DataFrame,
46
- X_val: DataFrame = None,
47
- X_test: DataFrame = None,
48
- X_unlabeled: DataFrame = None,
49
- holdout_frac=0.1,
50
- num_bag_folds=0,
51
- num_bag_sets=1,
52
- time_limit=None,
53
- infer_limit=None,
54
- infer_limit_batch_size=None,
55
- verbosity=2,
46
+ X_val: DataFrame | None = None,
47
+ X_test: DataFrame | None = None,
48
+ X_unlabeled: DataFrame | None = None,
49
+ holdout_frac: float = 0.1,
50
+ num_bag_folds: int = 0,
51
+ num_bag_sets: int = 1,
52
+ time_limit: float | None = None,
53
+ infer_limit: float | None = None,
54
+ infer_limit_batch_size: int | None = None,
55
+ verbosity: int = 2,
56
+ raise_on_model_failure: bool = False,
56
57
  **trainer_fit_kwargs,
57
58
  ):
58
59
  """Arguments:
@@ -121,6 +122,7 @@ class DefaultLearner(AbstractTabularLearner):
121
122
  save_data=self.cache_data,
122
123
  random_state=self.random_state,
123
124
  verbosity=verbosity,
125
+ raise_on_model_failure=raise_on_model_failure,
124
126
  )
125
127
 
126
128
  self.trainer_path = trainer.path
@@ -990,6 +990,14 @@ class TabularPredictor:
990
990
  to any amount of labeled data.
991
991
  verbosity : int
992
992
  If specified, overrides the existing `predictor.verbosity` value.
993
+ raise_on_model_failure: bool, default = False
994
+ If True, will raise on any exception during model training.
995
+ This is useful when using a debugger during development to identify the cause of model failures.
996
+ This should only be used for debugging.
997
+ If False, will try to skip to the next model if an exception occurred during model training.
998
+ This is the default logic and is a core principle of AutoGluon's design.
999
+
1000
+ .. versionadded:: 1.3.0
993
1001
  raise_on_no_models_fitted: bool, default = True
994
1002
  If True, will raise a RuntimeError if no models were successfully fit during `fit()`.
995
1003
  calibrate: bool or str, default = 'auto'
@@ -1109,6 +1117,7 @@ class TabularPredictor:
1109
1117
  delay_bag_sets: bool = kwargs["delay_bag_sets"]
1110
1118
  test_data = kwargs["test_data"]
1111
1119
  learning_curves = kwargs["learning_curves"]
1120
+ raise_on_model_failure = kwargs["raise_on_model_failure"]
1112
1121
 
1113
1122
  if ag_args is None:
1114
1123
  ag_args = {}
@@ -1256,6 +1265,7 @@ class TabularPredictor:
1256
1265
  verbosity=verbosity,
1257
1266
  use_bag_holdout=use_bag_holdout,
1258
1267
  callbacks=callbacks,
1268
+ raise_on_model_failure=raise_on_model_failure,
1259
1269
  )
1260
1270
  ag_post_fit_kwargs = dict(
1261
1271
  keep_only_best=kwargs["keep_only_best"],
@@ -5036,6 +5046,7 @@ class TabularPredictor:
5036
5046
  # learning curves and test data (for logging purposes only)
5037
5047
  learning_curves=False,
5038
5048
  test_data=None,
5049
+ raise_on_model_failure=False,
5039
5050
  )
5040
5051
  kwargs, ds_valid_keys = self._sanitize_dynamic_stacking_kwargs(kwargs)
5041
5052
  kwargs = self._validate_fit_extra_kwargs(kwargs, extra_valid_keys=list(fit_kwargs_default.keys()) + ds_valid_keys)
@@ -128,6 +128,12 @@ class AbstractTabularTrainer(AbstractTrainer[AbstractModel]):
128
128
  Higher levels correspond to more detailed print statements (you can set verbosity = 0 to suppress warnings).
129
129
  If using logging, you can alternatively control amount of information printed via `logger.setLevel(L)`,
130
130
  where `L` ranges from 0 to 50 (Note: higher values of `L` correspond to fewer print statements, opposite of verbosity levels).
131
+ raise_on_model_failure : bool, default = False
132
+ If True, Trainer will raise on any exception during model training.
133
+ This is ideal when using a debugger during development.
134
+ If False, Trainer will try to skip to the next model if an exception occurred during model training.
135
+
136
+ .. versionadded:: 1.3.0
131
137
  """
132
138
 
133
139
  distill_stackname = "distill" # name of stack-level for distilled student models
@@ -149,6 +155,7 @@ class AbstractTabularTrainer(AbstractTrainer[AbstractModel]):
149
155
  save_data: bool = False,
150
156
  random_state: int = 0,
151
157
  verbosity: int = 2,
158
+ raise_on_model_failure: bool = False,
152
159
  ):
153
160
  super().__init__(
154
161
  path=path,
@@ -163,6 +170,7 @@ class AbstractTabularTrainer(AbstractTrainer[AbstractModel]):
163
170
  #: Integer value added to the stack level to get the random_state for kfold splits or the train/val split if bagging is disabled
164
171
  self.random_state = random_state
165
172
  self.verbosity = verbosity
173
+ self.raise_on_model_failure = raise_on_model_failure
166
174
 
167
175
  # TODO: consider redesign where Trainer doesn't need sample_weight column name and weights are separate from X
168
176
  self.sample_weight = sample_weight
@@ -2188,6 +2196,10 @@ class AbstractTabularTrainer(AbstractTrainer[AbstractModel]):
2188
2196
  # TODO: Add recursive=True to avoid repeatedly loading models each time this is called for bagged ensembles (especially during repeated bagging)
2189
2197
  self.save_model(model=model)
2190
2198
  except Exception as exc:
2199
+ if self.raise_on_model_failure:
2200
+ # immediately raise instead of skipping to next model, useful for debugging during development
2201
+ logger.warning("Model failure occurred... Raising exception instead of continuing to next model. (raise_on_model_failure=True)")
2202
+ raise exc
2191
2203
  exception = exc # required to reference exc outside of `except` statement
2192
2204
  del_model = True
2193
2205
  if isinstance(exception, TimeLimitExceeded):
@@ -1,4 +1,4 @@
1
1
  """This is the autogluon version file."""
2
2
 
3
- __version__ = "1.2.1b20250226"
3
+ __version__ = "1.2.1b20250227"
4
4
  __lite__ = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autogluon.tabular
3
- Version: 1.2.1b20250226
3
+ Version: 1.2.1b20250227
4
4
  Summary: Fast and Accurate ML in 3 Lines of Code
5
5
  Home-page: https://github.com/autogluon/autogluon
6
6
  Author: AutoGluon Community
@@ -41,19 +41,19 @@ Requires-Dist: scipy<1.16,>=1.5.4
41
41
  Requires-Dist: pandas<2.3.0,>=2.0.0
42
42
  Requires-Dist: scikit-learn<1.5.3,>=1.4.0
43
43
  Requires-Dist: networkx<4,>=3.0
44
- Requires-Dist: autogluon.core==1.2.1b20250226
45
- Requires-Dist: autogluon.features==1.2.1b20250226
44
+ Requires-Dist: autogluon.core==1.2.1b20250227
45
+ Requires-Dist: autogluon.features==1.2.1b20250227
46
46
  Provides-Extra: all
47
47
  Requires-Dist: numpy<2.0.0,>=1.25; extra == "all"
48
- Requires-Dist: lightgbm<4.6,>=4.0; extra == "all"
49
- Requires-Dist: autogluon.core[all]==1.2.1b20250226; extra == "all"
50
48
  Requires-Dist: fastai<2.8,>=2.3.1; extra == "all"
51
49
  Requires-Dist: xgboost<2.2,>=1.6; extra == "all"
52
- Requires-Dist: spacy<3.8; extra == "all"
53
- Requires-Dist: torch<2.6,>=2.2; extra == "all"
54
50
  Requires-Dist: catboost<1.3,>=1.2; extra == "all"
55
51
  Requires-Dist: einops<0.9,>=0.7; extra == "all"
52
+ Requires-Dist: lightgbm<4.6,>=4.0; extra == "all"
56
53
  Requires-Dist: huggingface-hub[torch]; extra == "all"
54
+ Requires-Dist: torch<2.6,>=2.2; extra == "all"
55
+ Requires-Dist: spacy<3.8; extra == "all"
56
+ Requires-Dist: autogluon.core[all]==1.2.1b20250227; extra == "all"
57
57
  Provides-Extra: catboost
58
58
  Requires-Dist: numpy<2.0.0,>=1.25; extra == "catboost"
59
59
  Requires-Dist: catboost<1.3,>=1.2; extra == "catboost"
@@ -66,7 +66,7 @@ Requires-Dist: imodels<1.4.0,>=1.3.10; extra == "imodels"
66
66
  Provides-Extra: lightgbm
67
67
  Requires-Dist: lightgbm<4.6,>=4.0; extra == "lightgbm"
68
68
  Provides-Extra: ray
69
- Requires-Dist: autogluon.core[all]==1.2.1b20250226; extra == "ray"
69
+ Requires-Dist: autogluon.core[all]==1.2.1b20250227; extra == "ray"
70
70
  Provides-Extra: skex
71
71
  Requires-Dist: scikit-learn-intelex<2025.1,>=2024.0; extra == "skex"
72
72
  Provides-Extra: skl2onnx
@@ -1,6 +1,6 @@
1
- autogluon.tabular-1.2.1b20250226-py3.9-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
1
+ autogluon.tabular-1.2.1b20250227-py3.9-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
2
2
  autogluon/tabular/__init__.py,sha256=2OXpJCvENRHubBTYNIPpHX93WWuFZzsJBtTZbNVHVas,400
3
- autogluon/tabular/version.py,sha256=ADP5SToVDuyj8YndEeaK4OQXYSKGWWvpOifXJZvQoLU,91
3
+ autogluon/tabular/version.py,sha256=5ozpv_b_rM463xTXRdXij1xDVDTJr5oIBlgIcEiF2lw,91
4
4
  autogluon/tabular/configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  autogluon/tabular/configs/config_helper.py,sha256=Pb2aW9Z9w77pYKPRVZ3nBzHY3KJaiEJSJ747zZcJIVk,21132
6
6
  autogluon/tabular/configs/feature_generator_presets.py,sha256=EV5Ym8VW15q92MwOUpTi7wZFS2QooM51fLg3RdUsn-M,1223
@@ -14,8 +14,8 @@ autogluon/tabular/experimental/_tabular_classifier.py,sha256=7lGoFdvkHiZS3VpcXo9
14
14
  autogluon/tabular/experimental/_tabular_regressor.py,sha256=EzEDL-19T5QUVNmLkSHNzzGwYrUxyqlNpIDPMgtV6Gg,1932
15
15
  autogluon/tabular/experimental/plot_leaderboard.py,sha256=BN_kB-zmOZNUYWyI7z9pF67GCV20zo8yV51HKKj1SCY,9481
16
16
  autogluon/tabular/learner/__init__.py,sha256=Hhmk5WpKQHohVmI-veOaKMelKJpIdzeXrmw_DPn3DTU,63
17
- autogluon/tabular/learner/abstract_learner.py,sha256=3myDh867x-EWTPR-O-iw82WGgd5n1NKWf3kaTcYQeh0,54955
18
- autogluon/tabular/learner/default_learner.py,sha256=cg3K0oA-4ccXWtmGgy6qUJaLldieFwDvnMP_PyE9gdk,24579
17
+ autogluon/tabular/learner/abstract_learner.py,sha256=HmnW7KO3sV4H1QSquJn9DYOwoWa2vohKThq_hr4OHM4,55102
18
+ autogluon/tabular/learner/default_learner.py,sha256=hjdKbcFtIQxQ3-k1LiGOo-w5sLxIIQAyFLs3-R35aw0,24781
19
19
  autogluon/tabular/models/__init__.py,sha256=tDVqwVG9q2ctLWRouyXeYs5NiSBnOnwh3anAfZyM3jg,1099
20
20
  autogluon/tabular/models/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  autogluon/tabular/models/_utils/rapids_utils.py,sha256=gbej9Hjn4alCWZuGN9sOLXMMAyWbgHPThTsp2feS39o,1038
@@ -144,23 +144,23 @@ autogluon/tabular/models/xt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
144
144
  autogluon/tabular/models/xt/xt_model.py,sha256=z9Hcp3CR_QS4XMlE9-g5rFknj2KPHfFLtyqb0qvOYbw,825
145
145
  autogluon/tabular/predictor/__init__.py,sha256=zCMgjxQlWpDWnr1l1xjBCiK3rWC3N3RoD8UXBnazT74,107
146
146
  autogluon/tabular/predictor/interpretable_predictor.py,sha256=5UeKgnMFsfY65tiO3kxfHBPr03lyswLrgdtjPhI0Y7Q,6934
147
- autogluon/tabular/predictor/predictor.py,sha256=MSJjTqlfGEN4ESpUFCjdrnCbzv8-6pf89uiun2OSZTg,356361
147
+ autogluon/tabular/predictor/predictor.py,sha256=A86C_9ixByrSrcU-Bxy9eTTZ7nCnIvRDN2uY-0ANLVY,357082
148
148
  autogluon/tabular/register/__init__.py,sha256=7CLOTWIUho0wi4eAwhYJ5Y0PfvNCWKnRwlw3bwYoTNE,93
149
149
  autogluon/tabular/register/_ag_model_register.py,sha256=tMr-QgxgCE49tdThdSFOZaJg2D9ckDh6fiR5K4cRtvk,1564
150
150
  autogluon/tabular/register/_model_register.py,sha256=jqSg0d89dXAAcp-OT4II90ce994ByKMMzAYmpkyaRbI,6824
151
151
  autogluon/tabular/trainer/__init__.py,sha256=PW_PGL-tWoQzx3ES2S53bQEZOtsRWTYiM9QdOqsk0dI,38
152
- autogluon/tabular/trainer/abstract_trainer.py,sha256=daz6_IfYX9bvQ5c5RpbxZ9f5JytUDq2-XDO1wAXpXtk,231155
152
+ autogluon/tabular/trainer/abstract_trainer.py,sha256=lqOjVTLUaZNue4B7u47PYXTXsBEFbSJ4SyruNeChFCk,231925
153
153
  autogluon/tabular/trainer/auto_trainer.py,sha256=FyRWM8iUJuDvw_aqV5EV_xdh_pb-nHzAvG1sbEhvs0g,8680
154
154
  autogluon/tabular/trainer/model_presets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
155
155
  autogluon/tabular/trainer/model_presets/presets.py,sha256=bTPGPyz07a7GG6327yO6ryuWbNc1aq3hF1qzZL-Xe4c,16733
156
156
  autogluon/tabular/trainer/model_presets/presets_distill.py,sha256=MnFC2GJc6RmDBNAGbsO2XMfo3PjR8cUrZoilWW8gTYQ,3295
157
157
  autogluon/tabular/tuning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
158
158
  autogluon/tabular/tuning/feature_pruner.py,sha256=9iNku8gVbYEkjuKlyITPJDicsNkoraaQOlINQq9iZlQ,6877
159
- autogluon.tabular-1.2.1b20250226.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
160
- autogluon.tabular-1.2.1b20250226.dist-info/METADATA,sha256=w27z14Cxm2sznG8jKz1q11QwLJOcc_LBsz0VbrXzLek,14386
161
- autogluon.tabular-1.2.1b20250226.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
162
- autogluon.tabular-1.2.1b20250226.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
163
- autogluon.tabular-1.2.1b20250226.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
164
- autogluon.tabular-1.2.1b20250226.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
165
- autogluon.tabular-1.2.1b20250226.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
166
- autogluon.tabular-1.2.1b20250226.dist-info/RECORD,,
159
+ autogluon.tabular-1.2.1b20250227.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
160
+ autogluon.tabular-1.2.1b20250227.dist-info/METADATA,sha256=nw0R8W2F-rUL_zr6eevigQGHEmmFKBhH2TGfPHvjuUE,14386
161
+ autogluon.tabular-1.2.1b20250227.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
162
+ autogluon.tabular-1.2.1b20250227.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
163
+ autogluon.tabular-1.2.1b20250227.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
164
+ autogluon.tabular-1.2.1b20250227.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
165
+ autogluon.tabular-1.2.1b20250227.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
166
+ autogluon.tabular-1.2.1b20250227.dist-info/RECORD,,