-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(catalog): enhance the stability of embeddings saving (#125)
Because - The current embedding processing system lacks proper concurrency control, which could lead to resource exhaustion when processing large batches of texts - Large embedding batches being processed all at once could cause timeouts and system instability - The code lacks comprehensive documentation for complex processing functions - Error handling and logging for embedding operations needed improvement This commit - Adds concurrent processing limits (max 5 goroutines) to the `EmbeddingTextPipe` function to prevent resource exhaustion - Implements batch processing (50 items per batch) in `saveEmbeddings` to handle large volumes of embeddings more reliably - Enhances error handling and logging throughout the embedding pipeline - Adds detailed documentation for key functions: - `EmbeddingTextPipe`: Complete documentation of parameters, returns, and processing logic - `processEmbeddingFile`: Comprehensive documentation of the 6-step embedding process - Improves progress tracking and logging for embedding batch operations - Adds context cancellation checks to ensure proper cleanup of resources - Removes unnecessary whitespace and fixes code formatting
- Loading branch information
Showing
2 changed files
with
118 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters