autogluon.core 1.2.1b20250220__tar.gz → 1.2.1b20250221__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.1b20250220 → autogluon.core-1.2.1b20250221}/PKG-INFO +1 -1
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/executors.py +3 -3
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/__init__.py +1 -1
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/abstract/abstract_model.py +115 -45
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/trainer/abstract_trainer.py +3 -3
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/version.py +1 -1
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon.core.egg-info/PKG-INFO +1 -1
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon.core.egg-info/requires.txt +4 -4
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/setup.cfg +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/setup.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/_setup_utils.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/augmentation/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/augmentation/distill_utils.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/calibrate/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/calibrate/_decision_threshold.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/calibrate/conformity_score.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/calibrate/temperature_scaling.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/callbacks/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/callbacks/_abstract_callback.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/callbacks/_early_stopping_callback.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/callbacks/_early_stopping_ensemble_callback.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/callbacks/_example_callback.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/constants.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/data/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/data/cleaner.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/data/label_cleaner.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/constants.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/exceptions.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/ray_hpo.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/ray_tune_constants.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/ray_tune_scheduler.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/ray_tune_scheduler_factory.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/ray_tune_searcher_factory.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/space_converter.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/learner/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/learner/abstract_learner.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/learning_curves/plot_curves.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/metrics/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/metrics/classification_metrics.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/metrics/quantile_metrics.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/metrics/score_func.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/metrics/softclass_metrics.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/_utils.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/abstract/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/abstract/_tags.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/abstract/abstract_nn_model.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/abstract/model_trial.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/dummy/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/dummy/_dummy_quantile_regressor.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/dummy/dummy_model.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/ensemble/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/ensemble/bagged_ensemble_model.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/ensemble/fold_fitting_strategy.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/ensemble/ray_parallel_fold_fitting_strategy.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/ensemble/stacker_ensemble_model.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/ensemble/weighted_ensemble_model.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/greedy_ensemble/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/greedy_ensemble/ensemble_selection.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/models/greedy_ensemble/greedy_weighted_ensemble_model.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/problem_type.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/pseudolabeling/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/pseudolabeling/pseudolabeling.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/ray/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/ray/distributed_jobs_managers.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/ray/resources_calculator.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/scheduler/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/scheduler/reporter.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/scheduler/scheduler_factory.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/scheduler/seq_scheduler.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/searcher/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/searcher/dummy_searcher.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/searcher/exceptions.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/searcher/local_grid_searcher.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/searcher/local_random_searcher.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/searcher/local_searcher.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/searcher/searcher_factory.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/stacked_overfitting/utils.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/trainer/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/trainer/utils.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/decorators.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/early_stopping.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/exceptions.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/feature_selection.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/files.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/infer_utils.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/loaders/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/miscs.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/plots.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/savers/__init__.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/time.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/utils.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/version_utils.py +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon.core.egg-info/SOURCES.txt +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon.core.egg-info/dependency_links.txt +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon.core.egg-info/namespace_packages.txt +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon.core.egg-info/top_level.txt +0 -0
- {autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon.core.egg-info/zip-safe +0 -0
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/executors.py
RENAMED
@@ -184,10 +184,10 @@ class HpoExecutor(ABC):
|
|
184
184
|
self.hyperparameter_tune_kwargs["resources_per_trial"] = {"num_cpus": cpu_per_trial, "num_gpus": gpu_per_trial}
|
185
185
|
if "resources_per_trial" not in self.hyperparameter_tune_kwargs:
|
186
186
|
# User didn't provide any requirements
|
187
|
-
num_jobs_in_parallel_with_mem = math.inf
|
188
187
|
|
189
|
-
|
190
|
-
|
188
|
+
num_jobs_in_parallel_with_mem = math.inf
|
189
|
+
model_estimate_memory_usage = initialized_model.estimate_memory_usage(**kwargs)
|
190
|
+
if model_estimate_memory_usage is not None:
|
191
191
|
total_memory_available = ResourceManager.get_available_virtual_mem()
|
192
192
|
num_jobs_in_parallel_with_mem = total_memory_available // model_estimate_memory_usage
|
193
193
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from .abstract.abstract_model import AbstractModel
|
1
|
+
from .abstract.abstract_model import ModelBase, AbstractModel, Tunable
|
2
2
|
from .dummy.dummy_model import DummyModel
|
3
3
|
from .ensemble.bagged_ensemble_model import BaggedEnsembleModel
|
4
4
|
from .ensemble.stacker_ensemble_model import StackerEnsembleModel
|
@@ -9,10 +9,12 @@ import os
|
|
9
9
|
import pickle
|
10
10
|
import sys
|
11
11
|
import time
|
12
|
+
from abc import ABC, abstractmethod
|
12
13
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
13
14
|
|
14
15
|
import numpy as np
|
15
16
|
import pandas as pd
|
17
|
+
from typing_extensions import Self
|
16
18
|
|
17
19
|
from autogluon.common.features.feature_metadata import FeatureMetadata
|
18
20
|
from autogluon.common.space import Space
|
@@ -51,7 +53,119 @@ dup_filter = DuplicateFilter()
|
|
51
53
|
logger.addFilter(dup_filter)
|
52
54
|
|
53
55
|
|
54
|
-
class
|
56
|
+
class Taggable(ABC):
|
57
|
+
@classmethod
|
58
|
+
def _class_tags(cls) -> dict:
|
59
|
+
return _DEFAULT_CLASS_TAGS
|
60
|
+
|
61
|
+
def _more_tags(self) -> dict:
|
62
|
+
return _DEFAULT_TAGS
|
63
|
+
|
64
|
+
def _get_tags(self) -> dict:
|
65
|
+
"""
|
66
|
+
Tags are key-value pairs assigned to an object.
|
67
|
+
These can be accessed after initializing an object.
|
68
|
+
Tags are used for identifying if an object supports certain functionality.
|
69
|
+
"""
|
70
|
+
# first get class tags, which are overwritten by any object tags
|
71
|
+
collected_tags = self._get_class_tags()
|
72
|
+
for base_class in reversed(inspect.getmro(self.__class__)):
|
73
|
+
if hasattr(base_class, "_more_tags"):
|
74
|
+
# need the if because mixins might not have _more_tags
|
75
|
+
# but might do redundant work in estimators
|
76
|
+
# (i.e. calling more tags on BaseEstimator multiple times)
|
77
|
+
more_tags = base_class._more_tags(self)
|
78
|
+
collected_tags.update(more_tags)
|
79
|
+
return collected_tags
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def _get_class_tags(cls) -> dict:
|
83
|
+
"""
|
84
|
+
Class tags are tags assigned to a class that are fixed.
|
85
|
+
These can be accessed prior to initializing an object.
|
86
|
+
Tags are used for identifying if an object supports certain functionality.
|
87
|
+
"""
|
88
|
+
collected_tags = {}
|
89
|
+
for base_class in reversed(inspect.getmro(cls)):
|
90
|
+
if hasattr(base_class, "_class_tags"):
|
91
|
+
# need the if because mixins might not have _class_tags
|
92
|
+
# but might do redundant work in estimators
|
93
|
+
# (i.e. calling more tags on BaseEstimator multiple times)
|
94
|
+
more_tags = base_class._class_tags()
|
95
|
+
collected_tags.update(more_tags)
|
96
|
+
return collected_tags
|
97
|
+
|
98
|
+
|
99
|
+
# TODO: refactor this class as a clean interface HPO works with. The methods below are not
|
100
|
+
# an exhaustive set of all methods the HPO module needs!
|
101
|
+
class Tunable(ABC):
|
102
|
+
def estimate_memory_usage(self, *args, **kwargs) -> float | None:
|
103
|
+
"""Return the estimated memory usage of the model. None if memory usage cannot be
|
104
|
+
estimated.
|
105
|
+
"""
|
106
|
+
return None
|
107
|
+
|
108
|
+
def get_minimum_resources(self, is_gpu_available: bool = False) -> Dict[str, Union[int, float]]:
|
109
|
+
return {
|
110
|
+
"num_cpus": 1,
|
111
|
+
}
|
112
|
+
|
113
|
+
# TODO: remove. this is needed by hpo to determine if the model is an ensemble.
|
114
|
+
@abstractmethod
|
115
|
+
def _get_model_base(self) -> "Tunable":
|
116
|
+
pass
|
117
|
+
|
118
|
+
@abstractmethod
|
119
|
+
def get_params(self) -> dict:
|
120
|
+
"""Return a clean copy of constructor parameters that can be used to
|
121
|
+
clone the current model.
|
122
|
+
"""
|
123
|
+
pass
|
124
|
+
|
125
|
+
@abstractmethod
|
126
|
+
def hyperparameter_tune(self, *args, **kwargs) -> tuple:
|
127
|
+
pass
|
128
|
+
|
129
|
+
|
130
|
+
class ModelBase(Taggable, Tunable, ABC):
|
131
|
+
@abstractmethod
|
132
|
+
def __init__(
|
133
|
+
self,
|
134
|
+
path: str | None = None,
|
135
|
+
name: str | None = None,
|
136
|
+
hyperparameters: dict[str, Any] | None = None,
|
137
|
+
):
|
138
|
+
self.name: str
|
139
|
+
self.path: str
|
140
|
+
|
141
|
+
@abstractmethod
|
142
|
+
def rename(self, name: str) -> None:
|
143
|
+
pass
|
144
|
+
|
145
|
+
@abstractmethod
|
146
|
+
def get_info(self, *args, **kwargs) -> dict[str, Any]:
|
147
|
+
pass
|
148
|
+
|
149
|
+
@abstractmethod
|
150
|
+
def fit(self, *args, **kwargs) -> Self:
|
151
|
+
pass
|
152
|
+
|
153
|
+
@abstractmethod
|
154
|
+
def predict(self, *args, **kwargs) -> Any:
|
155
|
+
pass
|
156
|
+
|
157
|
+
@abstractmethod
|
158
|
+
def save(self, path: str | None = None, verbose: bool = True) -> str:
|
159
|
+
pass
|
160
|
+
|
161
|
+
@classmethod
|
162
|
+
@abstractmethod
|
163
|
+
def load(cls, path: str, reset_paths: bool = True) -> Self:
|
164
|
+
pass
|
165
|
+
|
166
|
+
|
167
|
+
# TODO: move to tabular, rename AbstractTabularModel
|
168
|
+
class AbstractModel(ModelBase):
|
55
169
|
"""
|
56
170
|
Abstract model implementation from which all AutoGluon models inherit.
|
57
171
|
|
@@ -2488,50 +2602,6 @@ class AbstractModel:
|
|
2488
2602
|
def _features(self) -> List[str]:
|
2489
2603
|
return self._features_internal
|
2490
2604
|
|
2491
|
-
def _get_tags(self) -> dict:
|
2492
|
-
"""
|
2493
|
-
Tags are key-value pairs assigned to an object.
|
2494
|
-
These can be accessed after initializing an object.
|
2495
|
-
Tags are used for identifying if an object supports certain functionality.
|
2496
|
-
"""
|
2497
|
-
# first get class tags, which are overwritten by any object tags
|
2498
|
-
collected_tags = self._get_class_tags()
|
2499
|
-
for base_class in reversed(inspect.getmro(self.__class__)):
|
2500
|
-
if hasattr(base_class, "_more_tags"):
|
2501
|
-
# need the if because mixins might not have _more_tags
|
2502
|
-
# but might do redundant work in estimators
|
2503
|
-
# (i.e. calling more tags on BaseEstimator multiple times)
|
2504
|
-
more_tags = base_class._more_tags(self)
|
2505
|
-
collected_tags.update(more_tags)
|
2506
|
-
return collected_tags
|
2507
|
-
|
2508
|
-
@classmethod
|
2509
|
-
def _get_class_tags(cls) -> dict:
|
2510
|
-
"""
|
2511
|
-
Class tags are tags assigned to a class that are fixed.
|
2512
|
-
These can be accessed prior to initializing an object.
|
2513
|
-
Tags are used for identifying if an object supports certain functionality.
|
2514
|
-
"""
|
2515
|
-
collected_tags = {}
|
2516
|
-
for base_class in reversed(inspect.getmro(cls)):
|
2517
|
-
if hasattr(base_class, "_class_tags"):
|
2518
|
-
# need the if because mixins might not have _class_tags
|
2519
|
-
# but might do redundant work in estimators
|
2520
|
-
# (i.e. calling more tags on BaseEstimator multiple times)
|
2521
|
-
more_tags = base_class._class_tags()
|
2522
|
-
collected_tags.update(more_tags)
|
2523
|
-
return collected_tags
|
2524
|
-
|
2525
|
-
@classmethod
|
2526
|
-
def _class_tags(cls) -> dict:
|
2527
|
-
"""
|
2528
|
-
[Advanced] Optional tags used to communicate model capabilities to AutoML systems, such as if the model supports text features.
|
2529
|
-
"""
|
2530
|
-
return _DEFAULT_CLASS_TAGS
|
2531
|
-
|
2532
|
-
def _more_tags(self) -> dict:
|
2533
|
-
return _DEFAULT_TAGS
|
2534
|
-
|
2535
2605
|
def _get_model_base(self):
|
2536
2606
|
return self
|
2537
2607
|
|
@@ -6,11 +6,11 @@ from typing import Any, Generic, Type, TypeVar
|
|
6
6
|
import networkx as nx
|
7
7
|
from typing_extensions import Self
|
8
8
|
|
9
|
-
from autogluon.core.models import
|
9
|
+
from autogluon.core.models import ModelBase
|
10
10
|
from autogluon.core.utils.loaders import load_pkl
|
11
11
|
from autogluon.core.utils.savers import save_json, save_pkl
|
12
12
|
|
13
|
-
ModelTypeT = TypeVar("ModelTypeT", bound=
|
13
|
+
ModelTypeT = TypeVar("ModelTypeT", bound=ModelBase)
|
14
14
|
|
15
15
|
|
16
16
|
class AbstractTrainer(Generic[ModelTypeT]):
|
@@ -132,7 +132,7 @@ class AbstractTrainer(Generic[ModelTypeT]):
|
|
132
132
|
def load_model(
|
133
133
|
self, model_name: str | ModelTypeT, path: str | None = None, model_type: Type[ModelTypeT] | None = None
|
134
134
|
) -> ModelTypeT:
|
135
|
-
if isinstance(model_name,
|
135
|
+
if isinstance(model_name, ModelBase):
|
136
136
|
return model_name
|
137
137
|
if model_name in self.models.keys():
|
138
138
|
return self.models[model_name]
|
@@ -7,13 +7,13 @@ 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.1b20250221
|
11
11
|
|
12
12
|
[all]
|
13
|
-
ray[default,tune]<2.43,>=2.10.0
|
14
13
|
ray[default]<2.43,>=2.10.0
|
15
14
|
pyarrow>=15.0.0
|
16
15
|
hyperopt<0.2.8,>=0.2.7
|
16
|
+
ray[default,tune]<2.43,>=2.10.0
|
17
17
|
|
18
18
|
[ray]
|
19
19
|
ray[default]<2.43,>=2.10.0
|
@@ -24,8 +24,8 @@ ray[default,tune]<2.43,>=2.10.0
|
|
24
24
|
hyperopt<0.2.8,>=0.2.7
|
25
25
|
|
26
26
|
[tests]
|
27
|
-
pytest-mypy
|
28
27
|
types-setuptools
|
29
|
-
|
28
|
+
pytest-mypy
|
30
29
|
types-requests
|
31
30
|
pytest
|
31
|
+
flake8
|
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/__init__.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/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.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/constants.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/data/__init__.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/data/cleaner.py
RENAMED
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/__init__.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/constants.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/hpo/exceptions.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/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
|
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/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
|
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/problem_type.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/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
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/trainer/utils.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/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.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/files.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/miscs.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/plots.py
RENAMED
File without changes
|
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon/core/utils/time.py
RENAMED
File without changes
|
{autogluon.core-1.2.1b20250220 → autogluon.core-1.2.1b20250221}/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.1b20250220 → autogluon.core-1.2.1b20250221}/src/autogluon.core.egg-info/zip-safe
RENAMED
File without changes
|