You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After fixing slicing from a struct column in #8719, tests inside test_pack.py are now failing due to pack and unpack not correctly dealing with struct column slices. This is likely an issue with offset (same reason as what was causing the old error with slicing).
Steps/Code to reproduce bug
In [37]: import cudf
In [38]: df = cudf.DataFrame()
In [39]: df['a'] = cudf.Series([{'a': i} for i in range(5)])
In [40]: df
Out[40]:
a
0 {'a': 0}
1 {'a': 1}
2 {'a': 2}
3 {'a': 3}
4 {'a': 4}
In [41]: df[2:]
Out[41]:
a
2 {'a': 2}
3 {'a': 3}
4 {'a': 4}
In [42]: from cudf._lib.copying import pack, unpack
In [43]: packed = pack(df[2:])
In [44]: unpacked = cudf.DataFrame._from_table(unpack(packed))
In [45]: unpacked
Out[45]:
a
2 {'a': 0}
3 {'a': 1}
4 {'a': 2}
Expected behavior
Line 45 should output the same as line 41
Additional context
In the current version of cudf, line 41 will output the same result as line 45, which will cause this test to pass, however that is incorrect behaviour as the slice is not correct. #8719 will fix this slicing issue, however it will not pass the CI as a result of this test case. We may need to ignore test_pack.py until #8719 is merged then address this pack and unpack issue in a later PR, or address it altogether in #8719.
The text was updated successfully, but these errors were encountered:
Describe the bug
After fixing slicing from a
struct
column in #8719, tests insidetest_pack.py
are now failing due topack
andunpack
not correctly dealing withstruct
column slices. This is likely an issue withoffset
(same reason as what was causing the old error with slicing).Steps/Code to reproduce bug
Expected behavior
Line 45 should output the same as line 41
Additional context
In the current version of
cudf
, line 41 will output the same result as line 45, which will cause this test to pass, however that is incorrect behaviour as the slice is not correct. #8719 will fix this slicing issue, however it will not pass the CI as a result of this test case. We may need to ignoretest_pack.py
until #8719 is merged then address thispack
andunpack
issue in a later PR, or address it altogether in #8719.The text was updated successfully, but these errors were encountered: