Skip to content

Commit

Permalink
fix: update persistence logic
Browse files Browse the repository at this point in the history
  • Loading branch information
SawyerCzupka committed Feb 23, 2025
1 parent 6924177 commit 726a0bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ml-api/src/ml_api/ingestion/ingestion_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def ingest_single_file(self, file_path: Path) -> bool:
documents=docs,
num_workers=settings.PIPELINE_NUM_WORKERS_SINGLE,
)
if settings.PIPELINE_PERSIST:
self.pipeline.persist(persist_dir=settings.PIPELINE_PERSIST_PATH)

logger.info(
f"Processed & ingested {len(processed_nodes)} nodes from {file_path}"
Expand Down
2 changes: 1 addition & 1 deletion ml-api/src/ml_api/ingestion/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ def get_pipeline(
pipeline = IngestionPipeline(transformations=transformations, vector_store=qdrant)

if persist and persist_path:
pipeline.persist(persist_dir=persist_path)
pipeline.load(persist_dir=persist_path)

return pipeline

0 comments on commit 726a0bb

Please sign in to comment.