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

[WIP] Test CI issues #1626

Merged
merged 9 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
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
13 changes: 0 additions & 13 deletions python/raft-dask/raft_dask/test/__init__.py

This file was deleted.

28 changes: 25 additions & 3 deletions python/raft-dask/raft_dask/test/test_comms.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@

import pytest

from dask.distributed import get_worker, wait

from .conftest import create_client
from dask.distributed import Client, get_worker, wait
from dask_cuda import LocalCUDACluster

try:
from raft_dask.common import (
Expand All @@ -44,6 +43,29 @@
pytestmark = pytest.mark.skip


def create_client(cluster):
"""
Create a Dask distributed client for a specified cluster.

Parameters
----------
cluster : LocalCUDACluster instance or str
If a LocalCUDACluster instance is provided, a client will be created
for it directly. If a string is provided, it should specify the path to
a Dask scheduler file. A client will then be created for the cluster
referenced by this scheduler file.

Returns
-------
dask.distributed.Client
A client connected to the specified cluster.
"""
if isinstance(cluster, LocalCUDACluster):
return Client(cluster)
else:
return Client(scheduler_file=cluster)


def test_comms_init_no_p2p(cluster):
client = create_client(cluster)
try:
Expand Down