DaskEngine: Repeated Use with Context Manager
- Ngôn ngữ chính
- Python
- Star
- 850
- Fork
- 96
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Per #2667 , it was noted that a DaskEngine can't be used in a context manager as the manager will shutdown the associated cluster. We should probably modify the `__enter__()` function to restart the cluster if it's shutdown.
```
def test_automl_dask_called_twice(
X_y_binary_cls,
):
"""Making sure that the max_iterations parameter limits the number of pipelines run."""
X, y = X_y_binary_cls
max_iterations = 4
engine = DaskEngine()
with engine:
par_automl = AutoMLSearch(
X_train=X,
y_train=y,
problem_type="binary",
engine=engine,
max_iterations=max_iterations,
)
par_automl.search()
with engine:
par_automl = AutoMLSearch(
X_train=X,
y_train=y,
problem_type="binary",
engine=engine,
max_iterations=max_iterations,
)
par_automl.search()
```
The above code snippet should be modified into a test that passes.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.