Comments (9)
ok i will try to update cudf and cuxfilter first
from cuxfilter.
Hi @hakim3189, can you please post the versions of cuxfilter, cudf and numpy you are using?
from cuxfilter.
herewith the version
cuxfilter version: 23.10.00
cudf version: 23.10.02
numpy version: 1.24.4
from cuxfilter.
Hey @hakim3189, I was not able to reproduce the error on the latest stable release. Can you please give it a try on the version 23.12.* for cudf and cuxfilter?
from cuxfilter.
hey @AjayThorve , recently i already update my version.
herewith my latest version
cuxfilter version: 23.12.00
cudf version: 23.12.01
numpy version: 1.23.4
but somehow it still produce this error
AttributeError Traceback (most recent call last)
Cell In[88], line 1
----> 1 d1 = cux_df.dashboard([chart1, chart2],sidebar=[chart3,chart4],layout=cuxfilter.layouts.feature_and_base, theme=cuxfilter.themes.rapids_dark)
2 #[chart1, chart3, chart4], sidebar=[chart2], layout=cuxfilter.layouts.feature_and_double_base, title='Auto Accident Dataset'
File ~/miniconda3/envs/rapids-23.12/lib/python3.10/site-packages/cuxfilter/dataframe.py:236, in DataFrame.dashboard(self, charts, sidebar, layout, theme, title, data_size_widget, warnings, layout_array)
233 if notebook_assets.pn.config.js_files == {}:
234 notebook_assets.load_notebook_assets()
--> 236 return DashBoard(
237 charts=charts,
238 sidebar=sidebar,
239 dataframe=self,
240 layout=layout,
241 theme=theme,
242 title=title,
243 data_size_widget=data_size_widget,
244 show_warnings=warnings,
245 layout_array=layout_array,
246 )
File ~/miniconda3/envs/rapids-23.12/lib/python3.10/site-packages/cuxfilter/dashboard.py:186, in DashBoard.init(self, charts, sidebar, dataframe, layout, theme, title, data_size_widget, show_warnings, layout_array)
184 for chart in sidebar:
185 if chart.is_widget:
--> 186 chart.initiate_chart(self)
187 chart._initialized = True
188 self._sidebar[chart.name] = chart
File ~/miniconda3/envs/rapids-23.12/lib/python3.10/site-packages/cuxfilter/charts/panel_widgets/plots.py:334, in MultiChoice.initiate_chart(self, dashboard_cls)
328 self.min_value, self.max_value = get_min_max(
329 dashboard_cls._cuxfilter_df.data, self.x
330 )
331 self.source = dashboard_cls._cuxfilter_df.data[self.x].reset_index(
332 drop=True
333 )
--> 334 self.calc_list_of_values(dashboard_cls._cuxfilter_df.data)
335 self.generate_widget()
336 self.add_events(dashboard_cls)
File ~/miniconda3/envs/rapids-23.12/lib/python3.10/site-packages/cuxfilter/charts/panel_widgets/plots.py:347, in MultiChoice.calc_list_of_values(self, data)
344 if isinstance(data, dask_cudf.core.DataFrame):
345 self.list_of_values = self.list_of_values.compute()
--> 347 self.list_of_values = self.list_of_values.to_pandas().tolist()
349 if len(self.list_of_values) > 500:
350 print(
351 """It is not recommended to use a column with
352 so many different values for MultiChoice menu"""
353 )
AttributeError: 'ndarray' object has no attribute 'to_pandas'
from cuxfilter.
Hey @hakim3189 this is a bit weird, can you get the following working in your enviroment?
import cudf
df = cudf.DataFrame({"a":[1,23,3]}, dtype={"a":"int64"})
print(df['a'].unique().to_pandas().tolist())
the error that's raised refers to the above usage of cudf, which on my 23.12 enviroment, works fine. I would need more info into your data. Also I am assuming you are using this with cuDF
and not pandas, is that correct?
from cuxfilter.
hey @AjayThorve
it produce this error in my environment
AttributeError Traceback (most recent call last)
Cell In[80], line 3
1 import cudf
2 df = cudf.DataFrame({"a":[1,23,3]}, dtype={"a":"int64"})
----> 3 print(df['a'].unique().to_pandas().tolist())
AttributeError: 'ndarray' object has no attribute 'to_pandas'
data is originally in pandas but then I convert to cu_df
cu_df = cudf.from_pandas(df)
cux_df = cuxfilter.DataFrame.from_dataframe(cu_df)
from cuxfilter.
Hey @AjayThorve
Finally I found why this happen
at first herewith my Script :
import cuxfilter
%load_ext cudf.pandas
import pandas as pd
from cuxfilter import DataFrame, themes, layouts, charts
from cuxfilter.charts import bokeh
from cuxfilter.charts import datashader
from pathlib import Path
import cudf
import cuml
import datashader as ds
import numpy as np
import geopandas as gpd
import fiona
import cuspatial
from shapely.geometry import Point, Polygon, MultiPolygon
import matplotlib.pyplot as plt
but after I rerun but without this line it work perfectly
%load_ext cudf.pandas
Thanks for your help
from cuxfilter.
Thats great @hakim3189. Yeah I think importing cudf after loading cudf.pandas might have cuased the issue. I'll make sure we make it clear on the usage with cudf.pandas in the documentation soon. Feel free to open up an issue if you face any in future.
from cuxfilter.
Related Issues (20)
- Check for Holoviews Bokeh 3.0 update HOT 1
- [BUG] Cuxfilter dashboard does not start if hvPlot used previously in Notebook HOT 1
- [BUG] Datashader Docs Line Charts not rendering HOT 1
- [IMPROVEMENT] Add wheel builds to cuxfilter HOT 1
- Next Release Checklist
- [DOC] Update 10 min to cuxfilter
- [FEA] Update External Viz Library Test
- [BUG] Environment compatability issue with Tensorflow 2.12 HOT 1
- Check compatability with cuDF pandas 2.0 migration HOT 6
- Check compatability with XDF framework HOT 2
- Add '20 min to cuxfilter' notebook guide for advanced topics
- [BUG] GPU testing for external party dependencies Failure
- [BUG] AttributeError: partially initialized module 'cupy' has no attribute '_util' (most likely due to a circular import)
- [cuxfilter] CUDA 12 Conda Packages for ARM
- [FEA] Integration Testing Check HOT 1
- [BUG] Tensorflow install issue in some environments HOT 2
- [BUG] Update usage of cudf.core.column.arange to cudf.core.column.as_column HOT 4
- Please add options to cuxFilter to show X&Y axis in scatter chart. Thanks HOT 1
- [BUG] Flaky Test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cuxfilter.