Skip to content

Commit 293dd26

Browse files
committed
Fix TPOT test mode parameters and disable aeon telemetry
- Update `TPOTClassifierClass` to provide `skopt` compatible parameter spaces (using `Integer`) when both `test_mode` and `bayessearch` are enabled. This ensures tests running with Bayesian optimization do not fail due to incompatible parameter grid formats. - Set `AEON_TRACKING` environment variable to "False" in `global_params.py` to disable telemetry and prevent potential SSL errors in restricted environments.
1 parent 4d56b06 commit 293dd26

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

ml_grid/model_classes/tpot_classifier_class.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,16 @@ def __init__(
3535
self.parameter_space: Union[List[Dict[str, Any]], Dict[str, Any]]
3636

3737
if getattr(global_parameters, "test_mode", False):
38-
self.parameter_space = [
39-
{"generations": [2], "population_size": [5], "max_time_mins": [1]}
40-
]
38+
if global_parameters.bayessearch:
39+
self.parameter_space = {
40+
"generations": Integer(2, 5),
41+
"population_size": Integer(5, 10),
42+
"max_time_mins": Integer(1, 2),
43+
}
44+
else:
45+
self.parameter_space = [
46+
{"generations": [2], "population_size": [5], "max_time_mins": [1]}
47+
]
4148
elif global_parameters.bayessearch:
4249
# A slightly larger space for Bayesian search, but still constrained
4350
self.parameter_space = {

ml_grid/util/global_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
from typing import Any, Callable, Dict, List, Union
1111
import logging
1212

13+
# Disable aeon telemetry to prevent SSL errors in restricted environments
14+
os.environ["AEON_TRACKING"] = "False"
15+
1316

1417
# --- FIX for TensorFlow "libdevice not found" error ---
1518
# This error occurs when TensorFlow on GPU cannot locate the CUDA device libraries,

0 commit comments

Comments
 (0)