-
Notifications
You must be signed in to change notification settings - Fork 112
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
SNOW-1625830: Fix circular import when calling to_snowpark_pandas
without initializing Snowpark pandas
#2097
SNOW-1625830: Fix circular import when calling to_snowpark_pandas
without initializing Snowpark pandas
#2097
Conversation
to_snowpark_pandas
without initializing Snowpark pandasto_snowpark_pandas
without initializing Snowpark pandas
@sfc-gh-joshi it seems your test is failing, can you take a look? can you also start the snowpark python daily test for this change |
195ba0a
to
cbd3d28
Compare
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
1 similar comment
Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing |
Daily job run in progress: #2132 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks Jonathan!
4457539
to
660365c
Compare
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1625830
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Calling
to_snowpark_pandas
on a Snowpark Python DataFrame without first performingimport snowflake.snowpark.modin.plugin
currently raises an error (see attached JIRA for exact reproduction). This was not the case in previous releases, and this PR fixes internal imports such that performing this operation implicitly initializes Snowpark pandas.After this PR, when
to_snowpark_pandas
is called without explicitly initializing Snowpark pandas, one of two things happens:This is the same error as if the user had tried to
import snowflake.snowpark.modin.plugin
without installing the modin dependency.import snowflake.snowpark.modin.plugin
. If the user performsimport modin.pandas as pd
afterwards, the modin namespace will be set up with Snowpark pandas behavior.