Skip to content

Commit

Permalink
fix external workflow (#537)
Browse files Browse the repository at this point in the history
This PR fixes a version issue in ci/test_external.sh which was caused by an incorrect cuda-version. Also updated README.md install instructions.

fixes #533, #532
cc @exactlyallan

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

Approvers:
  - Allan (https://github.com/exactlyallan)
  - Jake Awe (https://github.com/AyodeAwe)

URL: #537
  • Loading branch information
AjayThorve authored Sep 12, 2023
1 parent 408457e commit e6c8817
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 59 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,28 @@ Please see the [Demo Docker Repository](https://hub.docker.com/r/rapidsai/rapids

cuxfilter can be installed with conda ([miniconda](https://conda.io/miniconda.html), or the full [Anaconda distribution](https://www.anaconda.com/download)) from the `rapidsai` channel:

For `cuxfilter version == 23.10` :
For nightly version `cuxfilter version == 23.10` :

```bash
# for CUDA 12.0
conda install -c rapidsai-nightly -c conda-forge -c nvidia \
cuxfilter=23.10 python=3.10 cuda-version=12.0

# for CUDA 11.8
conda install -c rapidsai -c numba -c conda-forge -c nvidia \
cuxfilter=23.10 python=3.10 cudatoolkit=11.8
conda install -c rapidsai-nightly -c conda-forge -c nvidia \
cuxfilter=23.10 python=3.10 cuda-version=11.8
```

For the nightly version of `cuxfilter` :
For the stable version of `cuxfilter` :

```bash
# for CUDA 12.0
conda install -c rapidsai -c conda-forge -c nvidia \
cuxfilter python=3.10 cuda-version=12.0

# for CUDA 11.8
conda install -c rapidsai-nightly -c numba -c conda-forge -c nvidia \
cuxfilter python=3.10 cudatoolkit=11.8
conda install -c rapidsai -c conda-forge -c nvidia \
cuxfilter python=3.10 cuda-version=11.8
```

Note: cuxfilter is supported only on Linux, and with Python versions 3.8 and later.
Expand Down
2 changes: 1 addition & 1 deletion ci/test_external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rapids-mamba-retry create \
-c nvidia \
-c conda-forge \
cuxfilter="${RAPIDS_VERSION}" cudf="${RAPIDS_VERSION}" dask-cudf="${RAPIDS_VERSION}" \
python="${RAPIDS_PY_VERSION}" cuda-version="${RAPIDS_CUDA_VERSION}"
python="${RAPIDS_PY_VERSION}" cuda-version="12.0"

# Install external dependencies into test_external conda environment
pushd ./ci/utils
Expand Down
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 @@ -39,8 +39,8 @@ dependencies:
- pytest-xdist
- python>=3.9,<3.11
- recommonmark
- sphinx
- sphinx-markdown-tables
- sphinx>=7.2.5
- sphinx_rtd_theme
- sphinxcontrib-websupport
name: all_cuda-118_arch-x86_64
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ dependencies:
- pytest-xdist
- python>=3.9,<3.11
- recommonmark
- sphinx
- sphinx-markdown-tables
- sphinx>=7.2.5
- sphinx_rtd_theme
- sphinxcontrib-websupport
name: all_cuda-120_arch-x86_64
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ dependencies:
- pandoc<=2.0.0 # We should check and fix all "<=" pinnings
- pydata-sphinx-theme
- recommonmark
- sphinx
- sphinx>=7.2.5
- sphinx_rtd_theme
- sphinx-markdown-tables
- sphinxcontrib-websupport
Expand Down
2 changes: 1 addition & 1 deletion docs/source/api_reference/dataframe.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
API Reference
=============

The two main components to cuxfilter are `DataFrame` for connecting the dashboard to a cuDF backed dataframe, and `Dashboard` for setting dashboard options.
The two main components to cuxfilter are `DataFrame` for connecting the dashboard to a cuDF backed dataframe, and `Dashboard` for setting dashboard options.

.. currentmodule:: cuxfilter.dataframe

Expand Down
84 changes: 36 additions & 48 deletions python/cuxfilter/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ def queried_indices(self):
as a cudf.Series.
Returns None if no index columns are present.
:meta private:
"""
result = None
df_module = (
Expand Down Expand Up @@ -207,6 +209,7 @@ def charts(self):
def add_charts(self, charts=[], sidebar=[]):
"""
Adding more charts to the dashboard, after it has been initialized.
Parameters
----------
charts: list
Expand All @@ -217,11 +220,9 @@ def add_charts(self, charts=[], sidebar=[]):
Notes
-----
After adding the charts, refresh the dashboard app
tab to see the updated charts.
Charts of type widget cannot be added to sidebar but
widgets can be added to charts(main layout)
After adding the charts, refresh the dashboard app
tab to see the updated charts. Charts of type widget cannot be added
to sidebar but widgets can be added to charts(main layout)
Examples
--------
Expand Down Expand Up @@ -315,9 +316,10 @@ def export(self):
the dashboard.
Also prints the query string of the current state of the dashboard.
Returns
-------
cudf.DataFrame
cudf.DataFrame based on the current filtered state of the dashboard.
Examples
--------
Expand Down Expand Up @@ -418,8 +420,18 @@ def _get_server(
def app(self, sidebar_width=280, width=1200, height=800):
"""
Run the dashboard with a bokeh backend server within the notebook.
Parameters
----------
sidebar_width: int, optional, default 280
width of the sidebar in pixels
width: int, optional, default 1200
width of the dashboard in pixels
height: int, optional, default 800
height of the dashboard in pixels
Examples
--------
Expand Down Expand Up @@ -455,46 +467,6 @@ def app(self, sidebar_width=280, width=1200, height=800):
height=height,
)

def servable(self, sidebar_width=280):
"""
Run the dashboard with a bokeh backend server within the notebook.
Parameters
----------
Examples
--------
>>> import cudf
>>> import cuxfilter
>>> from cuxfilter.charts import bokeh
>>> df = cudf.DataFrame(
>>> {
>>> 'key': [0, 1, 2, 3, 4],
>>> 'val':[float(i + 10) for i in range(5)]
>>> }
>>> )
>>> cux_df = cuxfilter.DataFrame.from_dataframe(df)
>>> line_chart_1 = bokeh.line(
>>> 'key', 'val', data_points=5, add_interaction=False
>>> )
>>> d = cux_df.dashboard([line_chart_1])
>>> d.app()
"""
self._reinit_all_charts()
self._current_server_type = "servable"

self._dashboard.generate_dashboard(
self.title,
self._charts,
self._sidebar,
self._theme,
self._layout_array,
"web-app",
sidebar_width,
).servable()

print("click panel logo to launch dashboard")

def show(
self,
notebook_url=DEFAULT_NOTEBOOK_URL,
Expand All @@ -507,18 +479,34 @@ def show(
):
"""
Run the dashboard with a bokeh backend server within the notebook.
Parameters
----------
notebook_url: str, optional, default localhost:8888
- URL where you want to run the dashboard as a web-app,
including the port number.
- Can use localhost instead of ip if running locally.
port: int,
optional- Has to be an open port
port: int, optional
Has to be an open port
service_proxy: str, optional, default None,
available options: jupyterhub
threaded: boolean, optional, default False
whether to run the server in threaded mode
sidebar_width: int, optional, default 280
width of the sidebar in pixels
height: int, optional, default 800
height of the dashboard in pixels
**kwargs: dict, optional
additional keyword arguments to pass to the server
Examples
--------
Expand Down

0 comments on commit e6c8817

Please sign in to comment.