You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Due to constraints in current fastembed dependencies, I have temporarily dropped the package so that HuggingFace and other local package dependencies can still function. In the meantime user's can install fastembed separately to use the fastembed encoders.
2, because the changes are straightforward and involve version updates and dependency modifications. The PR is small and the changes are clear, making it relatively easy to review.
🧪 Relevant tests
No
⚡ Possible issues
Dependency Compatibility: Removing fastembed and adding tokenizers might introduce compatibility issues with existing code that relies on fastembed. It's crucial to ensure that all functionalities work as expected without fastembed.
🔒 Security concerns
No
Code feedback:
relevant file
pyproject.toml
suggestion
Consider specifying a more precise version range for the tokenizers dependency to avoid potential future compatibility issues with other packages. For example, you could use tokenizers = "^0.19.0" to ensure compatibility with minor updates but not major changes that could break functionality. [important]
Since fastembed is removed from the dependencies, it's important to ensure that no residual code or references to fastembed remain in the project that could cause runtime errors. A thorough search in the codebase for any fastembed imports or usage would be prudent. [important]
It might be beneficial to add a comment next to the transformers dependency explaining why the version constraint was changed to >=4.36.2. This can help maintainers understand the reason for this change, especially if it's related to compatibility or specific features needed from the newer versions. [medium]
Ensure that all references to the version number in the codebase, documentation, and possibly CI/CD configurations are updated to reflect the new version 0.0.45. This helps in maintaining consistency and avoiding issues during deployment or package releases. [medium]
Adjust the version constraints for transformers and tokenizers to be more restrictive to avoid potential compatibility issues
Ensure that the version constraints for transformers and tokenizers are consistent with the rest of the dependencies. The current change introduces a more permissive version constraint for transformers and tokenizers, which might lead to compatibility issues with other packages or the project's environment.
Why: The suggestion addresses a potential compatibility issue by making the version constraints more restrictive, which is crucial for maintaining a stable environment.
9
Maintainability
Implement dynamic versioning by fetching the package version directly from the project's metadata
Consider using a more dynamic approach for version management to avoid manual updates. This can be done by reading the version from a single source like pyproject.toml or another configuration file, which helps in maintaining consistency across the project.
Why: This suggestion improves maintainability by centralizing version management, reducing the risk of inconsistencies across the project.
8
Enhancement
Add fastembed back to the local extras to ensure no loss of functionality
Consider adding back fastembed or providing a replacement if it was intentionally removed. The removal of fastembed from the dependencies and extras without a clear replacement might lead to missing functionality that was previously available.
Why: The suggestion is valid as it ensures no loss of functionality by re-adding fastembed, but it may not be necessary if the removal was intentional and the functionality is no longer needed.
7
Best practice
Ensure essential dependencies are not marked as optional if they are critical for the package's operation
Verify the necessity of marking transformers and tokenizers as optional dependencies. If these packages are essential for the local extras functionality, consider removing the optional = true flag to ensure they are installed with the package.
Why: The suggestion is reasonable for ensuring critical dependencies are always installed, but it might not be necessary if the packages are truly optional for certain use cases.
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.
User description
Due to constraints in current
fastembed
dependencies, I have temporarily dropped the package so that HuggingFace and other local package dependencies can still function. In the meantime user's can installfastembed
separately to use the fastembed encoders.See related issue in fastembed repo here
PR Type
Bug fix, Enhancement
Description
0.0.44
to0.0.45
.fastembed
dependency to resolve local package conflicts.tokenizers
as a new dependency.transformers
to ensure compatibility.Changes walkthrough 📝
__init__.py
Bump version number to 0.0.45
semantic_router/init.py
0.0.44
to0.0.45
.pyproject.toml
Update dependencies and version in pyproject.toml
pyproject.toml
0.0.44
to0.0.45
.fastembed
dependency.tokenizers
dependency.transformers
.