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

Add Chroma Resource #91

Merged
merged 3 commits into from
Jan 16, 2025
Merged

Add Chroma Resource #91

merged 3 commits into from
Jan 16, 2025

Conversation

shimon-cherrypick
Copy link
Contributor

Summary & Motivation

  • An integration of dagster with Chroma - supports both local and HTTP Chroma databases.

How I Tested These Changes

  • Added unit-tests that create a local (filesystem) Chroma instance, and use the ChromaResource (LocalConfig) to query it.
  • Added unit-tests that create a local HTTP Chroma instance, and use the ChromaResource to query it via HTTP.

Changelog

Ensure that an entry has been created in CHANGELOG.md outlining additions, deletions, and/or modifications.

See: keepachangelog.com

@yuhan yuhan requested review from yuhan and dpeng817 January 9, 2025 17:12
Copy link

@dpeng817 dpeng817 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments regarding docstrings + docs but generally looks good

@shimon-cherrypick
Copy link
Contributor Author

Shortened the documentation - let me know what you think @dpeng817

Comment on lines 37 to 42
"chroma_local": ChromaResource(
connection_config=LocalConfig(persistence_path="./chroma")
),
"chroma_http": ChromaResource(
connection_config=HttpConfig(host="localhost", port=8000)
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't exactly what I meant; I think a user would probably want to be able to switch configurations without switching resource keys. I meant something like this:

"chroma": ChromaResource(
    connection_config=LocalConfig(...) if not os.getenv("USE_CONN") else HttpConfig(...)
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated - how about this option? @dpeng817

@dpeng817
Copy link

Okay looks totally good. Thanks!

@dpeng817 dpeng817 merged commit 3957a7a into dagster-io:main Jan 16, 2025
1 check passed
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.

2 participants