Skip to content

Conversation

@michaelfeil
Copy link
Owner

Related Issue

Checklist

  • I have read the CONTRIBUTING guidelines.
  • I have added tests to cover my changes.
  • I have updated the documentation (docs folder) accordingly.

Additional Notes

Add any other context about the PR here.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR modifies the OpenVINO integration strategy by moving from poetry-managed dependencies to direct pip installation in Docker builds, while removing OpenVINO-related dependencies from pyproject.toml.

  • Removed OpenVINO packages from pyproject.toml dependencies and extras, commenting out optimum-intel, openvino, and openvino-tokenizers
  • Added explicit onnxruntime-openvino pip installation in Dockerfile.cpu_auto build stages after poetry install
  • Added new build-cpu Makefile target for building CPU-specific Docker image with tag michaelf34/infinity:$(VERSION)-cpu
  • Set INFINITY_ENGINE="optimum" as default environment variable in CPU Docker configuration

4 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines 19 to +20
RUN ./requirements_install_from_poetry.sh --no-root --without lint,test "https://download.pytorch.org/whl/cpu"
RUN poetry run $PYTHON -m pip install --no-cache-dir onnxruntime-openvino
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Installing onnxruntime-openvino after poetry install could lead to version conflicts with existing dependencies

Comment on lines +46 to +53
RUN poetry run $PYTHON -m pip install --no-cache-dir onnxruntime-openvino

COPY infinity_emb infinity_emb
# Install dependency with infinity_emb package
# "RUN poetry install --no-interaction --no-ansi --extras \"${EXTRAS}\" --without lint,test && poetry cache clear pypi --all"
COPY requirements_install_from_poetry.sh requirements_install_from_poetry.sh
RUN ./requirements_install_from_poetry.sh --without lint,test "https://download.pytorch.org/whl/cpu"
RUN poetry run $PYTHON -m pip install --no-cache-dir onnxruntime-openvino
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Duplicate installation of onnxruntime-openvino - the second install on line 53 is redundant since the builder stage is already copied to testing

cache=["diskcache"]
vision=["colpali-engine","pillow","timm","torchvision"]
openvino=["onnxruntime-openvino","openvino","openvino-tokenizers"]
# openvino=["onnxruntime-openvino","openvino","openvino-tokenizers"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Commenting out openvino extras will break backward compatibility for users relying on pip install infinity_emb[openvino]. Consider deprecating gradually instead of removing.

@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.51%. Comparing base (c2ccffe) to head (37af6d2).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #475   +/-   ##
=======================================
  Coverage   79.51%   79.51%           
=======================================
  Files          41       41           
  Lines        3417     3417           
=======================================
  Hits         2717     2717           
  Misses        700      700           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@michaelfeil michaelfeil merged commit 28725ac into main Nov 20, 2024
36 checks passed
@michaelfeil michaelfeil deleted the openvino-undo branch November 20, 2024 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants