autogluon.core 1.2.1b20250109__tar.gz → 1.2.1b20250110__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.
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/PKG-INFO +2 -2
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/setup.py +2 -2
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/metrics/__init__.py +42 -8
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/metrics/classification_metrics.py +7 -1
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/abstract/abstract_model.py +1 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/ensemble/bagged_ensemble_model.py +1 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/version.py +1 -1
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon.core.egg-info/PKG-INFO +2 -2
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon.core.egg-info/requires.txt +8 -8
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/setup.cfg +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/_setup_utils.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/augmentation/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/augmentation/distill_utils.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/calibrate/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/calibrate/_decision_threshold.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/calibrate/conformity_score.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/calibrate/temperature_scaling.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/callbacks/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/callbacks/_abstract_callback.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/callbacks/_early_stopping_callback.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/callbacks/_early_stopping_ensemble_callback.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/callbacks/_example_callback.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/constants.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/data/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/data/cleaner.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/data/label_cleaner.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/constants.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/exceptions.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/executors.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/ray_hpo.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/ray_tune_constants.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/ray_tune_scheduler.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/ray_tune_scheduler_factory.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/ray_tune_searcher_factory.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/space_converter.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/learner/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/learner/abstract_learner.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/learning_curves/plot_curves.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/metrics/quantile_metrics.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/metrics/score_func.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/metrics/softclass_metrics.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/_utils.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/abstract/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/abstract/_tags.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/abstract/abstract_nn_model.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/abstract/model_trial.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/dummy/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/dummy/_dummy_quantile_regressor.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/dummy/dummy_model.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/ensemble/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/ensemble/fold_fitting_strategy.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/ensemble/ray_parallel_fold_fitting_strategy.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/ensemble/stacker_ensemble_model.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/ensemble/weighted_ensemble_model.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/greedy_ensemble/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/greedy_ensemble/ensemble_selection.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/greedy_ensemble/greedy_weighted_ensemble_model.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/problem_type.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/pseudolabeling/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/pseudolabeling/pseudolabeling.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/ray/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/ray/distributed_jobs_managers.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/ray/resources_calculator.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/scheduler/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/scheduler/reporter.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/scheduler/scheduler_factory.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/scheduler/seq_scheduler.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/searcher/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/searcher/dummy_searcher.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/searcher/exceptions.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/searcher/local_grid_searcher.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/searcher/local_random_searcher.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/searcher/local_searcher.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/searcher/searcher_factory.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/stacked_overfitting/utils.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/trainer/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/trainer/abstract_trainer.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/trainer/utils.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/decorators.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/early_stopping.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/exceptions.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/feature_selection.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/files.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/infer_utils.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/loaders/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/miscs.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/plots.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/savers/__init__.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/time.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/utils.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/version_utils.py +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon.core.egg-info/SOURCES.txt +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon.core.egg-info/dependency_links.txt +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon.core.egg-info/namespace_packages.txt +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon.core.egg-info/top_level.txt +0 -0
- {autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon.core.egg-info/zip-safe +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: autogluon.core
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.1b20250110
|
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
|
@@ -21,7 +21,7 @@ Description:
|
|
21
21
|
[](https://pypi.org/project/autogluon/)
|
22
22
|
[](https://pepy.tech/project/autogluon)
|
23
23
|
[](./LICENSE)
|
24
|
-
[](https://discord.gg/wjUmjqAc2N)
|
25
25
|
[](https://twitter.com/autogluon)
|
26
26
|
[](https://github.com/autogluon/autogluon/actions/workflows/continuous_integration.yml)
|
27
27
|
[](https://github.com/autogluon/autogluon/actions/workflows/platform_tests-command.yml)
|
@@ -48,11 +48,11 @@ install_requires = (
|
|
48
48
|
|
49
49
|
extras_require = {
|
50
50
|
"ray": [
|
51
|
-
"ray[default]>=2.10.0,<2.
|
51
|
+
"ray[default]>=2.10.0,<2.41", # sync with common/src/autogluon/common/utils/try_import.py
|
52
52
|
],
|
53
53
|
"raytune": [
|
54
54
|
"pyarrow>=15.0.0", # cap Pyarrow to fix source installation - https://github.com/autogluon/autogluon/issues/4519
|
55
|
-
"ray[default,tune]>=2.10.0,<2.
|
55
|
+
"ray[default,tune]>=2.10.0,<2.41", # sync with common/src/autogluon/common/utils/try_import.py
|
56
56
|
# TODO: consider alternatives as hyperopt is not actively maintained.
|
57
57
|
"hyperopt>=0.2.7,<0.2.8", # This is needed for the bayes search to work.
|
58
58
|
# 'GPy>=1.10.0,<1.11.0' # TODO: Enable this once PBT/PB2 are supported by ray lightning
|
@@ -47,9 +47,22 @@ class Scorer(object, metaclass=ABCMeta):
|
|
47
47
|
kwargs : dict, optional
|
48
48
|
kwargs to pass to score_func when called.
|
49
49
|
For example, kwargs = {"beta": 2} when using sklearn.metrics.fbeta_score where beta is a required argument.
|
50
|
+
needs_pos_label : bool, default = False
|
51
|
+
If True, indicates that the metric requires a positive label specified via the `pos_label` argument.
|
52
|
+
Example metrics that require `pos_label`: ["f1", "precision", "recall"]
|
53
|
+
Currently this is used for unit testing purposes and does not impact the Scorer object.
|
50
54
|
"""
|
51
55
|
|
52
|
-
def __init__(
|
56
|
+
def __init__(
|
57
|
+
self,
|
58
|
+
name: str,
|
59
|
+
score_func: callable,
|
60
|
+
optimum: float,
|
61
|
+
sign: int,
|
62
|
+
kwargs: dict = None,
|
63
|
+
*,
|
64
|
+
needs_pos_label: bool = False,
|
65
|
+
):
|
53
66
|
self.name = name
|
54
67
|
if kwargs is None:
|
55
68
|
kwargs = dict()
|
@@ -59,6 +72,7 @@ class Scorer(object, metaclass=ABCMeta):
|
|
59
72
|
if sign != 1 and sign != -1:
|
60
73
|
raise ValueError(f"sign must be one of [1, -1], but was instead {sign}")
|
61
74
|
self._sign = sign
|
75
|
+
self._needs_pos_label = needs_pos_label
|
62
76
|
self.alias = set()
|
63
77
|
|
64
78
|
def __call__(self, y_true, y_pred, sample_weight=None, **kwargs) -> float:
|
@@ -208,6 +222,15 @@ class Scorer(object, metaclass=ABCMeta):
|
|
208
222
|
"""If True, metric requires quantile predictions rather than predictions or prediction probabilities"""
|
209
223
|
raise NotImplementedError
|
210
224
|
|
225
|
+
@property
|
226
|
+
def needs_pos_label(self) -> bool:
|
227
|
+
"""
|
228
|
+
If True, metric requires pos_label to be specified. For most metrics, pos_label defaults to 1.
|
229
|
+
If unspecified and the user passes string values or values other than 0 and 1,
|
230
|
+
this can lead to exceptions or incorrect output.
|
231
|
+
"""
|
232
|
+
return self._needs_pos_label
|
233
|
+
|
211
234
|
score = __call__
|
212
235
|
|
213
236
|
|
@@ -419,6 +442,7 @@ def make_scorer(
|
|
419
442
|
needs_class: bool = False,
|
420
443
|
needs_threshold: bool = False,
|
421
444
|
needs_quantile: bool = False,
|
445
|
+
needs_pos_label: bool = False,
|
422
446
|
metric_kwargs: dict = None,
|
423
447
|
**kwargs,
|
424
448
|
) -> Scorer:
|
@@ -474,6 +498,12 @@ def make_scorer(
|
|
474
498
|
This only works for quantile regression.
|
475
499
|
Examples: ["pinball_loss"]
|
476
500
|
|
501
|
+
needs_pos_label : bool, default=False
|
502
|
+
Whether score_func supports a pos_label argument.
|
503
|
+
For binary classification, input y_true and y_pred must contain the pos_label in order for the metric to be correctly calculated.
|
504
|
+
This only works for binary classification.
|
505
|
+
Examples: ["f1", "precision", "recall"]
|
506
|
+
|
477
507
|
metric_kwargs : dict
|
478
508
|
Additional parameters to be passed to score_func, merged with kwargs if both are present.
|
479
509
|
metric_kwargs keys will override kwargs keys if keys are shared between them.
|
@@ -520,6 +550,7 @@ def make_scorer(
|
|
520
550
|
optimum=optimum,
|
521
551
|
sign=sign,
|
522
552
|
kwargs=kwargs,
|
553
|
+
needs_pos_label=needs_pos_label,
|
523
554
|
)
|
524
555
|
|
525
556
|
if isinstance(needs_pred, bool) and needs_pred != scorer.needs_pred:
|
@@ -590,15 +621,17 @@ accuracy = make_scorer("accuracy", sklearn.metrics.accuracy_score, needs_class=T
|
|
590
621
|
accuracy.add_alias("acc")
|
591
622
|
|
592
623
|
balanced_accuracy = make_scorer("balanced_accuracy", classification_metrics.balanced_accuracy, needs_class=True)
|
593
|
-
f1 = make_scorer("f1", sklearn.metrics.f1_score, needs_class=True)
|
594
624
|
mcc = make_scorer("mcc", sklearn.metrics.matthews_corrcoef, needs_class=True)
|
595
625
|
|
596
626
|
# Score functions that need decision values
|
597
627
|
roc_auc = make_scorer("roc_auc", classification_metrics.customized_binary_roc_auc_score, greater_is_better=True, needs_threshold=True)
|
598
628
|
|
599
629
|
average_precision = make_scorer("average_precision", sklearn.metrics.average_precision_score, needs_threshold=True)
|
600
|
-
|
601
|
-
|
630
|
+
|
631
|
+
# Score functions that need pos_label
|
632
|
+
f1 = make_scorer("f1", sklearn.metrics.f1_score, needs_class=True, needs_pos_label=True)
|
633
|
+
precision = make_scorer("precision", sklearn.metrics.precision_score, needs_class=True, needs_pos_label=True)
|
634
|
+
recall = make_scorer("recall", sklearn.metrics.recall_score, needs_class=True, needs_pos_label=True)
|
602
635
|
|
603
636
|
# Register other metrics
|
604
637
|
quadratic_kappa = make_scorer("quadratic_kappa", classification_metrics.quadratic_kappa, needs_class=True)
|
@@ -692,7 +725,6 @@ for scorer in [
|
|
692
725
|
|
693
726
|
|
694
727
|
for _name, _metric in [("precision", sklearn.metrics.precision_score), ("recall", sklearn.metrics.recall_score), ("f1", sklearn.metrics.f1_score)]:
|
695
|
-
globals()[_name] = make_scorer(_name, _metric, needs_class=True)
|
696
728
|
_add_scorer_to_metric_dict(metric_dict=BINARY_METRICS, scorer=globals()[_name])
|
697
729
|
for average in ["macro", "micro", "weighted"]:
|
698
730
|
qualified_name = "{0}_{1}".format(_name, average)
|
@@ -720,7 +752,7 @@ for _name, _metric, _kwargs in [
|
|
720
752
|
_add_scorer_to_metric_dict(metric_dict=MULTICLASS_METRICS, scorer=globals()[qualified_name])
|
721
753
|
|
722
754
|
|
723
|
-
METRICS = {
|
755
|
+
METRICS: dict[str, dict[str, Scorer]] = {
|
724
756
|
BINARY: BINARY_METRICS,
|
725
757
|
MULTICLASS: MULTICLASS_METRICS,
|
726
758
|
REGRESSION: REGRESSION_METRICS,
|
@@ -736,14 +768,16 @@ def _get_valid_metric_problem_types(metric: str):
|
|
736
768
|
return problem_types_valid
|
737
769
|
|
738
770
|
|
739
|
-
def get_metric(metric, problem_type=None, metric_type=None) -> Scorer:
|
771
|
+
def get_metric(metric, problem_type: str = None, metric_type: str = None) -> Scorer:
|
740
772
|
"""Returns metric function by using its name if the metric is str.
|
741
773
|
Performs basic check for metric compatibility with given problem type."""
|
774
|
+
if metric_type is None:
|
775
|
+
metric_type = "metric"
|
742
776
|
|
743
777
|
if metric is not None and isinstance(metric, str):
|
744
778
|
if metric == "soft_log_loss":
|
745
779
|
if problem_type == QUANTILE:
|
746
|
-
raise ValueError(f"{metric_type}={metric} can not be used for quantile problems")
|
780
|
+
raise ValueError(f"{metric_type}='{metric}' can not be used for quantile problems")
|
747
781
|
from .softclass_metrics import soft_log_loss
|
748
782
|
|
749
783
|
return soft_log_loss
|
@@ -25,7 +25,13 @@ def balanced_accuracy(solution, prediction):
|
|
25
25
|
|
26
26
|
if y_type == "binary":
|
27
27
|
# Do not transform into any multiclass representation
|
28
|
-
|
28
|
+
unique_sol = np.unique(solution)
|
29
|
+
unique_pred = np.unique(prediction)
|
30
|
+
classes = np.unique(np.concatenate((unique_sol, unique_pred)))
|
31
|
+
if set(classes) != {0, 1}:
|
32
|
+
pos_class = classes[-1]
|
33
|
+
solution = np.array([1 if i == pos_class else 0 for i in solution])
|
34
|
+
prediction = np.array([1 if i == pos_class else 0 for i in prediction])
|
29
35
|
|
30
36
|
elif y_type == "multiclass":
|
31
37
|
n = len(solution)
|
@@ -1793,6 +1793,7 @@ class AbstractModel:
|
|
1793
1793
|
fit_kwargs["num_classes"] = self.num_classes
|
1794
1794
|
fit_kwargs["sample_weight"] = kwargs.get("sample_weight", None)
|
1795
1795
|
fit_kwargs["sample_weight_val"] = kwargs.get("sample_weight_val", None)
|
1796
|
+
fit_kwargs["verbosity"] = kwargs.get("verbosity", 2)
|
1796
1797
|
train_fn_kwargs = dict(
|
1797
1798
|
model_cls=model_cls,
|
1798
1799
|
init_params=init_params,
|
@@ -1428,6 +1428,7 @@ class BaggedEnsembleModel(AbstractModel):
|
|
1428
1428
|
fit_kwargs["num_classes"] = self.num_classes
|
1429
1429
|
fit_kwargs["sample_weight"] = kwargs.get("sample_weight", None)
|
1430
1430
|
fit_kwargs["sample_weight_val"] = kwargs.get("sample_weight_val", None)
|
1431
|
+
fit_kwargs["verbosity"] = kwargs.get("verbosity", 2)
|
1431
1432
|
fit_kwargs.pop("time_limit", None) # time_limit already set in hpo_executor
|
1432
1433
|
train_fn_kwargs = dict(
|
1433
1434
|
model_cls=model_cls,
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon.core.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: autogluon.core
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.1b20250110
|
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
|
@@ -21,7 +21,7 @@ Description:
|
|
21
21
|
[](https://pypi.org/project/autogluon/)
|
22
22
|
[](https://pepy.tech/project/autogluon)
|
23
23
|
[](./LICENSE)
|
24
|
-
[](https://discord.gg/wjUmjqAc2N)
|
25
25
|
[](https://twitter.com/autogluon)
|
26
26
|
[](https://github.com/autogluon/autogluon/actions/workflows/continuous_integration.yml)
|
27
27
|
[](https://github.com/autogluon/autogluon/actions/workflows/platform_tests-command.yml)
|
@@ -7,25 +7,25 @@ tqdm<5,>=4.38
|
|
7
7
|
requests
|
8
8
|
matplotlib<3.11,>=3.7.0
|
9
9
|
boto3<2,>=1.10
|
10
|
-
autogluon.common==1.2.
|
10
|
+
autogluon.common==1.2.1b20250110
|
11
11
|
|
12
12
|
[all]
|
13
|
-
|
14
|
-
ray[default
|
13
|
+
ray[default,tune]<2.41,>=2.10.0
|
14
|
+
ray[default]<2.41,>=2.10.0
|
15
15
|
pyarrow>=15.0.0
|
16
|
-
|
16
|
+
hyperopt<0.2.8,>=0.2.7
|
17
17
|
|
18
18
|
[ray]
|
19
|
-
ray[default]<2.
|
19
|
+
ray[default]<2.41,>=2.10.0
|
20
20
|
|
21
21
|
[raytune]
|
22
22
|
pyarrow>=15.0.0
|
23
|
-
ray[default,tune]<2.
|
23
|
+
ray[default,tune]<2.41,>=2.10.0
|
24
24
|
hyperopt<0.2.8,>=0.2.7
|
25
25
|
|
26
26
|
[tests]
|
27
|
-
pytest
|
28
|
-
flake8
|
29
27
|
types-setuptools
|
30
28
|
pytest-mypy
|
29
|
+
flake8
|
30
|
+
pytest
|
31
31
|
types-requests
|
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/__init__.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/_setup_utils.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/constants.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/data/__init__.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/data/cleaner.py
RENAMED
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/__init__.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/constants.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/exceptions.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/executors.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/hpo/ray_hpo.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/models/_utils.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/problem_type.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/ray/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/trainer/utils.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/files.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/miscs.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/plots.py
RENAMED
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/time.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon/core/utils/utils.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250109 → autogluon.core-1.2.1b20250110}/src/autogluon.core.egg-info/zip-safe
RENAMED
File without changes
|