chroma
chroma copied to clipboard
[ENH]: Chroma client upgrade check
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?
- [x] Tests pass locally with
pytestfor python
Documentation Changes
N/A
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)
This doesn't show when I use chroma run and manually hardcode to a lower version.
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
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`.
...
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.