[v2.0] Stop reading OmopEmbConfig deep inside EmbeddingClient and resolve_backend - #50
Closed
nicoloesch wants to merge 2 commits into
Closed
[v2.0] Stop reading OmopEmbConfig deep inside EmbeddingClient and resolve_backend#50nicoloesch wants to merge 2 commits into
nicoloesch wants to merge 2 commits into
Conversation
gkennos
self-requested a review
August 4, 2026 23:55
gkennos
requested changes
Aug 4, 2026
gkennos
left a comment
Member
There was a problem hiding this comment.
configuration.md and interface_guide.md still show resolve_backend with no args
docs should switch to load_omop_emb_config() + resolve_backend_from_config(cfg), or show explicit resolve_backend with new args (both since both public apis?)
Collaborator
Author
|
Closing in favor of absorbing this into #53 , which is already restructuring The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OmopEmbConfig.get_config()was being called deep insideEmbeddingClient's constructor/embedding_dimproperty and insideresolve_backend(), instead of once at CLI entry points. Two of the three call sites silently swallowed config errors (except FileNotFoundError/ bareexcept Exception) rather than surfacing misconfiguration. Config is now resolved exactly once per CLI command and threaded down as plain arguments:EmbeddingClientgainsembedding_dim,document_embedding_prefix,query_embedding_prefixconstructor parameters; property getters no longer read config internally.resolve_backend(backend_type, *, sqlite_path=None)no longer reads config at all; a newresolve_backend_from_config(cfg)is the one place backend selection touchesOmopEmbConfig.load_omop_emb_config()also catchesConfigurationError(missing required resource), previously uncaught anywhere and left to propagate as a rawValueError.