Skip to content

Fix #142: Any method to add my trained model to advanced tools?#144

Open
JiwaniZakir wants to merge 1 commit into
ai4protein:mainfrom
JiwaniZakir:fix/142-any-method-to-add-my-trained-model-to-ad
Open

Fix #142: Any method to add my trained model to advanced tools?#144
JiwaniZakir wants to merge 1 commit into
ai4protein:mainfrom
JiwaniZakir:fix/142-any-method-to-add-my-trained-model-to-ad

Conversation

@JiwaniZakir

Copy link
Copy Markdown

Closes #142

Model option lists for the advanced tools panel were previously hardcoded in advanced_tools_api.py; this moves them into src/constant.json under web_ui.sequence_model_options and web_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 the web_ui object with the existing defaults as their values. In src/web_v2/advanced_tools_api.py, the advanced_tools_meta function (lines ~714–715) now calls web_ui.get("sequence_model_options", [...]) and web_ui.get("structure_model_options", [...]) instead of returning inline literals, preserving backward compatibility when the keys are absent.

tests/test_advanced_tools_meta.py is added with three unit tests: test_default_model_options_when_not_in_constant confirms the fallback literals are returned when the keys are missing, test_custom_model_options_from_constant confirms a custom entry like "MyTrainedModel" is surfaced when set in config, and test_constant_json_has_model_option_keys reads the actual src/constant.json on 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.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Any method to add my trained model to advanced tools?

1 participant