LlamaIndex Ingestion: Ray
A Scalable LlamaIndex ingestion pipeline powered by Ray.
This integration uses Ray’s distributed compute framework to parallelize document transformations (parsing, chunking, and embedding), enabling high-throughput processing for large-scale datasets.
Installation
pip install llama-index-integrations-ray
Usage
Distribute the workload across your Ray cluster by wrapping transformations in RayTransformComponent objects and passing them to RayIngestionPipeline.
import ray
from llama_index.core import Document
from llama_index.embeddings.openai import OpenAIEmbedding
from llama_index.core.node_parser import SentenceSplitter
from llama_index.core.extractors import TitleExtractor
from llama_index.ingestion.ray import (
RayIngestionPipeline,
RayTransformComponent,
)
# Start a new cluster (or connect to an existing one, see https://docs.ray.io/en/latest/ray-core/configure.html)
ray.init()
# Create transformations
transformations = [
RayTransformComponent(SentenceSplitter, chunk_size=25, chunk_overlap=0),
RayTransformComponent(
transform_class=TitleExtractor,
map_batches_kwargs={
"batch_size": 10, # Define the batch size
# "num_cpus": 4 # The number of CPUs to reserve for each parallel map worker.
# "num_gpus": 1 # The number of GPUs to reserve for each parallel map worker.
# See https://docs.ray.io/en/latest/data/api/doc/ray.data.Dataset.map_batches.html for all the available parameters
},
),
RayTransformComponent(
transform_class=OpenAIEmbedding,
map_batches_kwargs={
"batch_size": 10,
},
),
]
# Create the Ray ingestion pipeline
pipeline = RayIngestionPipeline(transformations=transformations)
# Run the pipeline with many documents
nodes = pipeline.run(documents=[Document.example()] * 10)
Metadata
Release files for llama-index-ingestion-ray 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_index_ingestion_ray-0.3.0.tar.gz | 6.9 kB | Without provenance | Details for llama_index_ingestion_ray-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_ingestion_ray-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_ingestion_ray-0.3.0-py3-none-any.whl |
Total release size: 14.4 kB
Release files / llama_index_ingestion_ray-0.3.0.tar.gz
| Download URL | llama_index_ingestion_ray-0.3.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d072774cdf3f1d3f50264f902b40ca40290b84a484ea628c1b7c7a5abf49e223
|
|
BLAKE2b-256 checksum How to use checksums |
9d44267508db49ae456786b37b7e11f16e44776b27be7952fe07903de7a946b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / llama_index_ingestion_ray-0.3.0-py3-none-any.whl
| Download URL | llama_index_ingestion_ray-0.3.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a3368131ff05712e7c99c708c23d803aa0dda7962cf16dfcd9427012410bf85
|
|
BLAKE2b-256 checksum How to use checksums |
0de8bfd47e7e52ed45546fe1c8db866388be13adced569b1e6520b3b34f43f44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for llama-index-ingestion-ray 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.