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

Remove warning in from_dlpack and to_dlpack methods #7001

Merged
merged 6 commits into from
Dec 14, 2020
Merged

Remove warning in from_dlpack and to_dlpack methods #7001

merged 6 commits into from
Dec 14, 2020

Commits on Dec 13, 2020

  1. Remove warning in from_dlpack and to_dlpack methods

    Fix #6926 .
    
    Hi,
    
    Hi!
    
    When invoking from_dlpack() and to_dlpack, the following warnings are displayed:
    
    from_dlpack()
    
    /opt/conda/envs/rapids/lib/python3.7/site-packages/cudf/io/dlpack.py:33: UserWarning: WARNING: cuDF from_dlpack() assumes column-major (Fortran order) input. If the input tensor is row-major, transpose it before passing it to this function.
    res = libdlpack.from_dlpack(pycapsule_obj)
    to_dlpack()
    
    /opt/conda/envs/rapids/lib/python3.7/site-packages/cudf/io/dlpack.py:74: UserWarning: WARNING: cuDF to_dlpack() produces column-major (Fortran order) output. If the output tensor needs to be row major, transpose the output of this function.
    return libdlpack.to_dlpack(gdf_cols)
    I think those warnings should be removed, because it contains information that should be available in the API documentation, and not necessarily displayed each time the methods are invoked.
    
    Some users, like me, love to have their notebooks/code without warnings. Even if it is possible to disable those warnings, I think the user should not go that way, because the warning is just repeating what the API documentation should cover.
    
    Hope it helps!
    Miguel
    miguelusque authored Dec 13, 2020
    Configuration menu
    Copy the full SHA
    8d8b52e View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2020

  1. Add additional info to from_dlpack() and to_dlpack() API doc

    Moved API documentation from warning message to API doc.
    miguelusque authored Dec 14, 2020
    Configuration menu
    Copy the full SHA
    5e1062c View commit details
    Browse the repository at this point in the history
  2. Fix trailing space and 81 long characters

    Removed trailing space and reduced the line length to <=80
    miguelusque authored Dec 14, 2020
    Configuration menu
    Copy the full SHA
    767109d View commit details
    Browse the repository at this point in the history
  3. Added notes section to from_dlpack() and to_dlpack()

    I have just moved the warning to a NOTES section.
    miguelusque authored Dec 14, 2020
    Configuration menu
    Copy the full SHA
    584434b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2a23d53 View commit details
    Browse the repository at this point in the history
  5. Updated copyright notice

    Updated copyright notice from 2019 to 2019-2020.
    miguelusque authored Dec 14, 2020
    Configuration menu
    Copy the full SHA
    da6d649 View commit details
    Browse the repository at this point in the history