marqo-ai/marqo

[BUG] The dependencies in setup.py and requirements.txt are inconsistent.

unsatisfying opened this issue · 1 comments

Background

Dependencies in requirements.txt and setup.py have module conflicts.

Description

There is a dependency mentioned in the requirements.txt file: onnxruntime and a dependency mentioned in the setup.py file: onnxruntime-gpu. These two packages are both built from the onnxruntime. They share many modules (with different contents). During the pip installation process, both of these packages will be installed simultaneously. However, pip does not isolate these two packages, but rather installs them both in the site-packages directory. This leads to the situation where modules from the later installed package overwrite the modules with the same paths installed by the earlier package.

Desired Change

Indeed, it is not an ideal behavior for modules to be overwritten, even if they are not actively used or if the overwritten module is the one being called. It introduces uncertainty and can cause issues in the long run, especially if there are changes or updates to the overwritten modules in future development. It is generally recommended to avoid such conflicts and ensure that only the necessary and compatible dependencies are declared in the requirements to maintain a stable and predictable environment for the project.

Hello! I've included onnxruntime in the dependencies of both files here #815, since both packages are built from the same ONNX Runtime project, i chose to include just onnxruntime because it ensures compatibility across different hardware configurations, do you think this will resolve the issue?