You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like we currently have an explicit runtime dependency on pytest (via assert_eq) in 24.08, blocking cuDF Pandas in the default RAPIDS/cuDF runtime environment (since it doesn't include pytest). Looks like it may have been introduced in this PR.
We should gate this functionality behind a conditional import or find an alternative approach.
In [2]: %load_extcudf.pandas---------------------------------------------------------------------------ModuleNotFoundErrorTraceback (mostrecentcalllast)
CellIn[2], line1---->1get_ipython().run_line_magic('load_ext', 'cudf.pandas')
File/raid/nicholasb/miniconda3/envs/rapids-24.08/lib/python3.10/site-packages/IPython/core/interactiveshell.py:2480, inInteractiveShell.run_line_magic(self, magic_name, line, _stack_depth)
2478kwargs['local_ns'] =self.get_local_scope(stack_depth)
2479withself.builtin_trap:
->2480result=fn(*args, **kwargs)
2482# The code below prevents the output from being displayed2483# when using magics with decorator @output_can_be_silenced2484# when the last Python token in the expression is a ';'.2485ifgetattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File/raid/nicholasb/miniconda3/envs/rapids-24.08/lib/python3.10/site-packages/IPython/core/magics/extension.py:33, inExtensionMagics.load_ext(self, module_str)
31ifnotmodule_str:
32raiseUsageError('Missing module name.')
--->33res=self.shell.extension_manager.load_extension(module_str)
35ifres=='already loaded':
36print("The %s extension is already loaded. To reload it, use:"%module_str)
File/raid/nicholasb/miniconda3/envs/rapids-24.08/lib/python3.10/site-packages/IPython/core/extensions.py:62, inExtensionManager.load_extension(self, module_str)
55"""Load an IPython extension by its module name. 56 57 Returns the string "already loaded" if the extension is already loaded, 58 "no load function" if the module doesn't have a load_ipython_extension 59 function, or None if it succeeded. 60 """61try:
--->62returnself._load_extension(module_str)
63exceptModuleNotFoundError:
64ifmodule_strinBUILTINS_EXTS:
File/raid/nicholasb/miniconda3/envs/rapids-24.08/lib/python3.10/site-packages/IPython/core/extensions.py:77, inExtensionManager._load_extension(self, module_str)
75withself.shell.builtin_trap:
76ifmodule_strnotinsys.modules:
--->77mod=import_module(module_str)
78mod=sys.modules[module_str]
79ifself._call_load_ipython_extension(mod):
File/raid/nicholasb/miniconda3/envs/rapids-24.08/lib/python3.10/importlib/__init__.py:126, inimport_module(name, package)
124break125level+=1-->126return_bootstrap._gcd_import(name[level:], package, level)
File<frozenimportlib._bootstrap>:1050, in_gcd_import(name, package, level)
File<frozenimportlib._bootstrap>:1027, in_find_and_load(name, import_)
File<frozenimportlib._bootstrap>:1006, in_find_and_load_unlocked(name, import_)
File<frozenimportlib._bootstrap>:688, in_load_unlocked(spec)
File<frozenimportlib._bootstrap_external>:883, inexec_module(self, module)
File<frozenimportlib._bootstrap>:241, in_call_with_frames_removed(f, *args, **kwds)
File/raid/nicholasb/miniconda3/envs/rapids-24.08/lib/python3.10/site-packages/cudf/pandas/__init__.py:106importwarnings8importrmm.mr--->10from .fast_slow_proxyimportis_proxy_object11from .magicsimportload_ipython_extension12from .profilerimportProfilerFile/raid/nicholasb/miniconda3/envs/rapids-24.08/lib/python3.10/site-packages/cudf/pandas/fast_slow_proxy.py:2017importnumpyasnp19from ..optionsimport_env_get_bool--->20from ..testing._utilsimportassert_eq21from .annotationimportnvtx24defcall_operator(fn, args, kwargs):
File/raid/nicholasb/miniconda3/envs/rapids-24.08/lib/python3.10/site-packages/cudf/testing/_utils.py:1311importnumpyasnp12importpandasaspd--->13importpytest14fromnumba.core.typingimportsignatureasnb_signature15fromnumba.core.typing.templatesimportAbstractTemplateModuleNotFoundError: Nomodulenamed'pytest'
The text was updated successfully, but these errors were encountered:
The testing._utils module imports pytest, which is not advertised as a
default run dependency of cudf, so we must avoid importing it in the
proxy wrappers at top-level.
Instead, try importing, and provide an ImportError-specific warning in
addition to the catch all if things fail.
- Closesrapidsai#16062.
It looks like we currently have an explicit runtime dependency on pytest (via
assert_eq
) in 24.08, blocking cuDF Pandas in the default RAPIDS/cuDF runtime environment (since it doesn't include pytest). Looks like it may have been introduced in this PR.We should gate this functionality behind a conditional import or find an alternative approach.
The text was updated successfully, but these errors were encountered: