Skip to content

Commit

Permalink
Merge branch 'branch-24.10' into update-version-improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice authored Aug 15, 2024
2 parents 0ae69f9 + c325c7f commit 8f2d9c8
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 59 deletions.
59 changes: 25 additions & 34 deletions ci/test_external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@ rapids-logger "Create test_external conda environment"
. /opt/conda/etc/profile.d/conda.sh

# Install external dependencies into test_external conda environment
rapids-conda-retry env update -f ./ci/utils/external_dependencies.yaml
rapids-dependency-file-generator \
--output conda \
--file-key test_external \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml

rapids-mamba-retry env create --yes -f env.yaml -n test_external

# Temporarily allow unbound variables for conda activation.
set +u
conda activate test_external
set -u

rapids-print-env

# Define input parameter
PROJECT=$1
Expand All @@ -19,6 +29,11 @@ LIBRARIES=("datashader" "holoviews")
# Change directory to /tmp
pushd /tmp


EXITCODE=0
trap "EXITCODE=1" ERR
set +e

# Clone the specified Python libraries
if [ "$PROJECT" = "all" ]; then
# Loop through each library and install dependencies
Expand All @@ -33,7 +48,11 @@ if [ "$PROJECT" = "all" ]; then
# Change directory to the library
pushd $LIBRARY
# Run setup.py with test dependencies
python -m pip install -e .[tests]
python -m pip install .[tests]

rapids-logger "Run GPU tests for $LIBRARY"

python -m pytest $LIBRARY/tests/ --numprocesses=8 --dist=worksteal --gpu

popd
done
Expand All @@ -53,42 +72,14 @@ else
# Change directory to the specified project
pushd $PROJECT
# Run setup.py with test dependencies
python -m pip install -e .[tests]
popd
fi
python -m pip install .[tests]

FILES=""
# Install and run tests
if [ "$PROJECT" = "all" ]; then
# Loop through each library and install dependencies
for LIBRARY in "${LIBRARIES[@]}"
do
rapids-logger "gathering GPU tests for $LIBRARY"
TEST_DIR="$LIBRARY/$LIBRARY/tests"
# Find all Python scripts containing the keywords cudf or dask_cudf except test_quadmesh.py
FILES+=" $(grep -l -R -e 'cudf' --include='*.py' "$TEST_DIR" | grep -v test_quadmesh.py)"
done
else
rapids-logger "gathering GPU tests for $PROJECT"
TEST_DIR="$PROJECT/$PROJECT/tests"
# Find all Python scripts containing the keywords cudf or dask_cudf
FILES+=$(grep -l -R -e 'cudf' --include='*.py' "$TEST_DIR")
fi

EXITCODE=0
trap "EXITCODE=1" ERR
set +e
rapids-logger "Run GPU tests for $LIBRARY"

rapids-logger "running all gathered tests"
DATASHADER_TEST_GPU=1 pytest \
--numprocesses=8 \
--dist=worksteal \
$FILES
python -m pytest $LIBRARY/tests/ --numprocesses=8 --dist=worksteal --gpu

if [[ "$PROJECT" = "all" ]] || [[ "$PROJECT" = "datashader" ]]; then
# run test_quadmesh.py separately as dask.array tests fail with numprocesses
rapids-logger "running test_quadmesh.py"
DATASHADER_TEST_GPU=1 pytest datashader/datashader/tests/test_quadmesh.py
popd
fi

rapids-logger "Test script exiting with value: $EXITCODE"
Expand Down
17 changes: 0 additions & 17 deletions ci/utils/external_dependencies.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ files:
key: test
includes:
- test_python
test_external:
output: none
includes:
- test_external
channels:
- rapidsai
- rapidsai-nightly
Expand Down Expand Up @@ -257,3 +261,21 @@ dependencies:
- output_types: conda
packages:
- panel>=1.0,<=1.3.4
test_external:
common:
- output_types: [conda]
packages:
- coverage
- *cudf_unsuffixed
- cupy>=12.0.0
- *cuspatial_unsuffixed
- *dask_cudf_unsuffixed
- cuxfilter==24.10.*,>=0.0.0a0
- python>=3.9,<3.12
- xarray-spatial
- pycaret
- graphistry
- dash
- dask-sql
- pytest-benchmark
- pytest-xdist
16 changes: 8 additions & 8 deletions python/cuxfilter/charts/core/non_aggregate/core_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ def edge_columns(self):

@property
def node_columns(self):
if self.node_aggregate_col:
return [
self.node_id,
self.node_x,
self.node_y,
self.node_aggregate_col,
]
return [self.node_id, self.node_x, self.node_y]
cols = [
self.node_id,
self.node_x,
self.node_y,
]
if self.node_aggregate_col != self.node_id:
cols.append(self.node_aggregate_col)
return cols

def __init__(
self,
Expand Down

0 comments on commit 8f2d9c8

Please sign in to comment.