Skip to content

Commit

Permalink
Update to latest dask to mitigate smoke test failures (#286)
Browse files Browse the repository at this point in the history
* Constrain client in unit tests

* Update to latest dask, and mitigate scatter flakiness.
  • Loading branch information
delucchi-cmu committed Apr 24, 2024
1 parent 7c65700 commit 1c230c2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions pyproject.toml
Expand Up @@ -15,8 +15,7 @@ classifiers = [
]
dynamic = ["version"]
dependencies = [
"dask<=2024.2.0",
"dask[distributed]",
"dask[complete]>=2024.3.0", # Includes dask expressions.
"deprecated",
"healpy",
"hipscat >= 0.2.9",
Expand Down
4 changes: 2 additions & 2 deletions src/hipscat_import/catalog/run_import.py
Expand Up @@ -23,7 +23,7 @@ def _map_pixels(args, client):
if args.resume_plan.is_mapping_done():
return

reader_future = client.scatter(args.file_reader)
reader_future = client.scatter(args.file_reader, hash=False)
futures = []
for key, file_path in args.resume_plan.map_files:
futures.append(
Expand All @@ -48,7 +48,7 @@ def _split_pixels(args, alignment_future, client):
if args.resume_plan.is_splitting_done():
return

reader_future = client.scatter(args.file_reader)
reader_future = client.scatter(args.file_reader, hash=False)
futures = []
for key, file_path in args.resume_plan.split_keys:
futures.append(
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Expand Up @@ -31,7 +31,7 @@ def dask_client(use_ray):

disable_dask_on_ray()
else:
client = Client()
client = Client(n_workers=1, threads_per_worker=1)
yield client
client.close()

Expand Down
2 changes: 1 addition & 1 deletion tests/hipscat_import/catalog/test_run_round_trip.py
Expand Up @@ -58,7 +58,7 @@ def test_import_source_table(
assert len(catalog.get_healpix_pixels()) == 14


@pytest.mark.dask(timeout=10)
@pytest.mark.dask
def test_import_mixed_schema_csv(
dask_client,
mixed_schema_csv_dir,
Expand Down
2 changes: 1 addition & 1 deletion tests/hipscat_import/conftest.py
Expand Up @@ -32,7 +32,7 @@ def test_long_running():
for item in items:
timeout = None
for mark in item.iter_markers(name="dask"):
timeout = 5
timeout = 10
if "timeout" in mark.kwargs:
timeout = int(mark.kwargs.get("timeout"))
if "skip_ray" in mark.kwargs and use_ray:
Expand Down

0 comments on commit 1c230c2

Please sign in to comment.