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] Collection Configuration Storage #2338

Merged
merged 5 commits into from
Jul 9, 2024
Merged

Conversation

atroyn
Copy link
Contributor

@atroyn atroyn commented Jun 14, 2024

Description of changes

This PR introduces storing collection parameters as a Configuration, a JSON-serializable defined object with specified configuration fields, adapting @HammadB's work in #1491.

Configurations are created at creation time for collections, and are immutable thereafter.

The JSON-serialized config is stored as a new text column config_json_str on the collections table.

Note that in this stack, Chroma does not actually consume the configuration for anything - this will be done in a separate stack.

This PR also updates our versions of black and mypy, which were failing with our new definitions but work with the new versions.

Test plan

Tests pass in CI except the following:

  • Tests involving GRPC / Cluster. This is implemented later in this stack.
  • Tests involving cross-version persist. This is implemented later in this stack, along with a user-enabled migration.
  • JavaScript - @jeffchuber is taking a look here. Thanks @jeffchuber

Documentation Changes

N/A - This is not a user-facing change. Documentation around migrations are later in the stack along with the cross-version persistence tests.

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

Please tag your PR title with one of: [ENH | BUG | DOC | TST | BLD | PERF | TYP | CLN | CHORE]. See https://docs.trychroma.com/contributing#contributing-code-and-ideas

This was referenced Jun 14, 2024
Copy link
Contributor Author

atroyn commented Jun 14, 2024

@atroyn atroyn changed the title Tests - Local [CLN] Collection Configuration Storage Jun 14, 2024
@atroyn atroyn marked this pull request as ready for review June 14, 2024 05:50
@atroyn atroyn marked this pull request as draft June 14, 2024 05:53
@atroyn atroyn force-pushed the anton/parameter_management branch from 860971a to 96177dc Compare June 14, 2024 05:56
@atroyn atroyn force-pushed the anton/propagate-collecton-model branch 2 times, most recently from ac6b602 to 00e3a25 Compare June 18, 2024 23:53
@atroyn atroyn force-pushed the anton/parameter_management branch from 96177dc to 4e5d28d Compare June 18, 2024 23:53
@atroyn atroyn force-pushed the anton/propagate-collecton-model branch from 00e3a25 to 6d6e014 Compare June 19, 2024 03:39
@atroyn atroyn force-pushed the anton/parameter_management branch from 4e5d28d to f17d07d Compare June 19, 2024 03:39
@atroyn atroyn force-pushed the anton/propagate-collecton-model branch from 6d6e014 to 766402a Compare June 20, 2024 22:28
@atroyn atroyn force-pushed the anton/parameter_management branch from f17d07d to 8594e00 Compare June 20, 2024 22:28
@atroyn atroyn force-pushed the anton/parameter_management branch from 8594e00 to fab77ed Compare June 20, 2024 23:18
@atroyn atroyn force-pushed the anton/propagate-collecton-model branch 2 times, most recently from 867fe80 to 25a5fc6 Compare June 21, 2024 00:18
@atroyn atroyn force-pushed the anton/parameter_management branch 4 times, most recently from dcb4cd1 to e963f10 Compare June 21, 2024 00:57
@atroyn atroyn force-pushed the anton/propagate-collecton-model branch from 25a5fc6 to 53058dd Compare June 21, 2024 01:42
@atroyn atroyn force-pushed the anton/parameter_management branch from e963f10 to 877eb23 Compare June 21, 2024 01:43
@atroyn atroyn force-pushed the anton/parameter_management branch from 877eb23 to 9da85c6 Compare June 21, 2024 21:06
@atroyn atroyn force-pushed the anton/parameter_management branch 4 times, most recently from fc6e457 to 1c493b7 Compare July 1, 2024 23:39
@atroyn atroyn force-pushed the anton/propagate-collecton-model branch from 4f72a09 to b4a93c0 Compare July 1, 2024 23:56
@atroyn atroyn force-pushed the anton/parameter_management branch from 1c493b7 to fbbaf20 Compare July 1, 2024 23:57
@atroyn atroyn force-pushed the anton/propagate-collecton-model branch from b4a93c0 to 8a6cde4 Compare July 2, 2024 00:13
@atroyn atroyn force-pushed the anton/parameter_management branch 3 times, most recently from 72c36ec to 68561fc Compare July 2, 2024 00:40
@atroyn atroyn mentioned this pull request Jul 2, 2024
@atroyn atroyn force-pushed the anton/propagate-collecton-model branch from 8a6cde4 to 3b5338e Compare July 2, 2024 17:25
@atroyn atroyn force-pushed the anton/parameter_management branch from 68561fc to 3eb0969 Compare July 2, 2024 17:26
@atroyn atroyn force-pushed the anton/propagate-collecton-model branch from 3b5338e to b6d0b05 Compare July 2, 2024 18:18
@atroyn atroyn force-pushed the anton/parameter_management branch from 3eb0969 to c4f99e0 Compare July 2, 2024 18:19
@atroyn atroyn force-pushed the anton/propagate-collecton-model branch from b6d0b05 to b1895df Compare July 9, 2024 01:40
@atroyn atroyn force-pushed the anton/parameter_management branch from 3f1bc3f to 6646c49 Compare July 9, 2024 01:40
@atroyn atroyn force-pushed the anton/propagate-collecton-model branch from b1895df to 62d584f Compare July 9, 2024 02:02
@atroyn atroyn force-pushed the anton/parameter_management branch from 6646c49 to ac8f122 Compare July 9, 2024 02:02
Copy link
Contributor Author

atroyn commented Jul 9, 2024

Merge activity

  • Jul 8, 11:00 PM EDT: @atroyn started a stack merge that includes this pull request via Graphite.
  • Jul 8, 11:04 PM EDT: Graphite rebased this pull request as part of a merge.
  • Jul 8, 11:43 PM EDT: @atroyn merged this pull request with Graphite.

@atroyn atroyn changed the base branch from anton/propagate-collecton-model to main July 9, 2024 03:01
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.

3 participants