Remove hardcoded registry file - #199
Merged
Merged
Conversation
…source management
lfoppiano
marked this pull request as draft
March 4, 2026 15:31
de-code
reviewed
Mar 4, 2026
Collaborator
Author
|
Here one example of use, I created a new registry with a new db path: |
lfoppiano
marked this pull request as ready for review
March 4, 2026 19:59
de-code
approved these changes
Mar 18, 2026
de-code
left a comment
Contributor
There was a problem hiding this comment.
Looking good.
Didn't quite expect the extend of necessary changes when I raised the issue.
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.
This pull request refactors how the resource registry is handled across the sequence labeling models in the
delftpackage. The main change is to allow the registry path to be set via an environment variable and to enable passing a custom registry to model constructors, improving flexibility and configurability. All model classes and the model factory function (get_model) are updated to support this new approach.Resource registry handling improvements:
get_registry_pathfunction todelft/__init__.pyto allow the registry path to be configured via theDELFT_REGISTRY_PATHenvironment variable, falling back to the default location if not set.BaseModelconstructor indelft/sequenceLabelling/models.pyto accept aregistryparameter and load the registry using the new logic if none is provided.Model instantiation changes:
get_modelfunction and all model class constructors indelft/sequenceLabelling/models.pyto accept and propagate theregistryparameter, ensuring consistent use of the registry throughout the codebase.