Repository navigation
Add the Model Library config and its validator - #1810
Draft
arielsmoler wants to merge 1 commit into
Draft
arielsmoler wants to merge 1 commit into
arielsmoler wants to merge 1 commit into
Conversation
The config lists the 53 notebooks the v2 web app's Model Library shows, each with a title, a description and labels from the agreed vocabulary. A pre-commit hook validates it whenever the config or a notebook changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| "Computational Fluid Dynamics (CFD)", | ||
| "Cybersecurity", | ||
| "Healthcare & Life Sciences", | ||
| "Automotive", |
Member
There was a problem hiding this comment.
There are some entries that are unused. I guess this is OK, and initially we will get empty results for those filters.
| return errors | ||
|
|
||
|
|
||
| def validate_config(config_path: Path = CONFIG_PATH) -> list[str]: |
Member
There was a problem hiding this comment.
Cool. Maybe add a comment to the user which file needs to be updated. Say someone adds a new notebook, the pre-commit will not pass, but the contributor should know which file to modify.
It will be good if @classiqdor can automated this (we have such automations for the metadata of each notebook)
This branch has not been deployed
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.
PR Description
Adds the config for the v2 web app's Model Library: the list of library notebooks it shows, each with a title, a description and labels, plus a pre-commit check for the file. Spec: Model Library — UX Spec, section "Integration with the Classiq Library".
Files
.internal/model_library/model_library_config.json— 53 notebooks, keyed by path. Each hastitle,descriptionandlabels(domain,framework,building_block,other). The allowed labels are thevocabularyat the top of the file..internal/pre_commit_tools/model_library_validate.pyand a newvalidate-model-library-confighook. It checks that every path is an existing notebook listed once, that each entry has a non-empty title and description and the four label lists, and that every label is in the vocabulary and not repeated. It runs when the config or any notebook changes, so renaming or deleting a listed notebook fails the check.No notebook is changed. The existing
*.metadata.jsonfiles and their validator are untouched, so the v1 web app and the Library extension are unaffected.Which notebooks. The 53 in-scope notebooks that ran end to end through the v2 web app's agent on nightly — results in Notebook Status on the v2 Web App. The other in-scope notebooks are added once the platform-side fixes listed there land.
Where the content comes from
.metadata.json, as already used by the web app's stand-in config. Six had placeholder text and were rewritten from the notebook's introduction:lchs,maxwell_2d_simulation,quantum_oracle_sketching_boolean,fermi_hubbard_1D,fermionic_gaussian,hybrid_qnn_for_subset_majority.Open questions for review
metadata.jsonat runtime (an open item in the spec). They are included here because the web app's backend expects them.Some notes
pre-commitrun on all changed files; all hooks pass..qmod,.synthesis_options.jsonor.metadata.jsonfile changed.🤖 Generated with Claude Code