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

Aperta
#467 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Inizia eseguendo lo script fornito con uv run scriptname.py e ispeziona l’output del provider TextEmbedding e gli avvisi di embed. Determina se l’avviso di CUDAExecutionProvider è previsto per questo esempio o richiede una modifica al progetto, quindi documenta o verifica il comportamento risultante nell’ambiente segnalato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
3.3k
Fork
314
Merge medio
5g 7h
PR unite (30g)
23

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di qdrant/fastembed

Tutte le issue di qdrant/fastembed

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.