Skip to content
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

[ENH]: Chroma client upgrade check #1536

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

Conversation

tazarov
Copy link
Contributor

@tazarov tazarov commented Dec 15, 2023

Note: This is for Python client only
Note:: Partly resolved #846

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • __version__ is now exported at chromadb package level
  • New functionality
    • New check against pypi for latest chroma version (failures are ignored)

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python

Documentation Changes

N/A

- __version__ is now exported at chromadb package level
- New check against pypi for latest chroma version (failures are ignored)

Refs: chroma-core#846
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 (Readbility, Modularity, Intuitiveness)

@HammadB
Copy link
Collaborator

HammadB commented Dec 19, 2023

This doesn't show when I use chroma run and manually hardcode to a lower version.

@tazarov
Copy link
Contributor Author

tazarov commented Dec 20, 2023

This doesn't show when I use chroma run and manually hardcode to a lower version.

The issue with chroma run is that it uses SegmentAPI directly instead of a client. The functionality for checking things is in the client. It makes sense to notify users on chroma run too.

Moving the version check to utils class and then we call it from client and app.py

@tazarov
Copy link
Contributor Author

tazarov commented Dec 20, 2023

works with chroma run now:

(.venv) tazarov@Trayans-MacBook-Pro upgrade-notification % python -m chromadb.cli.cli run


                (((((((((    (((((####
             ((((((((((((((((((((((#########
           ((((((((((((((((((((((((###########
         ((((((((((((((((((((((((((############
        (((((((((((((((((((((((((((#############
        (((((((((((((((((((((((((((#############
         (((((((((((((((((((((((((##############
         ((((((((((((((((((((((((##############
           (((((((((((((((((((((#############
             ((((((((((((((((##############
                (((((((((    #########

    

Running Chroma

Saving data to: ./chroma_data
Connect to chroma at: http://localhost:8000
Getting started guide: https://docs.trychroma.com/getting-started


INFO:     [20-12-2023 16:10:35] [notice] A new release of chromadb is available: 0.4.17! -> 0.4.20
INFO:     [20-12-2023 16:10:35] [notice] To upgrade, run `pip install --upgrade chromadb`.
...

@tazarov
Copy link
Contributor Author

tazarov commented Dec 20, 2023

It now also works with running Chroma server:

(.venv) tazarov@Trayans-MacBook-Pro upgrade-notification % uvicorn chromadb.app:app --workers 1 --host 0.0.0.0 --port 8000 --proxy-headers --log-config chromadb/log_config.yml --reload
INFO:     [20-12-2023 17:03:11] Will watch for changes in these directories: ['/Users/tazarov/experiments/chroma-experiments/oss/upgrade-notification']
INFO:     [20-12-2023 17:03:11] Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO:     [20-12-2023 17:03:11] Started reloader process [76707] using WatchFiles
DEBUG:    [20-12-2023 17:03:12] Registering provider: token_config
DEBUG:    [20-12-2023 17:03:12] Registering provider: user_token_config
DEBUG:    [20-12-2023 17:03:12] Registering provider: token
DEBUG:    [20-12-2023 17:03:12] Registering provider: token
INFO:     [20-12-2023 17:03:12] [notice] A new release of chromadb is available: 0.4.17! -> 0.4.20
INFO:     [20-12-2023 17:03:12] [notice] To upgrade, run `pip install --upgrade chromadb`.
INFO:     [20-12-2023 17:03:12] Anonymized telemetry enabled. See                     https://docs.trychroma.com/telemetry for more information.

@HammadB HammadB enabled auto-merge (squash) January 15, 2024 18:38
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.

Notify users of new updates
2 participants