[FIX] Minor fixes + Stylistic enhancements for TQDM and Multiprocessing #141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the
chonkie
package, focusing on updating progress bar descriptions, improving error messages, and adding docstrings for better code clarity. The most important changes include modifications to progress bar descriptions in multiple files, updates to error messages insemantic.py
, and the addition of docstrings inauto.py
andbase.py
.Progress bar description updates:
src/chonkie/chunker/base.py
: Updated progress bar descriptions in_process_batch_sequential
and_process_batch_multiprocessing
methods to use "doc" instead of "texts" and changed the bar format and ASCII style. [1] [2]src/chonkie/chunker/token.py
: Updated progress bar description inchunk_batch
method to use "batch" instead of "batches" and changed the bar format and ASCII style.Error message improvements:
src/chonkie/chunker/semantic.py
: Improved error messages in the__init__
method to provide more specific information about invalid embedding models.src/chonkie/embeddings/auto.py
: Changed the error handling inget_embeddings
method to raise aValueError
instead of issuing a warning when an embedding class fails to load.Code clarity enhancements:
src/chonkie/embeddings/auto.py
: Added a docstring to describe theAutoEmbeddings
class.src/chonkie/embeddings/base.py
: Added a docstring to describe the base class for all embeddings implementations.