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] resample fail with gather_map contain nulls #15551

Closed
Camilochiang opened this issue Apr 17, 2024 · 1 comment · Fixed by #15560
Closed

[BUG] resample fail with gather_map contain nulls #15551

Camilochiang opened this issue Apr 17, 2024 · 1 comment · Fixed by #15560
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@Camilochiang
Copy link

Camilochiang commented Apr 17, 2024

Environment:

  • python 3.10.14
  • rapids 24.04
  • nvidia driver 520.61.05
  • CUDA version 11.8
  • Ubuntu 22.04.4 LTS

This code works in pandas:

import numpy as np
import pandas as pd
import cudf

sample_rate = 256  
signal_freq = 40  
noise_freq = 50  

# Create time vector
t = np.linspace(0, 10, sample_rate*10)

# Generate sine wave with noise
np_signal = np.sin(2*np.pi*signal_freq*t) + np.sin(2*np.pi*noise_freq*t)
data = dict(time = pd.date_range('2023-06-17 12:00', '2023-06-17 12:00:10', sample_rate*10),
						 sign = np_signal)
test_pandas = pd.DataFrame(data)
test_pandas.resample('1s', on='time').mean().head()
test_pandas.resample('10ms', on='time').mean().head()
	sign
time	
2023-06-17 12:00:00.000	1.110208
2023-06-17 12:00:00.010	-1.044914
2023-06-17 12:00:00.020	0.899606
2023-06-17 12:00:00.030	-0.168008
2023-06-17 12:00:00.040	-0.025423

meawhile in cudf

test_cuda = cudf.DataFrame(data)
test_cuda.resample('1s', on='time').mean().head()
test_cuda.resample('10ms', on='time').mean().head()
File copying.pyx:34, in cudf._lib.pylibcudf.copying.gather()

File copying.pyx:61, in cudf._lib.pylibcudf.copying.gather()

ValueError: CUDF failure at: /opt/conda/conda-bld/work/cpp/src/copying/gather.cu:44: gather_map contains nulls
@Camilochiang Camilochiang added the bug Something isn't working label Apr 17, 2024
@mroeschke
Copy link
Contributor

Thanks for the report. With #15560, this should hopefully be fixed in the next release

@mroeschke mroeschke added the Python Affects Python cuDF API. label Apr 17, 2024
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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants