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] find_common_type rasies TypeError with ListDtype #12115

Closed
oliverholworthy opened this issue Nov 10, 2022 · 0 comments · Fixed by #12537
Closed

[BUG] find_common_type rasies TypeError with ListDtype #12115

oliverholworthy opened this issue Nov 10, 2022 · 0 comments · Fixed by #12537
Assignees
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@oliverholworthy
Copy link
Member

oliverholworthy commented Nov 10, 2022

Describe the bug

Related to #12083 , which has issues with this find_common_type function.

I'm creating this new issue, since the issue with the function is not limited to concatenation (frame.values also results in errors with list columns). Fixing this issue seems like part of it, but might not necessarily fix the concat issue.

The function cudf.utils.dtypes.find_common_type raises a TypeError when passed a cudf.ListDtype as one of the types.

Steps/Code to reproduce bug
Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.

import cudf
from cudf.utils.dtypes import find_common_type
import numpy as np

find_common_type({cudf.ListDtype("int64")})
# Raises TypeError: issubclass() arg 1 must be a class

find_common_type({cudf.ListDtype("int64"), np.dtype("int64")})
# Raises TypeError: issubclass() arg 1 must be a class

This results in issues with

Expected behavior

A common type returned when a list dtype is used.

Environment overview (please complete the following information)

  • Environment location: [Bare-metal, Docker]
  • Method of cuDF install: [conda, docker]
    • docker :: docker run -it --gpus=all --rm nvcr.io/nvidia/rapidsai/rapidsai:22.10-cuda11.5-runtime-ubuntu20.04-py3.8 bash
    • conda :: conda create -n python-3.8-rapids-22.10 -c rapidsai -c nvidia -c conda-forge rapids=22.10 python=3.8 cudatoolkit=11.7
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