[Bug]: warning about nodes not assigned to the preferred execution providers when running on GPU

Đang mở
#467 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
machine-learning

Hướng nghiên cứu

Bắt đầu bằng cách chạy script được cung cấp với uv run scriptname.py và kiểm tra đầu ra của provider TextEmbedding cùng các cảnh báo từ embed. Xác định xem cảnh báo CUDAExecutionProvider có được mong đợi đối với ví dụ này hay cần thay đổi dự án, sau đó ghi lại hoặc xác minh hành vi phát sinh trong môi trường được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What happened?

Not really a bug, more of a warning when generating embeddings with fastembed-gpu following this docs:

I am getting these warnings:

[W:onnxruntime:, session_state.cc:1168 VerifyEachNodeIsAssignedToAnEp] 
Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.

[W:onnxruntime:, session_state.cc:1170 VerifyEachNodeIsAssignedToAnEp] 
Rerunning with verbose output on a non-minimal build will show node assignments.

When I print embedding_model_gpu.model.model.get_providers() I can see these available providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'] (cf. below for reproducible example)

Can this warning be dealt with elegantly? What is this really about? Thanks a lot

What is the expected behaviour?

No response

A minimal reproducible example

To be run with uv run scriptname.py:

# /// script
# dependencies = [
#   "fastembed-gpu",
# ]
# ///

from fastembed import TextEmbedding

embedding_model_gpu = TextEmbedding(
    model_name="BAAI/bge-small-en-v1.5", providers=["CUDAExecutionProvider"]
)
print(embedding_model_gpu.model.model.get_providers())

documents: list[str] = [
    "Demonstrating GPU acceleration in fastembed 1",
    "Demonstrating GPU acceleration in fastembed 2",
    "Demonstrating GPU acceleration in fastembed 3",
]

embedded = list(embedding_model_gpu.embed(documents))
print(embedded)

Running on CUDA Version: 12.4

What Python version are you on? e.g. python --version

Python 3.12.8

FastEmbed version

v0.5.1

What os are you seeing the problem on?

Linux

Relevant stack traces and/or logs

Ngôn ngữ chính
Python
Star
3.3k
Fork
314
Merge trung bình
5 ngày 7 giờ
Pull request đã merge (30 ngày)
23

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của qdrant/fastembed

Tất cả issue của qdrant/fastembed

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.