diff --git a/README.md b/README.md index ebb5f762..f4cf5e7a 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/ci/test_external.sh b/ci/test_external.sh index b9455d3e..258e5532 100755 --- a/ci/test_external.sh +++ b/ci/test_external.sh @@ -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 diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 5936523f..2c131b33 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -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 diff --git a/conda/environments/all_cuda-120_arch-x86_64.yaml b/conda/environments/all_cuda-120_arch-x86_64.yaml index 2261a98d..6281b893 100644 --- a/conda/environments/all_cuda-120_arch-x86_64.yaml +++ b/conda/environments/all_cuda-120_arch-x86_64.yaml @@ -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 diff --git a/dependencies.yaml b/dependencies.yaml index a365d3ee..0545daf8 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -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 diff --git a/docs/source/api_reference/dataframe.rst b/docs/source/api_reference/dataframe.rst index 4d761571..07772fef 100644 --- a/docs/source/api_reference/dataframe.rst +++ b/docs/source/api_reference/dataframe.rst @@ -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 diff --git a/python/cuxfilter/dashboard.py b/python/cuxfilter/dashboard.py index 53fb0402..a6d265b4 100644 --- a/python/cuxfilter/dashboard.py +++ b/python/cuxfilter/dashboard.py @@ -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 = ( @@ -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 @@ -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 -------- @@ -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 -------- @@ -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 -------- @@ -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, @@ -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 --------