When JIT is used (DS_BUILD_OPS=0) ds builds ~/.cache/torch_extensions/utils/utils.so and loads it as import utils (that is sys.modules["utils"] points to ~/.cache/torch_extensions/utils/utils.so) which collides with any local utils.py in the end user application, which are very common. This breaks those applications since they no longer can import the local utils.
Please kindly rename the too generic utils to something specific to deepspeed. e.g. deepspeed_utils.
I'm not sure about the other jit modules, I'd say to be safe probably prefix those with deepspeed as well.
This issue doesn't occur if I build the full binary set using DS_BUILD_OPS=1, as then it doesn't use the extension mechanism and ends up in a very clear unique location: deepspeed/ops/utils_op.cpython-38-x86_64-linux-gnu.so
Thank you.