From f2427f4b737a14482b234628888a5dc2d5e73c35 Mon Sep 17 00:00:00 2001 From: Ralph Liu Date: Tue, 12 Mar 2024 08:26:41 -0700 Subject: [PATCH] Just adding batch_betweenness_centrality to replicate CI failure --- .../test_batch_betweenness_centrality_mg.py | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/python/cugraph/cugraph/tests/centrality/test_batch_betweenness_centrality_mg.py b/python/cugraph/cugraph/tests/centrality/test_batch_betweenness_centrality_mg.py index 8ccbbfc9ec5..9f0980d4199 100644 --- a/python/cugraph/cugraph/tests/centrality/test_batch_betweenness_centrality_mg.py +++ b/python/cugraph/cugraph/tests/centrality/test_batch_betweenness_centrality_mg.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2023, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -24,46 +24,49 @@ compare_scores, ) -DIRECTED_GRAPH_OPTIONS = [False, True] -WEIGHTED_GRAPH_OPTIONS = [False, True] -ENDPOINTS_OPTIONS = [False, True] -NORMALIZED_OPTIONS = [False, True] -DEFAULT_EPSILON = 0.0001 -SUBSET_SIZE_OPTIONS = [4, None] -SUBSET_SEED_OPTIONS = [42] - # ============================================================================= # Parameters # ============================================================================= -DATASETS = [karate] -# FIXME: The "preset_gpu_count" from 21.08 and below are currently not -# supported and have been removed -RESULT_DTYPE_OPTIONS = [np.float64] + +DATASETS = [karate] +DEFAULT_EPSILON = 0.0001 +IS_DIRECTED = [False, True] +ENDPOINTS = [False, True] +IS_NORMALIZED = [False, True] +RESULT_DTYPES = [np.float64] +SUBSET_SIZES = [4, None] +SUBSET_SEEDS = [42] +IS_WEIGHTED = [False, True] # ============================================================================= # Pytest Setup / Teardown - called for each test function # ============================================================================= + + def setup_function(): gc.collect() +# ============================================================================= +# Tests +# ============================================================================= + + @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", DIRECTED_GRAPH_OPTIONS) -@pytest.mark.parametrize("subset_size", SUBSET_SIZE_OPTIONS) -@pytest.mark.parametrize("normalized", NORMALIZED_OPTIONS) +@pytest.mark.parametrize("dataset", DATASETS) +@pytest.mark.parametrize("directed", IS_DIRECTED) +@pytest.mark.parametrize("subset_size", SUBSET_SIZES) +@pytest.mark.parametrize("normalized", IS_NORMALIZED) @pytest.mark.parametrize("weight", [None]) -@pytest.mark.parametrize("endpoints", ENDPOINTS_OPTIONS) -@pytest.mark.parametrize("subset_seed", SUBSET_SEED_OPTIONS) -@pytest.mark.parametrize("result_dtype", RESULT_DTYPE_OPTIONS) +@pytest.mark.parametrize("endpoints", ENDPOINTS) +@pytest.mark.parametrize("subset_seed", SUBSET_SEEDS) +@pytest.mark.parametrize("result_dtype", RESULT_DTYPES) def test_mg_betweenness_centrality( - graph_file, + dataset, directed, subset_size, normalized, @@ -74,7 +77,7 @@ def test_mg_betweenness_centrality( dask_client, ): sorted_df = calc_betweenness_centrality( - graph_file, + dataset, directed=directed, normalized=normalized, k=subset_size,