Skip to content

Commit

Permalink
fix tests failing due to unsorted results (#479)
Browse files Browse the repository at this point in the history
This PR:
- fixes a couple of tests which were failing due to recent changes, leading to aggregate results being unsorted
- resolves docs build failures, which were caused by datashader rendering issues with latest numpy(1.24.3), fixed by adding a pin for numpy (<1.24, similar to the version pins in cugraph). @ajschmidt8, could you check if adding this version pin is fine?

Authors:
  - Ajay Thorve (https://github.com/AjayThorve)

Approvers:
  - Allan (https://github.com/exactlyallan)
  - Ray Douglass (https://github.com/raydouglass)

URL: #479
  • Loading branch information
AjayThorve authored May 31, 2023
1 parent a2c7977 commit 472f839
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- cuspatial=23.06
- dask-cuda=23.06
- dask-cudf=23.06
- datashader>=0.14,<=0.14.4
- datashader>=0.15
- geopandas>=0.11.0
- holoviews>=1.15.0,<=1.15.4
- ipython
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/cuxfilter/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ requirements:
- cuspatial ={{ minor_version }}
- dask-cuda ={{ minor_version }}
- dask-cudf ={{ minor_version }}
- datashader >=0.14,<=0.14.4
- datashader >=0.15
- geopandas >=0.11.0
- holoviews>=1.15.0,<=1.15.4
- jupyter-server-proxy
Expand Down
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ dependencies:
- output_types: [conda, requirements]
packages:
- bokeh>=2.4.2,<=2.5
- datashader>=0.14,<=0.14.4
- datashader>=0.15
- geopandas>=0.11.0
- holoviews>=1.15.0,<=1.15.4
- jupyter-server-proxy
Expand Down
2 changes: 1 addition & 1 deletion python/cuxfilter/tests/assets/test_gpu_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@ def test_aggregated_column_unique():
bc.min_value = df["key"].min()

assert np.array_equal(
gpu_histogram.aggregated_column_unique(bc, df),
np.sort(np.array(gpu_histogram.aggregated_column_unique(bc, df))),
np.array([0, 4, 9, 10, 14, 21, 22, 24, 26, 29, 34, 38, 98, 103, 108]),
)
2 changes: 1 addition & 1 deletion python/cuxfilter/tests/charts/core/test_core_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def test_box_selection_callback(
self.result = None

def t_function(data, edges=None, patch_update=False):
self.result = data.reset_index(drop=True)
self.result = data.sort_values(by="vertex").reset_index(drop=True)

bg.reload_chart = t_function

Expand Down
12 changes: 10 additions & 2 deletions python/cuxfilter/tests/charts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ def initialize_df(type, *df_args):


def df_equals(df1, df2):
df1 = df1.compute() if isinstance(df1, dask_cudf.DataFrame) else df1
df2 = df2.compute() if isinstance(df2, dask_cudf.DataFrame) else df2
df1 = (
df1.compute().reset_index(drop=True)
if isinstance(df1, dask_cudf.DataFrame)
else df1.reset_index(drop=True)
)
df2 = (
df2.compute().reset_index(drop=True)
if isinstance(df2, dask_cudf.DataFrame)
else df2.reset_index(drop=True)
)

return df1.equals(df2)

Expand Down

0 comments on commit 472f839

Please sign in to comment.