mirror of
https://github.com/microsoft/autogen.git
synced 2025-10-30 17:29:47 +00:00
Merge branch 'main' into dependabot/github_actions/actions/cache-3
This commit is contained in:
commit
efc33e0494
@ -3069,7 +3069,9 @@ class AutoML(BaseEstimator):
|
||||
if mlflow is not None and mlflow.active_run():
|
||||
with mlflow.start_run(nested=True):
|
||||
mlflow.log_metric("iter_counter", self._track_iter)
|
||||
if "intermediate_results" in search_state.metric_for_logging:
|
||||
if (search_state.metric_for_logging is not None) and (
|
||||
"intermediate_results" in search_state.metric_for_logging
|
||||
):
|
||||
for each_entry in search_state.metric_for_logging[
|
||||
"intermediate_results"
|
||||
]:
|
||||
@ -3079,7 +3081,8 @@ class AutoML(BaseEstimator):
|
||||
"iter_counter", self._iter_per_learner[estimator]
|
||||
)
|
||||
del search_state.metric_for_logging["intermediate_results"]
|
||||
mlflow.log_metrics(search_state.metric_for_logging)
|
||||
if search_state.metric_for_logging:
|
||||
mlflow.log_metrics(search_state.metric_for_logging)
|
||||
mlflow.log_metric("trial_time", search_state.trial_time)
|
||||
mlflow.log_metric("wall_clock_time", self._state.time_from_start)
|
||||
mlflow.log_metric("validation_loss", search_state.val_loss)
|
||||
|
||||
@ -1 +1 @@
|
||||
__version__ = "1.0.11"
|
||||
__version__ = "1.0.12"
|
||||
|
||||
@ -154,6 +154,19 @@ def test_mlflow():
|
||||
pass
|
||||
# subprocess.check_call([sys.executable, "-m", "pip", "uninstall", "mlflow"])
|
||||
|
||||
from sklearn.datasets import load_iris
|
||||
|
||||
with mlflow.start_run():
|
||||
automl = AutoML()
|
||||
automl_settings = {
|
||||
"time_budget": 2, # in seconds
|
||||
"metric": "accuracy",
|
||||
"task": "classification",
|
||||
"log_file_name": "iris.log",
|
||||
}
|
||||
X_train, y_train = load_iris(return_X_y=True)
|
||||
automl.fit(X_train=X_train, y_train=y_train, **automl_settings)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_automl(600)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user