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] Iteration on StringMethods is resulting in infinite loop & hangs #14153

Closed
galipremsagar opened this issue Sep 21, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@galipremsagar
Copy link
Contributor

Describe the bug
StringMethods in pandas supports iteration and performing the same in cudf is resulting in infinite loops or hangs.

Steps/Code to reproduce bug

In [46]: import pandas as pd

In [47]: import cudf

In [48]: s = pd.Series(['a', 'b'])

In [49]: gs = cudf.from_pandas(s)

In [50]: for i in s.str:
    ...:     print(i)
    ...: 
<ipython-input-50-d888a34388a8>:1: FutureWarning: Columnar iteration over characters will be deprecated in future releases.
  for i in s.str:
0    a
1    b
dtype: object

In [51]: for i in gs.str:
    ...:     print(i)
    ...: 
.
.
.
.
Infinite loop

Expected behavior
Iteration should be disabled for all ColumnMethods since it is very inefficient.

Environment overview (please complete the following information)

  • Environment location: [Bare-metal]
  • Method of cuDF install: [from source]
@galipremsagar galipremsagar added bug Something isn't working Python Affects Python cuDF API. labels Sep 21, 2023
@galipremsagar galipremsagar self-assigned this Sep 21, 2023
@mroeschke
Copy link
Contributor

Just a reminder to raise an exception in __iter__ specifically since I'm assuming __getitem__ is defined pandas-dev/pandas#54174

@galipremsagar
Copy link
Contributor Author

Just a reminder to raise an exception in __iter__ specifically since I'm assuming __getitem__ is defined pandas-dev/pandas#54174

+1, yup that's the source of the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Affects Python cuDF API.
Projects
Archived in project
Development

No branches or pull requests

2 participants