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

Add cudf snowflake example #505

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

ncclementi
Copy link
Contributor

Closes #494

With the caveat of having to do this:

from cudf.pandas.module_accelerator import disable_module_accelerator

with disable_module_accelerator():
    df = table.to_pandas()

import pandas as pd

df = pd.DataFrame(df)  # this will take a few seconds

@ncclementi ncclementi requested a review from a team as a code owner February 6, 2025 00:02
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -0,0 +1,356 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the docref admonition int he first paragraph to cross reference the Snowflake page. This has a few benefits including inserting a link back to this example at the bottom of the snowflake page.


Reply via ReviewNB

@@ -0,0 +1,356 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #14.        "token": get_login_token(),

You could replace this line with "token": pathlib.Path("/snowflake/session/token").read_text() which would remove a little indirection while still being very readable.


Reply via ReviewNB

@@ -0,0 +1,356 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make this note a warning admonition. We might also want to link to the issue so that readers can check on the progress.


Reply via ReviewNB

@jacobtomlinson
Copy link
Member

Looks like ReviewNB had an issue and created some duplicated comments. I'll clean those up now.

@ncclementi
Copy link
Contributor Author

ncclementi commented Feb 6, 2025

We have an issue, I was trying to test the using Path to replace get_login_token() and now I can't seem to be able to establish a session. It just hangs in

session = Session.builder.configs(connection_parameters).create()

it's unclear to me why, I did turn of MFA just in case, I wonder if there is some token caching or something that might be causing a problem.

I will nuke everything and start from scratch tomorrow and see if things work. It's unclear what is going on.

@ncclementi ncclementi force-pushed the cudf-snowflake-example branch from 55c4ae9 to 25b3161 Compare February 7, 2025 15:51
@ncclementi
Copy link
Contributor Author

I went through the deployment, and then connected and things worked. I'm not sure what was the hiccup yesterday but clean slate worked.

I updated the example according to @jacobtomlinson suggestions, and rebased against main to update the branch. This should be ready for final review.

Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome this looks great!

@jacobtomlinson jacobtomlinson merged commit fbe0265 into rapidsai:main Feb 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create cudf example that runs on Snowflake
2 participants