Daft
Daft copied to clipboard
feat(text_embed): Add vLLM as a provider
Changes Made
Adds vLLM as a provider for text embedding.
import daft
from daft.ai.provider import load_provider
from daft.functions.ai import embed_text
provider = load_provider("vllm")
model = "Qwen/Qwen3-Embedding-0.6B"
(
daft.read_huggingface("Open-Orca/OpenOrca")
.with_column("embedding", embed_text(daft.col("response"), provider=provider, model=model))
.show()
)
Codecov Report
:x: Patch coverage is 87.71930% with 7 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 71.92%. Comparing base (81c2e1a) to head (1567b08).
:warning: Report is 12 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| daft/ai/provider.py | 16.66% | 5 Missing :warning: |
| daft/ai/vllm/protocols/text_embedder.py | 97.22% | 1 Missing :warning: |
| daft/ai/vllm/provider.py | 93.33% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #5136 +/- ##
==========================================
- Coverage 76.54% 71.92% -4.63%
==========================================
Files 953 955 +2
Lines 130653 130581 -72
==========================================
- Hits 100006 93918 -6088
- Misses 30647 36663 +6016
| Files with missing lines | Coverage Δ | |
|---|---|---|
| daft/ai/vllm/protocols/text_embedder.py | 97.22% <97.22%> (ø) |
|
| daft/ai/vllm/provider.py | 93.33% <93.33%> (ø) |
|
| daft/ai/provider.py | 47.16% <16.66%> (-8.39%) |
:arrow_down: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.