Skip to content

Commit 00b8e6e

Browse files
authored
Fix: Implement hotfix from #1407, aimed at master (#1408)
* Fix: Implement hotfix from #1407, aimed at master * Add: Argument to ExecuteTaFuncWithQueue * Add: multi_objectives arg to tests * Fix: Two more locations of `multi_objectives`
1 parent 45d3ff8 commit 00b8e6e

File tree

6 files changed

+53
-3
lines changed

6 files changed

+53
-3
lines changed

autosklearn/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Version information."""
22

33
# The following line *must* be the last in the module, exactly as formatted:
4-
__version__ = "0.14.3"
4+
__version__ = "0.14.6"

autosklearn/automl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ def _do_dummy_prediction(self, datamanager: XYDataManager, num_run: int) -> int:
487487
ta = ExecuteTaFuncWithQueue(
488488
backend=self._backend,
489489
autosklearn_seed=self._seed,
490+
multi_objectives=["cost"],
490491
resampling_strategy=self._resampling_strategy,
491492
initial_num_run=num_run,
492493
stats=stats,
@@ -1347,6 +1348,7 @@ def fit_pipeline(
13471348
backend=self._backend,
13481349
autosklearn_seed=self._seed,
13491350
abort_on_first_run_crash=False,
1351+
multi_objectives=["cost"],
13501352
cost_for_crash=get_cost_of_crash(kwargs["metric"]),
13511353
port=self._logger_port,
13521354
**kwargs,

autosklearn/evaluation/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def __init__(
131131
abort_on_first_run_crash: bool,
132132
port: int,
133133
pynisher_context: str,
134+
multi_objectives: List[str],
134135
initial_num_run: int = 1,
135136
stats: Optional[Stats] = None,
136137
run_obj: str = "quality",
@@ -146,7 +147,6 @@ def __init__(
146147
ta: Optional[Callable] = None,
147148
**resampling_strategy_args: Any,
148149
):
149-
150150
if resampling_strategy == "holdout":
151151
eval_function = autosklearn.evaluation.train_evaluator.eval_holdout
152152
elif resampling_strategy == "holdout-iterative-fit":

autosklearn/util/single_thread_client.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import typing
2+
from typing import Any
23

34
from pathlib import Path
45

@@ -67,8 +68,24 @@ def submit(
6768
func: typing.Callable,
6869
*args: typing.List,
6970
priority: int = 0,
70-
**kwargs: typing.Dict,
71+
key: Any = None,
72+
workers: Any = None,
73+
resources: Any = None,
74+
retries: Any = None,
75+
fifo_timeout: Any = "100 ms",
76+
allow_other_workers: Any = False,
77+
actor: Any = False,
78+
actors: Any = False,
79+
pure: Any = None,
80+
**kwargs: Any,
7181
) -> typing.Any:
82+
"""
83+
Note
84+
----
85+
The keyword arguments caught in `dask.distributed.Client` need to
86+
be specified here so they don't get passed in as ``**kwargs`` to the
87+
``func``.
88+
"""
7289
return DummyFuture(func(*args, **kwargs))
7390

7491
def close(self) -> None:

doc/releases.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,26 @@
99
Releases
1010
========
1111

12+
Version 0.14.6
13+
==============
14+
15+
* HOTFIX #1407: Catches keyword arguments in `SingleThreadedClient` so they don't get passed to it's executing `func`.
16+
17+
Contributors v0.14.6
18+
********************
19+
* Eddie Bergman
20+
21+
22+
Version 0.14.5
23+
==============
24+
25+
* HOTFIX: Release PyPi package with ``automl_common`` included
26+
27+
Contributors v0.14.5
28+
********************
29+
* Eddie Bergman
30+
31+
1232
Version 0.14.3
1333
==============
1434

test/test_evaluation/test_evaluation.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def test_eval_with_limits_holdout(self, pynisher_mock):
9191
autosklearn_seed=1,
9292
port=self.logger_port,
9393
resampling_strategy="holdout",
94+
multi_objectives=["cost"],
9495
stats=self.stats,
9596
memory_limit=3072,
9697
metric=accuracy,
@@ -121,6 +122,7 @@ def test_zero_or_negative_cutoff(self, pynisher_mock):
121122
backend=self.backend,
122123
autosklearn_seed=1,
123124
port=self.logger_port,
125+
multi_objectives=["cost"],
124126
resampling_strategy="holdout",
125127
stats=self.stats,
126128
metric=accuracy,
@@ -150,6 +152,7 @@ def test_cutoff_lower_than_remaining_time(self, pynisher_mock):
150152
backend=self.backend,
151153
autosklearn_seed=1,
152154
port=self.logger_port,
155+
multi_objectives=["cost"],
153156
resampling_strategy="holdout",
154157
stats=self.stats,
155158
metric=accuracy,
@@ -181,6 +184,7 @@ def test_eval_with_limits_holdout_fail_silent(self, pynisher_mock):
181184
backend=self.backend,
182185
autosklearn_seed=1,
183186
port=self.logger_port,
187+
multi_objectives=["cost"],
184188
resampling_strategy="holdout",
185189
stats=self.stats,
186190
memory_limit=3072,
@@ -251,6 +255,7 @@ def test_eval_with_limits_holdout_fail_memory_error(self, pynisher_mock):
251255
backend=self.backend,
252256
autosklearn_seed=1,
253257
port=self.logger_port,
258+
multi_objectives=["cost"],
254259
resampling_strategy="holdout",
255260
stats=self.stats,
256261
memory_limit=3072,
@@ -292,6 +297,7 @@ def test_eval_with_limits_holdout_fail_timeout(self, pynisher_mock):
292297
backend=self.backend,
293298
autosklearn_seed=1,
294299
port=self.logger_port,
300+
multi_objectives=["cost"],
295301
resampling_strategy="holdout",
296302
stats=self.stats,
297303
memory_limit=3072,
@@ -341,6 +347,7 @@ def side_effect(**kwargs):
341347
backend=self.backend,
342348
autosklearn_seed=1,
343349
port=self.logger_port,
350+
multi_objectives=["cost"],
344351
resampling_strategy="holdout",
345352
stats=self.stats,
346353
memory_limit=3072,
@@ -376,6 +383,7 @@ def side_effect(**kwargs):
376383
backend=self.backend,
377384
autosklearn_seed=1,
378385
port=self.logger_port,
386+
multi_objectives=["cost"],
379387
resampling_strategy="holdout",
380388
stats=self.stats,
381389
memory_limit=3072,
@@ -419,6 +427,7 @@ def side_effect(*args, **kwargs):
419427
backend=self.backend,
420428
autosklearn_seed=1,
421429
port=self.logger_port,
430+
multi_objectives=["cost"],
422431
resampling_strategy="holdout",
423432
stats=self.stats,
424433
memory_limit=3072,
@@ -454,6 +463,7 @@ def test_exception_in_target_function(self, eval_holdout_mock):
454463
backend=self.backend,
455464
autosklearn_seed=1,
456465
port=self.logger_port,
466+
multi_objectives=["cost"],
457467
resampling_strategy="holdout",
458468
stats=self.stats,
459469
memory_limit=3072,
@@ -490,6 +500,7 @@ def test_silent_exception_in_target_function(self):
490500
port=self.logger_port,
491501
autosklearn_seed=1,
492502
resampling_strategy="holdout",
503+
multi_objectives=["cost"],
493504
stats=self.stats,
494505
memory_limit=3072,
495506
metric=accuracy,

0 commit comments

Comments
 (0)