Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Make sure that the "hyperopt" directory in the local repository path is deleted after test run is completed #3736

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions tests/integration_tests/test_automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@

ray = pytest.importorskip("ray")

import dask.dataframe as dd # noqa
from ray.tune.experiment.trial import Trial # noqa
import dask.dataframe as dd # noqa E402
from ray.tune.experiment.trial import Trial # noqa E402

from ludwig.automl import auto_train, create_auto_config, train_with_config # noqa
from ludwig.hyperopt.execution import RayTuneExecutor # noqa
from ludwig.automl import auto_train, create_auto_config, train_with_config # noqa E402
from ludwig.automl.automl import OUTPUT_DIR # noqa E402
from ludwig.hyperopt.execution import RayTuneExecutor # noqa E402

pytestmark = [pytest.mark.distributed, pytest.mark.integration_tests_c]

Expand Down Expand Up @@ -290,10 +291,12 @@ def test_train_with_config(time_budget, test_data_tabular_large, ray_cluster_2cp
@pytest.mark.distributed
def test_auto_train(test_data_tabular_large, ray_cluster_2cpu, tmpdir):
_, ofeatures, dataset_csv = test_data_tabular_large
local_output_directory_path: str = f"{str(tmpdir)}/{OUTPUT_DIR}"
results = auto_train(
dataset=dataset_csv,
target=ofeatures[0][NAME],
time_limit_s=120,
output_directory=local_output_directory_path,
user_config={"hyperopt": {"executor": {"num_samples": 2}}},
)

Expand Down
Loading