Fix #142: Any method to add my trained model to advanced tools?#144
Open
JiwaniZakir wants to merge 1 commit into
Open
Fix #142: Any method to add my trained model to advanced tools?#144JiwaniZakir wants to merge 1 commit into
JiwaniZakir wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Closes #142
Model option lists for the advanced tools panel were previously hardcoded in
advanced_tools_api.py; this moves them intosrc/constant.jsonunderweb_ui.sequence_model_optionsandweb_ui.structure_model_options, so operators can register custom trained models by editing config rather than source code.In
src/constant.json, two new keys are added to theweb_uiobject with the existing defaults as their values. Insrc/web_v2/advanced_tools_api.py, theadvanced_tools_metafunction (lines ~714–715) now callsweb_ui.get("sequence_model_options", [...])andweb_ui.get("structure_model_options", [...])instead of returning inline literals, preserving backward compatibility when the keys are absent.tests/test_advanced_tools_meta.pyis added with three unit tests:test_default_model_options_when_not_in_constantconfirms the fallback literals are returned when the keys are missing,test_custom_model_options_from_constantconfirms a custom entry like"MyTrainedModel"is surfaced when set in config, andtest_constant_json_has_model_option_keysreads the actualsrc/constant.jsonon disk and asserts both keys are present and are lists.This PR was created with AI assistance (Claude). The changes were reviewed by quality gates and a critic model before submission.