autogluon.core 1.2.1b20250218__py3-none-any.whl → 1.2.1b20250220__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.
@@ -1632,9 +1632,7 @@ class AbstractModel:
1632
1632
  path = self.path_root
1633
1633
  problem_type = self.problem_type
1634
1634
  eval_metric = self.eval_metric
1635
- hyperparameters = self._user_params.copy()
1636
- if self._user_params_aux:
1637
- hyperparameters[AG_ARGS_FIT] = self._user_params_aux.copy()
1635
+ hyperparameters = self.get_hyperparameters_init()
1638
1636
 
1639
1637
  args = dict(
1640
1638
  path=path,
@@ -1646,6 +1644,20 @@ class AbstractModel:
1646
1644
 
1647
1645
  return args
1648
1646
 
1647
+ def get_hyperparameters_init(self) -> dict:
1648
+ """
1649
+
1650
+ Returns
1651
+ -------
1652
+ hyperparameters: dict
1653
+ The dictionary of user specified hyperparameters for the model.
1654
+
1655
+ """
1656
+ hyperparameters = self._user_params.copy()
1657
+ if self._user_params_aux:
1658
+ hyperparameters[AG_ARGS_FIT] = self._user_params_aux.copy()
1659
+ return hyperparameters
1660
+
1649
1661
  def convert_to_template(self):
1650
1662
  """
1651
1663
  After calling this function, returned model should be able to be fit as if it was new, as well as deep-copied.
@@ -2227,7 +2239,7 @@ class AbstractModel:
2227
2239
  # TODO: Report errors?
2228
2240
  shutil.rmtree(path=model_path, ignore_errors=True)
2229
2241
 
2230
- def get_info(self) -> dict:
2242
+ def get_info(self, include_feature_metadata: bool = True) -> dict:
2231
2243
  """
2232
2244
  Returns a dictionary of numerous fields describing the model.
2233
2245
  """
@@ -2243,6 +2255,7 @@ class AbstractModel:
2243
2255
  "predict_time": self.predict_time,
2244
2256
  "val_score": self.val_score,
2245
2257
  "hyperparameters": self.params,
2258
+ "hyperparameters_user": self.get_hyperparameters_init(),
2246
2259
  "hyperparameters_fit": self.params_trained, # TODO: Explain in docs that this is for hyperparameters that differ in final model from original hyperparameters, such as epochs (from early stopping)
2247
2260
  "hyperparameters_nondefault": self.nondefault_params,
2248
2261
  AG_ARGS_FIT: self.get_params_aux_info(),
@@ -2260,6 +2273,8 @@ class AbstractModel:
2260
2273
  }
2261
2274
  if self._is_fit_metadata_registered:
2262
2275
  info.update(self._fit_metadata)
2276
+ if not include_feature_metadata:
2277
+ info.pop("feature_metadata")
2263
2278
  return info
2264
2279
 
2265
2280
  def get_params_aux_info(self) -> dict:
@@ -1192,6 +1192,28 @@ class BaggedEnsembleModel(AbstractModel):
1192
1192
  init_args.pop("problem_type")
1193
1193
  return init_args
1194
1194
 
1195
+ def get_hyperparameters_init_child(self, include_ag_args_ensemble: bool = False, child_model: AbstractModel = None) -> dict:
1196
+ """
1197
+
1198
+ Returns
1199
+ -------
1200
+ hyperparameters: dict
1201
+ The dictionary of user specified hyperparameters for the model.
1202
+
1203
+ """
1204
+ if child_model is None:
1205
+ if self.n_children > 0:
1206
+ child_model = self.load_child(self.models[0])
1207
+ else:
1208
+ child_model = self._get_model_base()
1209
+ hyperparameters_child = child_model.get_hyperparameters_init()
1210
+ if include_ag_args_ensemble:
1211
+ hyperparameters_self = self.get_hyperparameters_init()
1212
+ if hyperparameters_self:
1213
+ hyperparameters_child["ag_args_ensemble"] = hyperparameters_self
1214
+
1215
+ return hyperparameters_child
1216
+
1195
1217
  def convert_to_template_child(self):
1196
1218
  return self._get_model_base().convert_to_template()
1197
1219
 
@@ -1409,9 +1431,9 @@ class BaggedEnsembleModel(AbstractModel):
1409
1431
  model_names.append(model.name)
1410
1432
  return model_names
1411
1433
 
1412
- def get_info(self):
1413
- info = super().get_info()
1414
- children_info = self._get_child_info()
1434
+ def get_info(self, include_feature_metadata: bool = True):
1435
+ info = super().get_info(include_feature_metadata=include_feature_metadata)
1436
+ children_info = self._get_child_info(include_feature_metadata=include_feature_metadata)
1415
1437
  child_memory_sizes = [child["memory_size"] for child in children_info.values()]
1416
1438
  sum_memory_size_child = sum(child_memory_sizes)
1417
1439
  if child_memory_sizes:
@@ -1432,6 +1454,7 @@ class BaggedEnsembleModel(AbstractModel):
1432
1454
  child_model = self._get_model_base()
1433
1455
  child_hyperparameters = child_model.params
1434
1456
  child_ag_args_fit = child_model.params_aux
1457
+ child_hyperparameters_user = self.get_hyperparameters_init_child(include_ag_args_ensemble=False, child_model=child_model)
1435
1458
 
1436
1459
  bagged_info = dict(
1437
1460
  child_model_type=self._child_type.__name__,
@@ -1448,6 +1471,7 @@ class BaggedEnsembleModel(AbstractModel):
1448
1471
  max_memory_size=max_memory_size, # Memory used when all children are loaded into memory at once.
1449
1472
  min_memory_size=min_memory_size, # Memory used when only the largest child is loaded into memory.
1450
1473
  child_hyperparameters=child_hyperparameters,
1474
+ child_hyperparameters_user=child_hyperparameters_user,
1451
1475
  child_hyperparameters_fit=self._get_compressed_params_trained(),
1452
1476
  child_ag_args_fit=child_ag_args_fit,
1453
1477
  )
@@ -1480,14 +1504,16 @@ class BaggedEnsembleModel(AbstractModel):
1480
1504
  # memory is checked downstream on the child model
1481
1505
  pass
1482
1506
 
1483
- def _get_child_info(self):
1507
+ def _get_child_info(self, include_feature_metadata: bool = True):
1484
1508
  child_info_dict = dict()
1485
1509
  for model in self.models:
1486
1510
  if isinstance(model, str):
1487
1511
  child_path = self.create_contexts(os.path.join(self.path, model))
1488
1512
  child_info_dict[model] = self._child_type.load_info(child_path)
1513
+ if not include_feature_metadata:
1514
+ child_info_dict[model].pop("feature_metadata", None)
1489
1515
  else:
1490
- child_info_dict[model.name] = model.get_info()
1516
+ child_info_dict[model.name] = model.get_info(include_feature_metadata=include_feature_metadata)
1491
1517
  return child_info_dict
1492
1518
 
1493
1519
  def _construct_empty_oof(self, X, y):
@@ -309,8 +309,8 @@ class StackerEnsembleModel(BaggedEnsembleModel):
309
309
  model = model_type.load(model_path)
310
310
  return model
311
311
 
312
- def get_info(self):
313
- info = super().get_info()
312
+ def get_info(self, **kwargs):
313
+ info = super().get_info(**kwargs)
314
314
  stacker_info = dict(
315
315
  num_base_models=len(self.base_model_names),
316
316
  base_model_names=self.base_model_names,
@@ -111,8 +111,8 @@ class GreedyWeightedEnsembleModel(AbstractModel):
111
111
  model_weight_dict = {self.base_model_names[i]: self.weights_[i] for i in range(num_models)}
112
112
  return model_weight_dict
113
113
 
114
- def get_info(self):
115
- info = super().get_info()
114
+ def get_info(self, **kwargs):
115
+ info = super().get_info(**kwargs)
116
116
  info["model_weights"] = self._get_model_weights()
117
117
  return info
118
118
 
autogluon/core/version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """This is the autogluon version file."""
2
2
 
3
- __version__ = "1.2.1b20250218"
3
+ __version__ = "1.2.1b20250220"
4
4
  __lite__ = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autogluon.core
3
- Version: 1.2.1b20250218
3
+ Version: 1.2.1b20250220
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
@@ -45,24 +45,24 @@ Requires-Dist: tqdm<5,>=4.38
45
45
  Requires-Dist: requests
46
46
  Requires-Dist: matplotlib<3.11,>=3.7.0
47
47
  Requires-Dist: boto3<2,>=1.10
48
- Requires-Dist: autogluon.common==1.2.1b20250218
48
+ Requires-Dist: autogluon.common==1.2.1b20250220
49
49
  Provides-Extra: all
50
+ Requires-Dist: ray[default,tune]<2.43,>=2.10.0; extra == "all"
51
+ Requires-Dist: ray[default]<2.43,>=2.10.0; extra == "all"
50
52
  Requires-Dist: pyarrow>=15.0.0; extra == "all"
51
- Requires-Dist: ray[default]<2.41,>=2.10.0; extra == "all"
52
53
  Requires-Dist: hyperopt<0.2.8,>=0.2.7; extra == "all"
53
- Requires-Dist: ray[default,tune]<2.41,>=2.10.0; extra == "all"
54
54
  Provides-Extra: ray
55
- Requires-Dist: ray[default]<2.41,>=2.10.0; extra == "ray"
55
+ Requires-Dist: ray[default]<2.43,>=2.10.0; extra == "ray"
56
56
  Provides-Extra: raytune
57
57
  Requires-Dist: pyarrow>=15.0.0; extra == "raytune"
58
- Requires-Dist: ray[default,tune]<2.41,>=2.10.0; extra == "raytune"
58
+ Requires-Dist: ray[default,tune]<2.43,>=2.10.0; extra == "raytune"
59
59
  Requires-Dist: hyperopt<0.2.8,>=0.2.7; extra == "raytune"
60
60
  Provides-Extra: tests
61
+ Requires-Dist: pytest-mypy; extra == "tests"
62
+ Requires-Dist: types-setuptools; extra == "tests"
61
63
  Requires-Dist: flake8; extra == "tests"
62
64
  Requires-Dist: types-requests; extra == "tests"
63
- Requires-Dist: types-setuptools; extra == "tests"
64
65
  Requires-Dist: pytest; extra == "tests"
65
- Requires-Dist: pytest-mypy; extra == "tests"
66
66
 
67
67
 
68
68
 
@@ -1,9 +1,9 @@
1
- autogluon.core-1.2.1b20250218-py3.9-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
1
+ autogluon.core-1.2.1b20250220-py3.9-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
2
2
  autogluon/core/__init__.py,sha256=8KfvvHzXX3a4q6z43Dw1yE7VtbAoiSMaglVpKDy6Xeg,245
3
3
  autogluon/core/_setup_utils.py,sha256=ikxn4zc3PNyjJJT5SsgL0dvP-6Rbq6_dItGMiZNINv4,6958
4
4
  autogluon/core/constants.py,sha256=nEVLdSFJ-5O-tz3jUD3qPX65RMp7g8qOR38XlurbP4Y,3403
5
5
  autogluon/core/problem_type.py,sha256=XJmMgeNBgS7u43pDK-spTivatPyh_INOXveEXwQt-Rw,2993
6
- autogluon/core/version.py,sha256=7H9aiBFc3yZ4VAfYTXCxWQ-TNBEjD1nB5tqyO9XpoOs,91
6
+ autogluon/core/version.py,sha256=5_5isKRJ9Kd7emAdEPGzl72mtp4GDkqLCtc4C6IuV6k,91
7
7
  autogluon/core/augmentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  autogluon/core/augmentation/distill_utils.py,sha256=JBlp2WOMNKoJv8aKVwJVRQSalSk8jx36HM7-k_VvkhY,9404
9
9
  autogluon/core/calibrate/__init__.py,sha256=eU6qLj7DKUhaz2HHNHDrfroRaLM-mhuSncK_v1UP4F8,62
@@ -40,21 +40,21 @@ autogluon/core/models/__init__.py,sha256=dg3onYq5wW3-sfdNurnSIGpX0rpEjG_abgzyfwD
40
40
  autogluon/core/models/_utils.py,sha256=qswE9n1ge1AJSExgstEbrZiMFmMRa4Mf5Sz8D9-XU6c,2091
41
41
  autogluon/core/models/abstract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
42
  autogluon/core/models/abstract/_tags.py,sha256=Qr_3an0ZMig24S3OwISa-nTFfWHQe3pwPTiXq4zlEec,3409
43
- autogluon/core/models/abstract/abstract_model.py,sha256=SPknoRqTiRCZfTvoFrf2V3BW4h5MVbrl-2HvSHfCjOM,120532
43
+ autogluon/core/models/abstract/abstract_model.py,sha256=eEGAfyQAklkUKHasSRZYrRPKBG2WEYu1ygzYk1eiiK8,121024
44
44
  autogluon/core/models/abstract/abstract_nn_model.py,sha256=IId0ivO8uVvmpnK9OiM2CtPVrP1ewOaQQKtQUDtK7_k,4818
45
45
  autogluon/core/models/abstract/model_trial.py,sha256=PKEo1jfLSBCOLM42QE5VBD1u41MaVMRk31zhNhLiqTw,5035
46
46
  autogluon/core/models/dummy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
47
  autogluon/core/models/dummy/_dummy_quantile_regressor.py,sha256=i-ZW2flJ60jsMfMK24IP39Xwc55-UlBDvHmqanIf29Q,664
48
48
  autogluon/core/models/dummy/dummy_model.py,sha256=at2FZSM2_LuAQ78E2YrRCRt3UaKMyyOnc6p2rtZgA2w,1414
49
49
  autogluon/core/models/ensemble/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- autogluon/core/models/ensemble/bagged_ensemble_model.py,sha256=8GijtiLwFXugKWWIKY4ss_Xa_EGdASWtvJ2JUJu2avs,75887
50
+ autogluon/core/models/ensemble/bagged_ensemble_model.py,sha256=kQbJhq_UzUoOHsTX00WTEXu1Ogdme4bdLiiWhIMNUfU,77257
51
51
  autogluon/core/models/ensemble/fold_fitting_strategy.py,sha256=01vzNVvE4FIFgD6YqbhK63XoUlSztnVFsrDdsoqm75U,47021
52
52
  autogluon/core/models/ensemble/ray_parallel_fold_fitting_strategy.py,sha256=8RASa-eV6n9kUgbqQHNt7k4IrvuB9NdrunIMLYOLwgA,2068
53
- autogluon/core/models/ensemble/stacker_ensemble_model.py,sha256=DuDXgozvG9JYYkRvGACA7EXDAtj3Tz_uAjXTfxu5tFg,18041
53
+ autogluon/core/models/ensemble/stacker_ensemble_model.py,sha256=oGgn0oxu1jzygcCHKBvlMZLbKrDAIgcrOMXFbSTNTVM,18059
54
54
  autogluon/core/models/ensemble/weighted_ensemble_model.py,sha256=hELT3L7tDRYuN7Ghm_9zNH4zzG_g8vk0hINofu_ZqSE,4318
55
55
  autogluon/core/models/greedy_ensemble/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
56
  autogluon/core/models/greedy_ensemble/ensemble_selection.py,sha256=Rt5jkqIORaCFLiQlh-LVWKP5-eB6gxEnVNmKTB3RP58,10548
57
- autogluon/core/models/greedy_ensemble/greedy_weighted_ensemble_model.py,sha256=GaEfdK4rhfJ06h-LYZCqYshEdFJcCzPQgtYPKw-Jjc8,7023
57
+ autogluon/core/models/greedy_ensemble/greedy_weighted_ensemble_model.py,sha256=VgwuHhzmARE7iWZuCTg0cX2DQnEgLvhlLyWOBYDnpNE,7041
58
58
  autogluon/core/pseudolabeling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
59
  autogluon/core/pseudolabeling/pseudolabeling.py,sha256=vvOrY02Wvba3UGujYH3xqgI6yf2jRegzLiNfKrxSais,12138
60
60
  autogluon/core/ray/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -89,11 +89,11 @@ autogluon/core/utils/utils.py,sha256=FMa9kIUAxA3IIBbATmBnNEVObSAivehZ2_zCy3PRR-c
89
89
  autogluon/core/utils/version_utils.py,sha256=5-r8hLRKTaZbj5qo2uzE_2E4casH49Ye3WyeHlgHuz4,3252
90
90
  autogluon/core/utils/loaders/__init__.py,sha256=W5FAdQvpDcn_uisqJrlSAObWVta-YjJLKGN3NCbEgIo,109
91
91
  autogluon/core/utils/savers/__init__.py,sha256=bGWciSxAkj6u06vOC4pTvr22f_1ey0glgvmjCMEOm78,89
92
- autogluon.core-1.2.1b20250218.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
93
- autogluon.core-1.2.1b20250218.dist-info/METADATA,sha256=y94iLSyt3ozEWFUl_EpRXiYTiXu8E2UG2_aZbeai58c,12399
94
- autogluon.core-1.2.1b20250218.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
95
- autogluon.core-1.2.1b20250218.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
96
- autogluon.core-1.2.1b20250218.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
97
- autogluon.core-1.2.1b20250218.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
98
- autogluon.core-1.2.1b20250218.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
99
- autogluon.core-1.2.1b20250218.dist-info/RECORD,,
92
+ autogluon.core-1.2.1b20250220.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
93
+ autogluon.core-1.2.1b20250220.dist-info/METADATA,sha256=HgWuZIrv6P0SFTOBMIh6U_ialUBNYdhSnK-Q5eeTits,12399
94
+ autogluon.core-1.2.1b20250220.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
95
+ autogluon.core-1.2.1b20250220.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
96
+ autogluon.core-1.2.1b20250220.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
97
+ autogluon.core-1.2.1b20250220.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
98
+ autogluon.core-1.2.1b20250220.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
99
+ autogluon.core-1.2.1b20250220.dist-info/RECORD,,