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
In some environments test_pre_import may fail as the module that is picked arbitrarily may not be importable by the dask cuda worker process. This behavior has been observed in CI when testing wheels, but testing conda doesn't present any problems at this time, but given the non-deterministic nature of the test it may start failing at some point. The traceback of the error observed is as follows:
Ideally, we would pick a module that we are absolutely certain is not gonna be loaded when pre-import runs, but we don't control the entire software stack to be always sure this is going to be the case for any module we choose. To test LocalCUDACluster there would be a simple solution to that, we could register a module at runtime as below:
importtypesimportsysmock=types.ModuleType('mock')
# Add it to sys.modulessys.modules['mock'] =mockimportmock
We could then simply try to import the module as above. However, with dask cuda worker that's not possible, given the process we run with popen will not inherit anything we do at runtime. One alternative I can think is perhaps creating a submodule like dask_cuda/utils_test_mock.py we can control not to be loaded, it feels a bit dirty but may do the trick.
The text was updated successfully, but these errors were encountered:
In some environments
test_pre_import
may fail as the module that is picked arbitrarily may not be importable by thedask cuda worker
process. This behavior has been observed in CI when testing wheels, but testing conda doesn't present any problems at this time, but given the non-deterministic nature of the test it may start failing at some point. The traceback of the error observed is as follows:Ideally, we would pick a module that we are absolutely certain is not gonna be loaded when pre-import runs, but we don't control the entire software stack to be always sure this is going to be the case for any module we choose. To test
LocalCUDACluster
there would be a simple solution to that, we could register a module at runtime as below:We could then simply try to import the module as above. However, with
dask cuda worker
that's not possible, given the process we run withpopen
will not inherit anything we do at runtime. One alternative I can think is perhaps creating a submodule likedask_cuda/utils_test_mock.py
we can control not to be loaded, it feels a bit dirty but may do the trick.The text was updated successfully, but these errors were encountered: