-
Notifications
You must be signed in to change notification settings - Fork 20
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
model config manager class #73
model config manager class #73
Conversation
Changes to be committed: modified: src/langcheck/metrics/__init__.py new file: src/langcheck/metrics/_model_management.py new file: src/langcheck/metrics/modelconfig.ini modified: src/langcheck/metrics/zh/reference_based_text_quality.py Changes to be committed: modified: src/langcheck/metrics/__init__.py new file: src/langcheck/metrics/_model_management.py new file: src/langcheck/metrics/modelconfig.ini modified: src/langcheck/metrics/zh/reference_based_text_quality.py
…into zh_model_config
Thank you for writing this up!! I like the idea of a Model Manager, and agree that the properties you listed are all nice to have. I feel like it's not quite a "Model Manager" yet though, since it mostly just manages the model name/path. Concretely, I think that it would be helpful to make the Model Manager return an actual model, rather than just the model name. Here’s an example of what I have in mind:
A couple additional benefits that I think this could bring
Let me know what you think! |
…into zh_model_config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change, this looks great overall!
I committed a few cleanup changes directly, and made a few minor comments in this initial review. I'll play around with the model manager a bit more and try out the caching / config interface and send another follow-up review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @Vela-zz!! This is looking really good now 😄
(FYI I made a bunch of cleanup commits, docstrings and comments mostly)
…into zh_model_config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically LGTM! Couple last questions, but looks good to merge after that 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for all of your work on this @Vela-zz!! I'll merge this to the zh branch once tests pass 🎉
Implement a model manager class for centralized type model management.
The model manager can manage transformer models used in different metric for different language. The manager support list_model_in_use, set_model_for_metric, reset, load_from_file, and save_to_disk, by using this, I think langcheck can
As it is a prototype, so I base it on zh-support branch to make it do not influence any other in-progress feature's updating.
It can be used like this,
