Skip to content

Commit

Permalink
Revert batch_edge_betweenness_centrality
Browse files Browse the repository at this point in the history
  • Loading branch information
nv-rliu committed Mar 11, 2024
1 parent e25b037 commit d75f163
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,49 +19,49 @@
from cugraph.dask.common.mg_utils import is_single_gpu
from cugraph.datasets import karate, netscience

# Get parameters from standard betwenness_centrality_test
# As tests directory is not a module, we need to add it to the path
# FIXME: Test must be reworked to import from 'cugraph.testing' instead of
# importing from other tests
from test_edge_betweenness_centrality import (
DIRECTED_GRAPH_OPTIONS,
NORMALIZED_OPTIONS,
DEFAULT_EPSILON,
SUBSET_SIZE_OPTIONS,
)

from test_edge_betweenness_centrality import (
calc_edge_betweenness_centrality,
compare_scores,
)


# =============================================================================
# Parameters
# =============================================================================


DATASETS = [karate, netscience]
IS_DIRECTED = [True, False]
IS_NORMALIZED = [True, False]
DEFAULT_EPSILON = 0.0001
SUBSET_SIZES = [4, None]
RESULT_DTYPES = [np.float32, np.float64]

# FIXME: The "preset_gpu_count" from 21.08 and below are not supported and have
# been removed
RESULT_DTYPE_OPTIONS = [np.float32, np.float64]


# =============================================================================
# Pytest Setup / Teardown - called for each test function
# =============================================================================


def setup_function():
gc.collect()


# =============================================================================
# Tests
# =============================================================================


# FIXME: Fails for directed = False(bc score twice as much) and normalized = True.
@pytest.mark.mg
@pytest.mark.skipif(is_single_gpu(), reason="skipping MG testing on Single GPU system")
@pytest.mark.parametrize(
"graph_file", DATASETS, ids=[f"dataset={d.get_path().stem}" for d in DATASETS]
)
@pytest.mark.parametrize("directed", IS_DIRECTED)
@pytest.mark.parametrize("subset_size", SUBSET_SIZES)
@pytest.mark.parametrize("normalized", IS_NORMALIZED)
@pytest.mark.parametrize("result_dtype", RESULT_DTYPES)
@pytest.mark.parametrize("directed", DIRECTED_GRAPH_OPTIONS)
@pytest.mark.parametrize("subset_size", SUBSET_SIZE_OPTIONS)
@pytest.mark.parametrize("normalized", NORMALIZED_OPTIONS)
@pytest.mark.parametrize("result_dtype", RESULT_DTYPE_OPTIONS)
def test_mg_edge_betweenness_centrality(
graph_file,
directed,
Expand Down

0 comments on commit d75f163

Please sign in to comment.