Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Notebooks in Notebooks Contrib have minor 0.11 errors or are obsolete #258

Open
taureandyernv opened this issue Dec 18, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@taureandyernv
Copy link
Contributor

A few bugs emerged from CI. We need to update both the branch-0.11 and branch-0.12 branches.

  1. getting_started_notebooks/06_Introduction_to_Supervised_Learning.ipynb
06_Introduction_to_Supervised_Learning-test.py in <module>
    338 n_neighbors = 3
    339 
--> 340 distances, indices = knn.kneighbors(X_df, k=n_neighbors)
    341 
    342 

cuml/neighbors/nearest_neighbors.pyx in cuml.neighbors.nearest_neighbors.NearestNeighbors.kneighbors()

TypeError: kneighbors() got an unexpected keyword argument 'k'
  1. getting_started_notebooks/02_Introduction_to_cuDF.ipynb
TypeError                                 Traceback (most recent call last)
/opt/conda/envs/rapids/lib/python3.6/site-packages/cudf/core/column/column.py in as_column(arbitrary, nan_as_null, dtype, name)
   1384             data = as_column(
-> 1385                 memoryview(arbitrary), dtype=dtype, nan_as_null=nan_as_null
   1386             )

TypeError: memoryview: a bytes-like object is required, not 'tuple'

During handling of the above exception, another exception occurred:

ArrowInvalid                              Traceback (most recent call last)
/opt/conda/envs/rapids/lib/python3.6/site-packages/cudf/core/column/column.py in as_column(arbitrary, nan_as_null, dtype, name)
   1401                 data = as_column(
-> 1402                     pa.array(arbitrary, type=pa_type, from_pandas=nan_as_null),
   1403                     dtype=dtype,

/opt/conda/envs/rapids/lib/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()

/opt/conda/envs/rapids/lib/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()

/opt/conda/envs/rapids/lib/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()

ArrowInvalid: Cannot mix NumPy dtypes int64 and datetime64

During handling of the above exception, another exception occurred:

ArrowInvalid                              Traceback (most recent call last)
/tmp/02_Introduction_to_cuDF-test.py in <module>
    169 
    170 
--> 171 df = cudf.DataFrame([('id', ids), ('timestamp', timestamps_np)])
    172 print(df)
    173 

/opt/conda/envs/rapids/lib/python3.6/site-packages/cudf/core/dataframe.py in __init__(self, data, index, columns, dtype)
    183 
    184             for i, (col_name, series) in enumerate(data):
--> 185                 self.insert(i, col_name, series, forceindex=index is not None)
    186 
    187         self._add_empty_columns(columns, index)

/opt/conda/envs/rapids/lib/python3.6/site-packages/cudf/core/dataframe.py in insert(self, loc, column, value, forceindex)
   1557             )
   1558         self._cols[column] = self._prepare_series_for_add(
-> 1559             value, forceindex=forceindex, name=column
   1560         )
   1561         keys = list(self._cols.keys())

/opt/conda/envs/rapids/lib/python3.6/site-packages/cudf/core/dataframe.py in _prepare_series_for_add(self, col, forceindex, name)
   1516         if (not SCALAR) and (name is None) and hasattr(col, "name"):
   1517             name = col.name
-> 1518         series = Series(col, name=name) if not SCALAR else col
   1519         self._sanitize_columns(series)
   1520         series = self._sanitize_values(series, SCALAR)

/opt/conda/envs/rapids/lib/python3.6/site-packages/cudf/core/series.py in __init__(self, data, index, name, nan_as_null, dtype)
    122         if not isinstance(data, column.TypedColumnBase):
    123             data = column.as_column(
--> 124                 data, nan_as_null=nan_as_null, dtype=dtype, name=name
    125             )
    126 

/opt/conda/envs/rapids/lib/python3.6/site-packages/cudf/core/column/column.py in as_column(arbitrary, nan_as_null, dtype, name)
   1414                     data = as_column(
   1415                         np.array(arbitrary, dtype=np_type),
-> 1416                         nan_as_null=nan_as_null,
   1417                     )
   1418     if hasattr(data, "name") and (name is not None):

/opt/conda/envs/rapids/lib/python3.6/site-packages/cudf/core/column/column.py in as_column(arbitrary, nan_as_null, dtype, name)
   1224             data = datetime.DatetimeColumn.from_numpy(arbitrary)
   1225         elif arbitrary.dtype.kind in ("O", "U"):
-> 1226             data = as_column(pa.Array.from_pandas(arbitrary))
   1227         else:
   1228             data = as_column(rmm.to_device(arbitrary), nan_as_null=nan_as_null)

/opt/conda/envs/rapids/lib/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.Array.from_pandas()

/opt/conda/envs/rapids/lib/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()

/opt/conda/envs/rapids/lib/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()

/opt/conda/envs/rapids/lib/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()

ArrowInvalid: only handle 1-dimensional arrays

  1. cuml_benchmarks
  • Fix error: 'AlgorithmPair' object has no attribute 'set_up_cpu'
  1. replace old cuml_quick_benchmarks with working version of cuml_benchmarks
  2. Remove cuDatashader.ipynb
@taureandyernv taureandyernv added the bug Something isn't working label Dec 18, 2019
@taureandyernv taureandyernv mentioned this issue Dec 18, 2019
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant