autogluon.common 1.2.1b20250408__py3-none-any.whl → 1.2.1b20250410__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.
@@ -1,6 +1,7 @@
1
1
  from collections import defaultdict
2
2
  from typing import Any, Dict, Tuple
3
3
 
4
+ import numpy as np
4
5
  import pandas as pd
5
6
 
6
7
 
@@ -66,8 +67,45 @@ def convert_simulation_artifacts_to_tabular_predictions_dict(
66
67
  "label",
67
68
  ]:
68
69
  aggregated_ground_truth[task_name][fold][k] = zeroshot_metadata[k]
69
- for k in ["pred_proba_dict_val", "pred_proba_dict_test"]:
70
+ ordered_class_labels_transformed = aggregated_ground_truth[task_name][fold][
71
+ "ordered_class_labels_transformed"
72
+ ]
73
+ pred_proba_tuples = [
74
+ ("pred_proba_dict_val", "y_val", "y_val_idx"),
75
+ ("pred_proba_dict_test", "y_test", "y_test_idx"),
76
+ ]
77
+ for k, ground_truth_key, ground_truth_idx_key in pred_proba_tuples:
78
+ ground_truth_idx = zeroshot_metadata.get(ground_truth_idx_key, None)
79
+
80
+ if ground_truth_idx is not None:
81
+ ground_truth_np = zeroshot_metadata[ground_truth_key]
82
+ assert isinstance(ground_truth_np, np.ndarray)
83
+ assert isinstance(ground_truth_idx, np.ndarray)
84
+ # memory opt variant in np.ndarray format, convert to pandas
85
+ if len(ground_truth_np.shape) == 1:
86
+ ground_truth_pd = pd.Series(
87
+ data=ground_truth_np, index=ground_truth_idx, name=zeroshot_metadata["label"]
88
+ )
89
+ else:
90
+ ground_truth_pd = pd.DataFrame(
91
+ data=ground_truth_np, index=ground_truth_idx, columns=ordered_class_labels_transformed
92
+ )
93
+ aggregated_ground_truth[task_name][fold][ground_truth_key] = ground_truth_pd
94
+ ground_truth = aggregated_ground_truth[task_name][fold][ground_truth_key]
95
+ assert isinstance(ground_truth, (pd.Series, pd.DataFrame))
70
96
  for m, pred_proba in zeroshot_metadata[k].items():
97
+ if isinstance(pred_proba, np.ndarray):
98
+ if len(pred_proba.shape) == 1:
99
+ if ordered_class_labels_transformed is not None:
100
+ assert len(ordered_class_labels_transformed) == 2
101
+ series_name = ordered_class_labels_transformed[1]
102
+ else:
103
+ series_name = ground_truth.name
104
+ pred_proba = pd.Series(data=pred_proba, index=ground_truth.index, name=series_name)
105
+ else:
106
+ pred_proba = pd.DataFrame(
107
+ data=pred_proba, index=ground_truth.index, columns=ordered_class_labels_transformed
108
+ )
71
109
  if aggregated_ground_truth[task_name][fold]["problem_type"] == "binary":
72
110
  if isinstance(pred_proba, pd.DataFrame):
73
111
  assert len(pred_proba.columns) == 2
@@ -1,4 +1,4 @@
1
1
  """This is the autogluon version file."""
2
2
 
3
- __version__ = "1.2.1b20250408"
3
+ __version__ = "1.2.1b20250410"
4
4
  __lite__ = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autogluon.common
3
- Version: 1.2.1b20250408
3
+ Version: 1.2.1b20250410
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
@@ -42,10 +42,10 @@ Requires-Dist: boto3<2,>=1.10
42
42
  Requires-Dist: psutil<7.0.0,>=5.7.3
43
43
  Requires-Dist: tqdm<5,>=4.38
44
44
  Provides-Extra: tests
45
- Requires-Dist: types-requests; extra == "tests"
46
- Requires-Dist: pytest-mypy; extra == "tests"
47
- Requires-Dist: pytest; extra == "tests"
48
45
  Requires-Dist: types-setuptools; extra == "tests"
46
+ Requires-Dist: pytest; extra == "tests"
47
+ Requires-Dist: pytest-mypy; extra == "tests"
48
+ Requires-Dist: types-requests; extra == "tests"
49
49
 
50
50
 
51
51
 
@@ -1,8 +1,8 @@
1
- autogluon.common-1.2.1b20250408-py3.9-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
1
+ autogluon.common-1.2.1b20250410-py3.9-nspkg.pth,sha256=cQGwpuGPqg1GXscIwt-7PmME1OnSpD-7ixkikJ31WAY,554
2
2
  autogluon/common/__init__.py,sha256=Q0tQ4UOtUEhPpj83k_xzQ9bmtoTSvfg_3WgPi1QopJk,352
3
3
  autogluon/common/dataset.py,sha256=slfU8CxGFNJ86_2wKkT_zPMPr-iPB-sz7klz0YqJECo,1580
4
4
  autogluon/common/space.py,sha256=oRSG-uFmsLACT42mT2vRp3NSuV8MaQz6X4sYwcZruxs,5457
5
- autogluon/common/version.py,sha256=YwKPhYCwdedFf6pG5PNlsNlSvEoEC9bjsdHeSZCjLNY,91
5
+ autogluon/common/version.py,sha256=tJeST0EZCa1sWbuBSG5OURtJwcs6LfjpwjLa8Ns8AI4,91
6
6
  autogluon/common/features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  autogluon/common/features/feature_metadata.py,sha256=GDvZXyaNkDeuNv8omO4K7tkCPmMdpJzD5rH_hKtZD9E,25783
8
8
  autogluon/common/features/infer_types.py,sha256=MkfVDoY__0Rr__zsDSKszmvYMq5RQRmbNboTG_tm64o,6492
@@ -39,15 +39,15 @@ autogluon/common/utils/pandas_utils.py,sha256=sirUUQkKZsmMwmXWEUZJ1n3ZYFQWqwz4iu
39
39
  autogluon/common/utils/path_converter.py,sha256=OO0Jr5vhcqrEvZrNqem5tmgC6FZA3_O8sPylQUKUgKs,2441
40
40
  autogluon/common/utils/resource_utils.py,sha256=CmU8OsaXoreja43gMGRZCg8BiKQdHvDxWW0y7auZE2Q,8456
41
41
  autogluon/common/utils/s3_utils.py,sha256=Tj2VyUGUc7Vrx5KkCGKapvFQyaVvWpJNpjssfXg2Sl4,17142
42
- autogluon/common/utils/simulation_utils.py,sha256=iEZcRWzP8xLQ8racIfOGC5V_A0W_xNgxPkGuBfX6hh8,3573
42
+ autogluon/common/utils/simulation_utils.py,sha256=hzDv0W7uPloadyXRNiAwWGs8IYhdXqP724gkYRo_k6I,5880
43
43
  autogluon/common/utils/system_info.py,sha256=9BkFcdq1co0EMnZkk_AYdhxSEP3RqcU6uIp-iYx9bdc,4479
44
44
  autogluon/common/utils/try_import.py,sha256=dGNpTev0egEg-NsdPWYRO4dbjIvMwU0AN7Ky5miv0MI,6787
45
45
  autogluon/common/utils/utils.py,sha256=H0gjBbiFBPuhnlHpirN3nU7WehoTZCv-231tb1oIvMI,7971
46
- autogluon.common-1.2.1b20250408.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
47
- autogluon.common-1.2.1b20250408.dist-info/METADATA,sha256=Znt4xbrV4yiIr6a2SWs1I7IscNHLQ1Rd8k0LX5mTAWY,11658
48
- autogluon.common-1.2.1b20250408.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
49
- autogluon.common-1.2.1b20250408.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
50
- autogluon.common-1.2.1b20250408.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
51
- autogluon.common-1.2.1b20250408.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
52
- autogluon.common-1.2.1b20250408.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
53
- autogluon.common-1.2.1b20250408.dist-info/RECORD,,
46
+ autogluon.common-1.2.1b20250410.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
47
+ autogluon.common-1.2.1b20250410.dist-info/METADATA,sha256=RI1JnwN_cl-Anxd7LLnZbC36erX4Kc8hWQwIrqC9FIQ,11658
48
+ autogluon.common-1.2.1b20250410.dist-info/NOTICE,sha256=7nPQuj8Kp-uXsU0S5so3-2dNU5EctS5hDXvvzzehd7E,114
49
+ autogluon.common-1.2.1b20250410.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
50
+ autogluon.common-1.2.1b20250410.dist-info/namespace_packages.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
51
+ autogluon.common-1.2.1b20250410.dist-info/top_level.txt,sha256=giERA4R78OkJf2ijn5slgjURlhRPzfLr7waIcGkzYAo,10
52
+ autogluon.common-1.2.1b20250410.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
53
+ autogluon.common-1.2.1b20250410.dist-info/RECORD,,