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

オープン
#467 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python

調査の方向性

まず、提供されたスクリプトを uv run scriptname.py で実行し、TextEmbedding プロバイダーの出力と embed からの警告を確認します。CUDAExecutionProvider の警告がこの例では想定されたものか、プロジェクトの変更が必要なものかを判断し、その結果生じる動作を報告された環境で文書化または検証します。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Python
スター
3.3k
フォーク
314
平均マージ
5日 7時間
マージ済み PR(30日)
23

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

qdrant/fastembed のほかの issue

qdrant/fastembed の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。