Skip to content

Fix: Address multiple issues #4998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Mirza-Samad-Ahmed-Baig
Copy link

@Mirza-Samad-Ahmed-Baig Mirza-Samad-Ahmed-Baig commented Jun 30, 2025

  • Improvements & Bug Fixes:
    • Unify opentelemetry package versions to 1.24.0 in pyproject.toml and requirements.txt to resolve version conflicts.
    • Make is_thin_client a configurable setting within the Settings class in chromadb/config.py for explicit control.
    • Ensure deep copying of metadata in _records function in chromadb/api/segment.py to prevent unintended side effects.
    • Implement consistent NumPy array handling in normalize_embeddings function in chromadb/api/types.py to avoid type mismatches.
    • Correctly pass image URIs as uris in the add method of Collection.py and AsyncCollection.py.
    • Fix logical flaw in test_runtime_dependencies in chromadb/test/test_config.py to ensure components are registered before system startup.

Test Plan

  • Tests pass locally with pytest (manual verification of code changes and logical correctness).

Documentation Changes

  • No direct documentation changes are required, as these are internal code fixes and improvements.

Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor

propel-code-bot bot commented Jun 30, 2025

Multi-Issue Fix: OpenTelemetry Version Sync, Thin Client Config, Metadata Safety, Embedding Consistency, and Minor Logic Fixes

This PR introduces a series of targeted fixes and improvements across the codebase. It synchronizes all OpenTelemetry dependencies to version 1.24.0 to prevent version conflict, makes is_thin_client an explicit and configurable attribute in the Settings class, deepens metadata copying in record construction to ensure immutability, improves NumPy embedding normalization, standardizes how image URIs are passed to the backend, and corrects a test logic error around component registration.

Key Changes:
• Unified OpenTelemetry (api, sdk, exporter) versions to 1.24.0 in pyproject.toml.
• Refactored thin client configuration: moved is_thin_client logic into the Settings class for explicit toggling.
• Enforced deep-copying of metadata in the API segment _records generator to prevent accidental mutation.
• Standardized handling and conversion of NumPy arrays in normalize_embeddings to ensure type consistency.
• Updated passing logic for image URIs in add methods of Collection and AsyncCollection models (pass images as uris when uris is None).
• Simplified logic in CollectionCommon for embedding field selection.
• Fixed test logic in test_runtime_dependencies to use system.instance(ComponentZ) before system.start().

Affected Areas:
• Dependency management (pyproject.toml)
• Core system/config (chromadb/config.py)
• Collection/model logic (Collection.py, AsyncCollection.py, CollectionCommon.py)
• API Segment (_records metadata handling: segment.py)
• Embedding handling/utilities (types.py, embedding_functions/init.py, batch_utils.py, results.py)
• Unit tests (test_config.py)

This summary was automatically generated by @propel-code-bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant