-
Notifications
You must be signed in to change notification settings - Fork 117
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-1635365: ImportError when importing modin.pandas #2139
Comments
Hello @nkrishnan , Thanks for raising the issue. Prerequisites: Python 3.9, 3.10 or 3.11, modin version 0.28.1, and pandas version 2.2.1 are required. No error for below code snippets:
|
With python=3.11, modin=0.28.1, pandas=2.2.1 I get the same error with
That import is per documentation here: This does work
Looks like its due to what import is attempted. |
@nkrishnan The second import
Thanks for pointing this out, I'll update the documentation for next release to use the correct import statement. |
import modin.pandas as pd; import snowflake.snowpark.modin.plugin |
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using?
3.11 (though it also fails with versions 3.10 and 3.9)
What operating system and processor architecture are you using?
Linux-5.4.181-99.354.amzn2.aarch64-aarch64-with-glibc2.34
(Snowflake console)
What are the component versions in the environment (
pip freeze
)?Bottleneck @ file:///croot/bottleneck_1707864228049/work
cloudpickle @ file:///croot/cloudpickle_1683039989541/work
numexpr @ file:///croot/numexpr_1683221807349/work
numpy @ file:///croot/numpy_and_numpy_base_1682520579168/work
pandas @ file:///croot/pandas_1718308985289/work/dist/pandas-2.2.2-cp311-cp311-linux_aarch64.whl#sha256=674db162e43bbc538e97ef39726edb7be6c1eec6bdaad45776fb032165cecd42
pip==24.0
pyarrow @ file:///croot/pyarrow_1721664224167/work/python
python-dateutil @ file:///croot/python-dateutil_1694417999291/work
pytz @ file:///croot/pytz_1713974315080/work
PyYAML @ file:///croot/pyyaml_1698096055839/work
setuptools==69.5.1
six @ file:///tmp/build/80754af9/six_1644875935023/work
snowflake-connector-python @ file:///repo/conda-bld/stored-proc-python-connector_1716236429655/work
snowflake-snowpark-python @ file:///croot/snowflake-snowpark-python_1721429091110/work
typing_extensions @ file:///croot/typing_extensions_1715268839942/work
tzdata @ file:///croot/python-tzdata_1690578112552/work
wheel==0.43.0
What did you expect to see?
import should succeed
Can you set logging to DEBUG and collect the logs?
Traceback (most recent call last):
Worksheet, line 6, in
File "snowflake/snowpark/modin/pandas/init.py", line 93, in
from snowflake.snowpark.modin.pandas.dataframe import DataFrame
File "snowflake/snowpark/modin/pandas/dataframe.py", line 76, in
from snowflake.snowpark.modin.pandas.base import _ATTRS_NO_LOOKUP, BasePandasDataset
File "snowflake/snowpark/modin/pandas/base.py", line 77, in
from snowflake.snowpark.modin.pandas.utils import (
File "snowflake/snowpark/modin/pandas/utils.py", line 46, in
from snowflake.snowpark.modin.core.execution.dispatching.factories.dispatcher import (
File "snowflake/snowpark/modin/core/execution/dispatching/factories/init.py", line 24, in
from snowflake.snowpark.modin.core.execution.dispatching.factories import ( # noqa: F401
File "snowflake/snowpark/modin/core/execution/dispatching/factories/factories.py", line 36, in
from snowflake.snowpark.modin.core.execution.dispatching.factories.baseio import BaseIO
File "snowflake/snowpark/modin/core/execution/dispatching/factories/baseio.py", line 36, in
from snowflake.snowpark.modin.utils import _inherit_docstrings
File "snowflake/snowpark/modin/utils.py", line 53, in
from snowflake.snowpark.modin.plugin.utils.error_message import ErrorMessage
File "snowflake/snowpark/modin/plugin/init.py", line 62, in
from snowflake.snowpark.modin.plugin import docstrings # isort: skip # noqa: E402
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "snowflake/snowpark/modin/plugin/docstrings/init.py", line 14, in
from snowflake.snowpark.modin.plugin.docstrings.series import Series
File "snowflake/snowpark/modin/plugin/docstrings/series.py", line 16, in
from snowflake.snowpark.modin.utils import _create_operator_docstring
ImportError: cannot import name '_create_operator_docstring' from partially initialized module 'snowflake.snowpark.modin.utils' (most likely due to a circular import) (/usr/lib/python_udf/c99e89e498caeef04ed9ac7328379977bc8cbae72867ffed5bfa8936f3d9fdb1/lib/python3.11/site-packages/snowflake/snowpark/modin/utils.py)
The text was updated successfully, but these errors were encountered: