quantology-modelmaker 0.1.2__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/MANIFEST.in +1 -0
- {quantology_modelmaker-0.1.2/quantology_modelmaker.egg-info → quantology_modelmaker-0.3.0}/PKG-INFO +182 -20
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/README.md +179 -19
- quantology_modelmaker-0.3.0/frontend/.oxlintrc.json +36 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/package-lock.json +15 -6
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/package.json +5 -2
- quantology_modelmaker-0.3.0/frontend/scripts/check-host.mjs +29 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/App.tsx +382 -72
- quantology_modelmaker-0.3.0/frontend/src/BlockNode.tsx +383 -0
- quantology_modelmaker-0.3.0/frontend/src/BuildPanel.tsx +868 -0
- quantology_modelmaker-0.3.0/frontend/src/BuildReport.tsx +207 -0
- quantology_modelmaker-0.3.0/frontend/src/CodeEditor.tsx +133 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/DataModal.tsx +39 -26
- quantology_modelmaker-0.3.0/frontend/src/DataPicker.tsx +62 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/EnvVarField.tsx +2 -2
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/FileBrowser.tsx +9 -9
- quantology_modelmaker-0.3.0/frontend/src/GhostNode.tsx +63 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/GitPanel.tsx +19 -13
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/Inspector.tsx +166 -159
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/LaneBand.tsx +2 -2
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/LaneLabels.tsx +3 -3
- quantology_modelmaker-0.3.0/frontend/src/LibraryPanel.tsx +1232 -0
- quantology_modelmaker-0.3.0/frontend/src/NodeDisplay.tsx +169 -0
- quantology_modelmaker-0.3.0/frontend/src/Palette.tsx +320 -0
- quantology_modelmaker-0.3.0/frontend/src/ParamsForm.tsx +233 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/PortDataView.tsx +35 -20
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/PortInspector.tsx +5 -4
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/SettingsPanel.tsx +119 -12
- quantology_modelmaker-0.3.0/frontend/src/Toolbar.tsx +447 -0
- quantology_modelmaker-0.3.0/frontend/src/UpdateDialog.tsx +87 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/api.ts +124 -15
- quantology_modelmaker-0.3.0/frontend/src/features.ts +42 -0
- quantology_modelmaker-0.3.0/frontend/src/host.ts +185 -0
- quantology_modelmaker-0.3.0/frontend/src/index.css +269 -0
- quantology_modelmaker-0.3.0/frontend/src/main.tsx +15 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/roles.ts +16 -0
- quantology_modelmaker-0.3.0/frontend/src/types.ts +655 -0
- quantology_modelmaker-0.3.0/frontend/vite.config.ts +49 -0
- quantology_modelmaker-0.3.0/modelmaker/__init__.py +5 -0
- quantology_modelmaker-0.3.0/modelmaker/__main__.py +3 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/__init__.py +1 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/build.py +635 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/catalogue.py +295 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/controller.py +775 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/hint_rules.py +528 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/hints.py +152 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/layout.py +71 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/leakage.py +191 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/loop.py +705 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/mcp_server.py +90 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/prompts.py +534 -0
- quantology_modelmaker-0.3.0/modelmaker/agent/tools.py +1465 -0
- quantology_modelmaker-0.3.0/modelmaker/api.py +2255 -0
- quantology_modelmaker-0.3.0/modelmaker/assistant_api.py +279 -0
- quantology_modelmaker-0.3.0/modelmaker/assistant_mcp.py +657 -0
- quantology_modelmaker-0.3.0/modelmaker/block_library.py +613 -0
- quantology_modelmaker-0.3.0/modelmaker/blocks/_template.py +77 -0
- quantology_modelmaker-0.3.0/modelmaker/blocks/base.py +235 -0
- quantology_modelmaker-0.3.0/modelmaker/blocks/binning.py +491 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/blocks/data_quality.py +52 -82
- quantology_modelmaker-0.3.0/modelmaker/blocks/feature_analysis.py +325 -0
- quantology_modelmaker-0.3.0/modelmaker/blocks/library.py +805 -0
- quantology_modelmaker-0.3.0/modelmaker/blocks/modelling.py +1367 -0
- quantology_modelmaker-0.3.0/modelmaker/blocks/stat_tests.py +555 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/blocks/stochastic.py +371 -282
- quantology_modelmaker-0.3.0/modelmaker/cache.py +283 -0
- quantology_modelmaker-0.3.0/modelmaker/capabilities.py +145 -0
- quantology_modelmaker-0.3.0/modelmaker/cli.py +84 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/compiler.py +195 -69
- quantology_modelmaker-0.3.0/modelmaker/datasets.py +158 -0
- quantology_modelmaker-0.3.0/modelmaker/demo_data.py +431 -0
- quantology_modelmaker-0.3.0/modelmaker/execution/__init__.py +48 -0
- quantology_modelmaker-0.3.0/modelmaker/execution/agent.py +374 -0
- quantology_modelmaker-0.3.0/modelmaker/execution/base.py +107 -0
- quantology_modelmaker-0.3.0/modelmaker/execution/env.py +165 -0
- quantology_modelmaker-0.3.0/modelmaker/execution/limits.py +340 -0
- quantology_modelmaker-0.3.0/modelmaker/execution/local.py +251 -0
- quantology_modelmaker-0.3.0/modelmaker/execution/protocol.py +156 -0
- quantology_modelmaker-0.3.0/modelmaker/execution/remote.py +562 -0
- quantology_modelmaker-0.3.0/modelmaker/execution/safe_pickle.py +121 -0
- quantology_modelmaker-0.3.0/modelmaker/execution/wire.py +505 -0
- quantology_modelmaker-0.3.0/modelmaker/features.py +123 -0
- quantology_modelmaker-0.3.0/modelmaker/forms.py +124 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/gitops.py +22 -2
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/graph.py +29 -35
- quantology_modelmaker-0.3.0/modelmaker/library_ai.py +166 -0
- quantology_modelmaker-0.3.0/modelmaker/library_api.py +557 -0
- quantology_modelmaker-0.3.0/modelmaker/library_store.py +579 -0
- quantology_modelmaker-0.3.0/modelmaker/library_updates.py +173 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/llm/__init__.py +2 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/llm/anthropic_provider.py +13 -27
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/llm/base.py +16 -9
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/llm/claude_cli_provider.py +37 -24
- quantology_modelmaker-0.3.0/modelmaker/llm/copilot_provider.py +67 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/llm/gemini_provider.py +2 -5
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/llm/lmstudio_provider.py +2 -5
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/llm/openai_provider.py +2 -5
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/llm/prompts.py +76 -62
- quantology_modelmaker-0.3.0/modelmaker/llm/redact.py +45 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/llm/settings.py +30 -1
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/llm/stub_provider.py +26 -2
- quantology_modelmaker-0.3.0/modelmaker/metadata_transforms.py +114 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/project.py +68 -35
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/run_worker.py +110 -53
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/runner.py +413 -252
- quantology_modelmaker-0.3.0/modelmaker/runslot.py +89 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/session.py +248 -46
- quantology_modelmaker-0.3.0/modelmaker/signature.py +254 -0
- quantology_modelmaker-0.3.0/modelmaker/sources.py +80 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/stochastic/distributions.py +5 -3
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/tui/app.py +38 -9
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/tui/canvas.py +23 -2
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/tui/client.py +20 -21
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/tui/inspector.py +40 -26
- quantology_modelmaker-0.3.0/modelmaker/tui/paramspecs.py +61 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/util.py +14 -5
- quantology_modelmaker-0.3.0/modelmaker/worker_pool.py +497 -0
- quantology_modelmaker-0.3.0/modelmaker/workspace.py +313 -0
- quantology_modelmaker-0.3.0/projects/demo_pd_model/model.json +457 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/pyproject.toml +20 -5
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0/quantology_modelmaker.egg-info}/PKG-INFO +182 -20
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/quantology_modelmaker.egg-info/SOURCES.txt +85 -1
- quantology_modelmaker-0.3.0/quantology_modelmaker.egg-info/entry_points.txt +7 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/quantology_modelmaker.egg-info/requires.txt +2 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/setup.py +26 -5
- quantology_modelmaker-0.3.0/tests/test_agent_api.py +339 -0
- quantology_modelmaker-0.3.0/tests/test_agent_build.py +1327 -0
- quantology_modelmaker-0.3.0/tests/test_agent_foundations.py +295 -0
- quantology_modelmaker-0.3.0/tests/test_agent_hints.py +362 -0
- quantology_modelmaker-0.3.0/tests/test_agent_leakage.py +188 -0
- quantology_modelmaker-0.3.0/tests/test_agent_loops.py +453 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_api.py +99 -41
- quantology_modelmaker-0.3.0/tests/test_assistant_mcp.py +150 -0
- quantology_modelmaker-0.3.0/tests/test_binning.py +204 -0
- quantology_modelmaker-0.3.0/tests/test_block_library.py +593 -0
- quantology_modelmaker-0.3.0/tests/test_cache.py +204 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_compiler.py +88 -37
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_data_quality.py +5 -4
- quantology_modelmaker-0.3.0/tests/test_datasets.py +427 -0
- quantology_modelmaker-0.3.0/tests/test_demo_data.py +164 -0
- quantology_modelmaker-0.3.0/tests/test_display_blocks.py +247 -0
- quantology_modelmaker-0.3.0/tests/test_embedding.py +325 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_env_vars.py +14 -15
- quantology_modelmaker-0.3.0/tests/test_execution_agent.py +487 -0
- quantology_modelmaker-0.3.0/tests/test_execution_executor.py +202 -0
- quantology_modelmaker-0.3.0/tests/test_execution_limits.py +312 -0
- quantology_modelmaker-0.3.0/tests/test_execution_security.py +257 -0
- quantology_modelmaker-0.3.0/tests/test_execution_wire.py +298 -0
- quantology_modelmaker-0.3.0/tests/test_features.py +180 -0
- quantology_modelmaker-0.3.0/tests/test_forms.py +94 -0
- quantology_modelmaker-0.3.0/tests/test_hosting_hooks.py +295 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_input_blocks.py +5 -4
- quantology_modelmaker-0.3.0/tests/test_library.py +32 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_llm.py +64 -85
- quantology_modelmaker-0.3.0/tests/test_llm_connections.py +77 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_master_scale.py +56 -1
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_modelling.py +15 -0
- quantology_modelmaker-0.3.0/tests/test_no_exec_in_api.py +416 -0
- quantology_modelmaker-0.3.0/tests/test_prep_blocks.py +145 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_project.py +3 -3
- quantology_modelmaker-0.3.0/tests/test_risk_parameter_blocks.py +392 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_runner.py +60 -27
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_session.py +8 -5
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_stochastic_runner.py +1 -1
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_tui_app.py +86 -47
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_tui_charts.py +2 -2
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_tui_client.py +41 -0
- quantology_modelmaker-0.3.0/tests/test_validation_blocks.py +98 -0
- quantology_modelmaker-0.3.0/tests/test_workspaces.py +347 -0
- quantology_modelmaker-0.1.2/frontend/.oxlintrc.json +0 -8
- quantology_modelmaker-0.1.2/frontend/src/BlockNode.tsx +0 -199
- quantology_modelmaker-0.1.2/frontend/src/CodeEditor.tsx +0 -87
- quantology_modelmaker-0.1.2/frontend/src/Palette.tsx +0 -185
- quantology_modelmaker-0.1.2/frontend/src/ParamsForm.tsx +0 -413
- quantology_modelmaker-0.1.2/frontend/src/Toolbar.tsx +0 -333
- quantology_modelmaker-0.1.2/frontend/src/index.css +0 -91
- quantology_modelmaker-0.1.2/frontend/src/main.tsx +0 -10
- quantology_modelmaker-0.1.2/frontend/src/types.ts +0 -251
- quantology_modelmaker-0.1.2/frontend/vite.config.ts +0 -20
- quantology_modelmaker-0.1.2/modelmaker/__init__.py +0 -2
- quantology_modelmaker-0.1.2/modelmaker/api.py +0 -1468
- quantology_modelmaker-0.1.2/modelmaker/blocks/base.py +0 -92
- quantology_modelmaker-0.1.2/modelmaker/blocks/feature_analysis.py +0 -140
- quantology_modelmaker-0.1.2/modelmaker/blocks/library.py +0 -453
- quantology_modelmaker-0.1.2/modelmaker/blocks/modelling.py +0 -609
- quantology_modelmaker-0.1.2/modelmaker/blocks/stat_tests.py +0 -312
- quantology_modelmaker-0.1.2/modelmaker/cache.py +0 -44
- quantology_modelmaker-0.1.2/modelmaker/metadata_transforms.py +0 -109
- quantology_modelmaker-0.1.2/modelmaker/tui/paramspecs.py +0 -157
- quantology_modelmaker-0.1.2/quantology_modelmaker.egg-info/entry_points.txt +0 -3
- quantology_modelmaker-0.1.2/tests/test_library.py +0 -31
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/LICENSE +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/NOTICE +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/.gitignore +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/.npmrc +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/README.md +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/index.html +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/public/brand-quantology/favicon.svg +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/public/brand-quantology/icon-mark-light.svg +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/public/icons.svg +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/DataWireEdge.tsx +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/assets/hero.png +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/assets/react.svg +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/src/assets/vite.svg +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/tsconfig.app.json +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/tsconfig.json +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/frontend/tsconfig.node.json +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/blocks/__init__.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/packet.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/stochastic/__init__.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/stochastic/accumulate.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/stochastic/credit.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/stochastic/dependency.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/stochastic/proxy.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/stochastic/seed.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/stochastic/var_covar.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/tui/__init__.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/tui/charts.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/tui/preview.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/modelmaker/tui/screens.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/quantology_modelmaker.egg-info/dependency_links.txt +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/quantology_modelmaker.egg-info/top_level.txt +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/run.bat +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/setup.cfg +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_demo_project.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_feature_analysis.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_gitops.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_graph.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_packet.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_runner_streaming.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_stat_tests.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_stochastic_blocks.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_stochastic_core.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_stochastic_credit.py +0 -0
- {quantology_modelmaker-0.1.2 → quantology_modelmaker-0.3.0}/tests/test_stochastic_fan_out.py +0 -0
{quantology_modelmaker-0.1.2/quantology_modelmaker.egg-info → quantology_modelmaker-0.3.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantology-modelmaker
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Visual pipeline builder for financial model development
|
|
5
5
|
Author-email: Maurits Malkus <10948172+mmalkus@users.noreply.github.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -28,8 +28,10 @@ Requires-Dist: scikit-learn>=1.4.0
|
|
|
28
28
|
Requires-Dist: scipy>=1.11.0
|
|
29
29
|
Requires-Dist: numpy>=1.26.0
|
|
30
30
|
Requires-Dist: python-dotenv>=1.0.0
|
|
31
|
+
Requires-Dist: mcp<2,>=1.0.0
|
|
31
32
|
Provides-Extra: dev
|
|
32
33
|
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-xdist>=3.5.0; extra == "dev"
|
|
33
35
|
Requires-Dist: httpx>=0.27.0; extra == "dev"
|
|
34
36
|
Requires-Dist: fastexcel>=0.10.0; extra == "dev"
|
|
35
37
|
Requires-Dist: xlsxwriter>=3.0.0; extra == "dev"
|
|
@@ -51,8 +53,9 @@ Dynamic: license-file
|
|
|
51
53
|
# Model-Maker
|
|
52
54
|
|
|
53
55
|
A visual pipeline builder for financial model development in Python, with
|
|
54
|
-
both a web GUI and a terminal UI,
|
|
55
|
-
|
|
56
|
+
both a web GUI and a terminal UI, a block library you can extend (by hand or
|
|
57
|
+
with AI), and an embedded, pluggable AI provider that can draft and fix
|
|
58
|
+
blocks for you. Blocks contain functional Python
|
|
56
59
|
code, are wired together via Polars DataFrames carrying metadata,
|
|
57
60
|
organized visually into phase-labelled swimlanes, and compile down to a
|
|
58
61
|
single, human-readable, self-contained Python script.
|
|
@@ -61,7 +64,7 @@ See [`modelmaker-v2-plan.md`](modelmaker-v2-plan.md) for the full design.
|
|
|
61
64
|
|
|
62
65
|
The project has two parts:
|
|
63
66
|
|
|
64
|
-
- **`modelmaker/`** — the Python backend: block
|
|
67
|
+
- **`modelmaker/`** — the Python backend: block files and the block library, graph/session
|
|
65
68
|
model, execution runner, single-file compiler, pluggable AI-assisted
|
|
66
69
|
block drafting, a FastAPI HTTP API, and a Textual-based terminal UI
|
|
67
70
|
(`modelmaker-tui`, see [Terminal UI](#terminal-ui)).
|
|
@@ -101,12 +104,49 @@ it. It creates a `.venv` next to itself if missing, installs/upgrades
|
|
|
101
104
|
`quantology-modelmaker` into it, and starts `modelmaker-api` at
|
|
102
105
|
`http://127.0.0.1:8001`. Safe to re-run any time to pick up updates.
|
|
103
106
|
|
|
107
|
+
## VS Code
|
|
108
|
+
|
|
109
|
+
The extension in [`vscode/`](vscode/README.md) opens a project's
|
|
110
|
+
`model.json` as the canvas in an editor tab. It starts the same
|
|
111
|
+
`modelmaker-api` from the selected Python interpreter, one backend per
|
|
112
|
+
open project, and offers to `pip install` the package if it's missing. It
|
|
113
|
+
can also offer your GitHub Copilot models as the `copilot` AI provider.
|
|
114
|
+
The pip package works on its own exactly as described here; the extension
|
|
115
|
+
is another way to run it. See
|
|
116
|
+
[`vscode-extension-plan.md`](vscode-extension-plan.md) for the design and
|
|
117
|
+
[`docs/releasing.md`](docs/releasing.md) for how a release ships both.
|
|
118
|
+
|
|
119
|
+
Develop it with:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
pip install -e .
|
|
123
|
+
(cd frontend && npm ci && npm run build:vscode) # the canvas, into vscode/media/webview
|
|
124
|
+
cd vscode && npm ci && npm run build
|
|
125
|
+
code --extensionDevelopmentPath="$PWD" path/to/workspace
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Claude Code and other MCP clients
|
|
129
|
+
|
|
130
|
+
`modelmaker-mcp` gives an MCP client the tools to build a model on an open
|
|
131
|
+
canvas: open or create a project, find the data, add lanes and blocks,
|
|
132
|
+
wire, run, check for leakage and compile. Each edit goes into the canvas's
|
|
133
|
+
undo history and shows up on the canvas within a couple of seconds.
|
|
134
|
+
Assistants see schemas and summary statistics, never your data's rows.
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
modelmaker-api # the canvas, in a browser
|
|
138
|
+
claude mcp add modelmaker -- modelmaker-mcp --url http://127.0.0.1:8001
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Inside VS Code, the extension's **Model-Maker: Set Up Claude Code** does
|
|
142
|
+
the setup, and the tools work on the canvas you used last.
|
|
143
|
+
|
|
104
144
|
## Projects
|
|
105
145
|
|
|
106
146
|
A project is a folder, not a file: **Save**/**Load** browse for a folder
|
|
107
147
|
rather than a filename, and a folder is a project once it holds a
|
|
108
|
-
`model.json` (everything else in it -- `files/`, a `.gitignore`,
|
|
109
|
-
|
|
148
|
+
`model.json` (everything else in it -- `files/`, a `.gitignore`, the code
|
|
149
|
+
of the library blocks it uses in `blocks/` -- is the project's own working area, versioned
|
|
110
150
|
alongside it). Saving for the first time scaffolds that folder (see
|
|
111
151
|
[The demo project](#the-demo-project) for an example) and git-inits it, so
|
|
112
152
|
it's ready to commit and push right away from the **Git** panel.
|
|
@@ -114,16 +154,38 @@ it's ready to commit and push right away from the **Git** panel.
|
|
|
114
154
|
## The demo project
|
|
115
155
|
|
|
116
156
|
[`projects/demo_pd_model/`](projects/demo_pd_model) is a complete, runnable
|
|
117
|
-
PD pipeline
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
then **Run all** — it reads the CSV source itself since it's never been read
|
|
121
|
-
before, then runs the rest of the pipeline.
|
|
157
|
+
PD pipeline: load demo data → clean → weight-of-evidence → train/test
|
|
158
|
+
split → logistic regression → Gini, KS and PSI. Open it with **Load** (it's
|
|
159
|
+
what the folder dialog opens on), then **Run all**.
|
|
122
160
|
|
|
123
161
|
It's the quickest way to see what a finished graph looks like, and the test
|
|
124
|
-
suite runs it end to end so it can't rot.
|
|
125
|
-
|
|
126
|
-
|
|
162
|
+
suite runs it end to end so it can't rot.
|
|
163
|
+
|
|
164
|
+
Its data comes from the **Demo credit data (PD/LGD/CCF)** input block,
|
|
165
|
+
which generates a synthetic retail book of term loans and credit cards in
|
|
166
|
+
memory: no file to find, and it works the same from a repo clone or a
|
|
167
|
+
`pip install`. It is built to support all three credit-risk parameters: a
|
|
168
|
+
12-month default flag for **PD**, EAD / discounted recoveries / workout
|
|
169
|
+
costs on every default for **LGD** (`compute_lgd`), and limit plus balance
|
|
170
|
+
at reference and at default on defaulted cards for **CCF**
|
|
171
|
+
(`compute_ccf`). Set **n_rows** for the number of records (default 5,000)
|
|
172
|
+
and **seed** to get different data; the same seed always gives the same
|
|
173
|
+
rows. The generator is [`modelmaker/demo_data.py`](modelmaker/demo_data.py),
|
|
174
|
+
whose docstring describes every column. To get the data as a CSV instead:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
python -m modelmaker.demo_data credit_risk_data.csv --rows 10000
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
After a `pip install`, copy the demo projects somewhere writable (projects
|
|
181
|
+
save back into their own folder) with:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
modelmaker-demo # creates ./modelmaker-demo/projects/
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
then run `modelmaker-api` (or `modelmaker-tui`) from inside that folder.
|
|
188
|
+
`modelmaker-tui --demo` does both steps in one go.
|
|
127
189
|
|
|
128
190
|
## Working in the tool
|
|
129
191
|
|
|
@@ -157,9 +219,14 @@ A few things worth knowing beyond the canvas itself.
|
|
|
157
219
|
it started, so you can keep editing (or undo, or toggle sample mode) while
|
|
158
220
|
a long sweep executes. The run finishes against its own version; anything
|
|
159
221
|
you changed in the meantime simply shows as stale afterwards, saying so.
|
|
160
|
-
- **
|
|
161
|
-
(
|
|
162
|
-
|
|
222
|
+
- **Block library** — **Library** in the palette opens your own blocks
|
|
223
|
+
(`~/.modelmaker/blocks/`, or `MODELMAKER_BLOCK_LIBRARY`): plain `.py`
|
|
224
|
+
files, one or more blocks each. Browse, edit (a real code editor with a
|
|
225
|
+
live validity check and **Try it**), import and export them, or
|
|
226
|
+
**✦ Create with AI** from a description. Placed blocks keep their own
|
|
227
|
+
copy and offer **Update** when the library moves on. See
|
|
228
|
+
[docs/block-authoring.md](docs/block-authoring.md); `modelmaker
|
|
229
|
+
check-blocks` validates a library and runs its self-checks (for CI).
|
|
163
230
|
|
|
164
231
|
## Terminal UI
|
|
165
232
|
|
|
@@ -176,6 +243,7 @@ can be saved to a `.txt`/`.html` file alongside the block's own PNG.
|
|
|
176
243
|
```bash
|
|
177
244
|
modelmaker-tui # spawns its own modelmaker-api, zero setup
|
|
178
245
|
modelmaker-tui projects/demo_pd_model # ...and loads a project (a folder) on startup
|
|
246
|
+
modelmaker-tui --demo # ...or sets up ./modelmaker-demo and opens the demo there
|
|
179
247
|
modelmaker-tui --host 127.0.0.1 --port 8001 # attach to an already-running modelmaker-api instead
|
|
180
248
|
```
|
|
181
249
|
|
|
@@ -210,6 +278,7 @@ AI-assisted block drafting ("Draft with AI", suggest-a-fix) is pluggable:
|
|
|
210
278
|
| OpenAI API / OpenAI-compatible endpoint | `openai` | An API key (Settings, or `OPENAI_API_KEY`) and a model id. Defaults to `https://api.openai.com/v1`, but the base URL is configurable — point it at Groq, Together, OpenRouter, Fireworks, Azure OpenAI's `/openai` surface, or a self-hosted vLLM/text-generation-webui server instead |
|
|
211
279
|
| Google Gemini API | `gemini` | An API key (Settings, or `GEMINI_API_KEY` / `GOOGLE_API_KEY`) and a model id, e.g. `gemini-2.5-pro` |
|
|
212
280
|
| LM Studio (local) | `lmstudio` | LM Studio running with its local server started (Developer tab → Start Server) and a model loaded |
|
|
281
|
+
| GitHub Copilot | `copilot` | Only inside VS Code, through the [extension](#vs-code)'s relay, with Copilot signed in |
|
|
213
282
|
| Stub (no network, deterministic) | `stub` | none — used by default in tests |
|
|
214
283
|
|
|
215
284
|
The `openai` and `gemini` providers talk plain HTTPS via the standard
|
|
@@ -252,21 +321,114 @@ export MODELMAKER_LLM_MODEL=gpt-5.1
|
|
|
252
321
|
modelmaker-api
|
|
253
322
|
```
|
|
254
323
|
|
|
324
|
+
## Build with AI
|
|
325
|
+
|
|
326
|
+
Beyond drafting one block at a time, an AI can plan and build a whole model
|
|
327
|
+
graph for you (design: [agent-builder-proposal.md](agent-builder-proposal.md)):
|
|
328
|
+
|
|
329
|
+
1. **Prepare the data yourself.** Add your input block(s), run them, and tag
|
|
330
|
+
column roles in the port inspector: at least `target`, plus `excluded`
|
|
331
|
+
for anything that must never become a feature (leaky or post-outcome
|
|
332
|
+
columns). The AI never picks files or touches credentials.
|
|
333
|
+
2. **Select** those blocks (shift-click for several), click **Build with AI**
|
|
334
|
+
and describe the goal.
|
|
335
|
+
3. **Preflight** checks the selected blocks and everything upstream of them.
|
|
336
|
+
Blocks that aren't up to date get a warning, with **Run upstream** to fix
|
|
337
|
+
them or **Proceed anyway**.
|
|
338
|
+
4. **Review the plan.** It appears as ghost blocks on the canvas and as a
|
|
339
|
+
list in the panel. Nothing changes until you approve. Send feedback to
|
|
340
|
+
have it re-plan.
|
|
341
|
+
5. **Watch it build.** It adds blocks, runs each one, reads their summary
|
|
342
|
+
statistics, fixes failures, and asks you when it's stuck. The canvas is
|
|
343
|
+
read-only for you meanwhile. A large dataset is built on a sample, then
|
|
344
|
+
the whole graph runs once on the full data.
|
|
345
|
+
6. **Read the report** with **Open full report** in the panel. Every
|
|
346
|
+
build keeps its own report, listed under **Build reports**. AI-built
|
|
347
|
+
blocks carry an **AI** badge; click it to see the provenance record
|
|
348
|
+
(build, LLMs, time, whether a person has edited the block since) and
|
|
349
|
+
open the report of each build that made or changed it. **One Undo
|
|
350
|
+
reverts the whole build**, its report included.
|
|
351
|
+
|
|
352
|
+
Guardrails are enforced by the tools, not just the prompt:
|
|
353
|
+
- **No rows.** The AI only ever sees column names, dtypes, roles and
|
|
354
|
+
summary statistics. The min/max of text and id columns are withheld too,
|
|
355
|
+
for every AI feature.
|
|
356
|
+
- **Your blocks stay yours.** It can read and wire *from* your blocks, but
|
|
357
|
+
it only changes blocks it created, plus changes to existing blocks that
|
|
358
|
+
the plan listed and you approved.
|
|
359
|
+
- **Excluded means excluded.** Columns tagged `excluded` are refused as
|
|
360
|
+
features.
|
|
361
|
+
- **Your library is part of the toolbox.** The build can use your library
|
|
362
|
+
blocks, including ones earlier builds created, alongside the built-ins.
|
|
363
|
+
When nothing fits, it writes a new block to `drafts/` in your block
|
|
364
|
+
library, where you keep or discard it.
|
|
365
|
+
- **Limits.** Tool calls, new blocks, repeated failures and wall time
|
|
366
|
+
are all capped.
|
|
367
|
+
|
|
368
|
+
Builds run on `claude_cli` (your existing Claude login, via a small MCP
|
|
369
|
+
bridge), `anthropic`, `openai` (or any OpenAI-compatible endpoint that
|
|
370
|
+
supports tool calling, via its base URL), `gemini`, or `lmstudio`. They use
|
|
371
|
+
the same keys, models and base URLs as in the LLM provider settings above.
|
|
372
|
+
**Settings → AI builder** picks a separate plan LLM and build LLM, and each
|
|
373
|
+
build can override them.
|
|
374
|
+
|
|
375
|
+
`lmstudio` covers any local OpenAI-compatible server: LM Studio, or
|
|
376
|
+
llama.cpp's `llama-server` (start it with `--jinja`, which tool calling
|
|
377
|
+
needs), Ollama's `/v1`, or vLLM. The model is auto-detected when unset.
|
|
378
|
+
Local models get a compact prompt, where the block catalogue is block names
|
|
379
|
+
per category and details are fetched on demand. They also get length caps
|
|
380
|
+
on tool results, and older results are dropped when the conversation nears
|
|
381
|
+
the context window. The window size is read from the server (llama.cpp
|
|
382
|
+
reports it) or set with `MODELMAKER_LLM_CONTEXT_TOKENS`. Expect a local
|
|
383
|
+
build to take a while; `MODELMAKER_LLM_TIMEOUT_SECONDS` (default 900 for
|
|
384
|
+
local models) caps a single request.
|
|
385
|
+
|
|
386
|
+
Two **Settings → AI builder** switches help small models:
|
|
387
|
+
- **Small context** starts each build stage in a fresh conversation,
|
|
388
|
+
carrying only the outline, what's built and the decisions so far.
|
|
389
|
+
- **Decision hints** adds a short, rule-based recommendation (`next`) to the
|
|
390
|
+
results the build has to judge, so the model reads a recommendation
|
|
391
|
+
rather than a statistics table. For example:
|
|
392
|
+
- **Data:** empty, constant or id-like columns; exclusion rules that drop
|
|
393
|
+
a lot or nothing; failed data-quality rules; samples with too few
|
|
394
|
+
events or a different event rate.
|
|
395
|
+
- **Features:** candidates, no-signal and likely-leakage features by IV;
|
|
396
|
+
correlated pairs and high VIFs; unstable features; an immature last
|
|
397
|
+
period.
|
|
398
|
+
- **Fits:** wrong-sign (WoE) or insignificant coefficients; a fit that
|
|
399
|
+
didn't converge; the stepwise selection to use; a large calibration
|
|
400
|
+
shift; non-monotonic or thin rating grades; a short long-run history.
|
|
401
|
+
- **Validation:** Gini, KS, Hosmer-Lemeshow, LGD/CCF accuracy and bucket
|
|
402
|
+
calibration, PSI, train/test drops and the grade back-test each get a
|
|
403
|
+
verdict.
|
|
404
|
+
- **Stochastic:** a poor distribution fit; an inaccurate proxy. Departing
|
|
405
|
+
from a hint is allowed, but the model must say why with a recorded
|
|
406
|
+
deviation. The thresholds are the usual credit-risk rules of thumb, in
|
|
407
|
+
[`modelmaker/agent/hints.py`](modelmaker/agent/hints.py).
|
|
408
|
+
|
|
255
409
|
## Project structure
|
|
256
410
|
|
|
257
411
|
```
|
|
258
412
|
modelmaker/
|
|
259
413
|
api.py FastAPI app and HTTP routes
|
|
260
|
-
blocks/
|
|
414
|
+
blocks/ Built-in block files (data, modelling, stat tests, ...) and the new-block template
|
|
415
|
+
block_library.py Parses and validates block files (BLOCKS literal + functions)
|
|
416
|
+
library_store.py The user's block library folder: list, save, import/export, AI drafts
|
|
417
|
+
library_ai.py Create with AI: drafts a library block through the validator
|
|
418
|
+
sources.py Change detection for input blocks, from their form fields
|
|
419
|
+
metadata_transforms.py Column roles for every block, from its declared "meta" rules
|
|
261
420
|
llm/ Pluggable LLM providers for AI-assisted drafting
|
|
421
|
+
agent/ AI model builder: tools, guards, build lifecycle, loops, MCP bridge
|
|
262
422
|
graph.py Graph/block/wire data model
|
|
263
423
|
session.py Mutable project session wrapping the graph + runner
|
|
264
424
|
runner.py Block execution + caching engine
|
|
265
425
|
compiler.py Compiles a graph to a single Python script
|
|
426
|
+
demo_data.py Fixed-seed generator for the PD/LGD/CCF demo dataset
|
|
266
427
|
packet.py DataFramePacket: the typed value flowing over wires
|
|
267
428
|
project.py Load/save project files (JSON + block source files)
|
|
268
429
|
static/ Built frontend bundle (generated, gitignored)
|
|
269
|
-
frontend/ React + Vite UI
|
|
430
|
+
frontend/ React + Vite UI (npm run build -> modelmaker/static; npm run build:vscode -> vscode/media/webview)
|
|
431
|
+
vscode/ VS Code extension: custom editor, backend manager, Copilot relay
|
|
270
432
|
tests/ Pytest suite for the backend
|
|
271
|
-
sample_data/ Example CSVs
|
|
433
|
+
sample_data/ Example CSVs (tests also write a generated credit_risk_data.csv here, gitignored)
|
|
272
434
|
```
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Model-Maker
|
|
2
2
|
|
|
3
3
|
A visual pipeline builder for financial model development in Python, with
|
|
4
|
-
both a web GUI and a terminal UI,
|
|
5
|
-
|
|
4
|
+
both a web GUI and a terminal UI, a block library you can extend (by hand or
|
|
5
|
+
with AI), and an embedded, pluggable AI provider that can draft and fix
|
|
6
|
+
blocks for you. Blocks contain functional Python
|
|
6
7
|
code, are wired together via Polars DataFrames carrying metadata,
|
|
7
8
|
organized visually into phase-labelled swimlanes, and compile down to a
|
|
8
9
|
single, human-readable, self-contained Python script.
|
|
@@ -11,7 +12,7 @@ See [`modelmaker-v2-plan.md`](modelmaker-v2-plan.md) for the full design.
|
|
|
11
12
|
|
|
12
13
|
The project has two parts:
|
|
13
14
|
|
|
14
|
-
- **`modelmaker/`** — the Python backend: block
|
|
15
|
+
- **`modelmaker/`** — the Python backend: block files and the block library, graph/session
|
|
15
16
|
model, execution runner, single-file compiler, pluggable AI-assisted
|
|
16
17
|
block drafting, a FastAPI HTTP API, and a Textual-based terminal UI
|
|
17
18
|
(`modelmaker-tui`, see [Terminal UI](#terminal-ui)).
|
|
@@ -51,12 +52,49 @@ it. It creates a `.venv` next to itself if missing, installs/upgrades
|
|
|
51
52
|
`quantology-modelmaker` into it, and starts `modelmaker-api` at
|
|
52
53
|
`http://127.0.0.1:8001`. Safe to re-run any time to pick up updates.
|
|
53
54
|
|
|
55
|
+
## VS Code
|
|
56
|
+
|
|
57
|
+
The extension in [`vscode/`](vscode/README.md) opens a project's
|
|
58
|
+
`model.json` as the canvas in an editor tab. It starts the same
|
|
59
|
+
`modelmaker-api` from the selected Python interpreter, one backend per
|
|
60
|
+
open project, and offers to `pip install` the package if it's missing. It
|
|
61
|
+
can also offer your GitHub Copilot models as the `copilot` AI provider.
|
|
62
|
+
The pip package works on its own exactly as described here; the extension
|
|
63
|
+
is another way to run it. See
|
|
64
|
+
[`vscode-extension-plan.md`](vscode-extension-plan.md) for the design and
|
|
65
|
+
[`docs/releasing.md`](docs/releasing.md) for how a release ships both.
|
|
66
|
+
|
|
67
|
+
Develop it with:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pip install -e .
|
|
71
|
+
(cd frontend && npm ci && npm run build:vscode) # the canvas, into vscode/media/webview
|
|
72
|
+
cd vscode && npm ci && npm run build
|
|
73
|
+
code --extensionDevelopmentPath="$PWD" path/to/workspace
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Claude Code and other MCP clients
|
|
77
|
+
|
|
78
|
+
`modelmaker-mcp` gives an MCP client the tools to build a model on an open
|
|
79
|
+
canvas: open or create a project, find the data, add lanes and blocks,
|
|
80
|
+
wire, run, check for leakage and compile. Each edit goes into the canvas's
|
|
81
|
+
undo history and shows up on the canvas within a couple of seconds.
|
|
82
|
+
Assistants see schemas and summary statistics, never your data's rows.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
modelmaker-api # the canvas, in a browser
|
|
86
|
+
claude mcp add modelmaker -- modelmaker-mcp --url http://127.0.0.1:8001
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Inside VS Code, the extension's **Model-Maker: Set Up Claude Code** does
|
|
90
|
+
the setup, and the tools work on the canvas you used last.
|
|
91
|
+
|
|
54
92
|
## Projects
|
|
55
93
|
|
|
56
94
|
A project is a folder, not a file: **Save**/**Load** browse for a folder
|
|
57
95
|
rather than a filename, and a folder is a project once it holds a
|
|
58
|
-
`model.json` (everything else in it -- `files/`, a `.gitignore`,
|
|
59
|
-
|
|
96
|
+
`model.json` (everything else in it -- `files/`, a `.gitignore`, the code
|
|
97
|
+
of the library blocks it uses in `blocks/` -- is the project's own working area, versioned
|
|
60
98
|
alongside it). Saving for the first time scaffolds that folder (see
|
|
61
99
|
[The demo project](#the-demo-project) for an example) and git-inits it, so
|
|
62
100
|
it's ready to commit and push right away from the **Git** panel.
|
|
@@ -64,16 +102,38 @@ it's ready to commit and push right away from the **Git** panel.
|
|
|
64
102
|
## The demo project
|
|
65
103
|
|
|
66
104
|
[`projects/demo_pd_model/`](projects/demo_pd_model) is a complete, runnable
|
|
67
|
-
PD pipeline
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
then **Run all** — it reads the CSV source itself since it's never been read
|
|
71
|
-
before, then runs the rest of the pipeline.
|
|
105
|
+
PD pipeline: load demo data → clean → weight-of-evidence → train/test
|
|
106
|
+
split → logistic regression → Gini, KS and PSI. Open it with **Load** (it's
|
|
107
|
+
what the folder dialog opens on), then **Run all**.
|
|
72
108
|
|
|
73
109
|
It's the quickest way to see what a finished graph looks like, and the test
|
|
74
|
-
suite runs it end to end so it can't rot.
|
|
75
|
-
|
|
76
|
-
|
|
110
|
+
suite runs it end to end so it can't rot.
|
|
111
|
+
|
|
112
|
+
Its data comes from the **Demo credit data (PD/LGD/CCF)** input block,
|
|
113
|
+
which generates a synthetic retail book of term loans and credit cards in
|
|
114
|
+
memory: no file to find, and it works the same from a repo clone or a
|
|
115
|
+
`pip install`. It is built to support all three credit-risk parameters: a
|
|
116
|
+
12-month default flag for **PD**, EAD / discounted recoveries / workout
|
|
117
|
+
costs on every default for **LGD** (`compute_lgd`), and limit plus balance
|
|
118
|
+
at reference and at default on defaulted cards for **CCF**
|
|
119
|
+
(`compute_ccf`). Set **n_rows** for the number of records (default 5,000)
|
|
120
|
+
and **seed** to get different data; the same seed always gives the same
|
|
121
|
+
rows. The generator is [`modelmaker/demo_data.py`](modelmaker/demo_data.py),
|
|
122
|
+
whose docstring describes every column. To get the data as a CSV instead:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
python -m modelmaker.demo_data credit_risk_data.csv --rows 10000
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
After a `pip install`, copy the demo projects somewhere writable (projects
|
|
129
|
+
save back into their own folder) with:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
modelmaker-demo # creates ./modelmaker-demo/projects/
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
then run `modelmaker-api` (or `modelmaker-tui`) from inside that folder.
|
|
136
|
+
`modelmaker-tui --demo` does both steps in one go.
|
|
77
137
|
|
|
78
138
|
## Working in the tool
|
|
79
139
|
|
|
@@ -107,9 +167,14 @@ A few things worth knowing beyond the canvas itself.
|
|
|
107
167
|
it started, so you can keep editing (or undo, or toggle sample mode) while
|
|
108
168
|
a long sweep executes. The run finishes against its own version; anything
|
|
109
169
|
you changed in the meantime simply shows as stale afterwards, saying so.
|
|
110
|
-
- **
|
|
111
|
-
(
|
|
112
|
-
|
|
170
|
+
- **Block library** — **Library** in the palette opens your own blocks
|
|
171
|
+
(`~/.modelmaker/blocks/`, or `MODELMAKER_BLOCK_LIBRARY`): plain `.py`
|
|
172
|
+
files, one or more blocks each. Browse, edit (a real code editor with a
|
|
173
|
+
live validity check and **Try it**), import and export them, or
|
|
174
|
+
**✦ Create with AI** from a description. Placed blocks keep their own
|
|
175
|
+
copy and offer **Update** when the library moves on. See
|
|
176
|
+
[docs/block-authoring.md](docs/block-authoring.md); `modelmaker
|
|
177
|
+
check-blocks` validates a library and runs its self-checks (for CI).
|
|
113
178
|
|
|
114
179
|
## Terminal UI
|
|
115
180
|
|
|
@@ -126,6 +191,7 @@ can be saved to a `.txt`/`.html` file alongside the block's own PNG.
|
|
|
126
191
|
```bash
|
|
127
192
|
modelmaker-tui # spawns its own modelmaker-api, zero setup
|
|
128
193
|
modelmaker-tui projects/demo_pd_model # ...and loads a project (a folder) on startup
|
|
194
|
+
modelmaker-tui --demo # ...or sets up ./modelmaker-demo and opens the demo there
|
|
129
195
|
modelmaker-tui --host 127.0.0.1 --port 8001 # attach to an already-running modelmaker-api instead
|
|
130
196
|
```
|
|
131
197
|
|
|
@@ -160,6 +226,7 @@ AI-assisted block drafting ("Draft with AI", suggest-a-fix) is pluggable:
|
|
|
160
226
|
| OpenAI API / OpenAI-compatible endpoint | `openai` | An API key (Settings, or `OPENAI_API_KEY`) and a model id. Defaults to `https://api.openai.com/v1`, but the base URL is configurable — point it at Groq, Together, OpenRouter, Fireworks, Azure OpenAI's `/openai` surface, or a self-hosted vLLM/text-generation-webui server instead |
|
|
161
227
|
| Google Gemini API | `gemini` | An API key (Settings, or `GEMINI_API_KEY` / `GOOGLE_API_KEY`) and a model id, e.g. `gemini-2.5-pro` |
|
|
162
228
|
| LM Studio (local) | `lmstudio` | LM Studio running with its local server started (Developer tab → Start Server) and a model loaded |
|
|
229
|
+
| GitHub Copilot | `copilot` | Only inside VS Code, through the [extension](#vs-code)'s relay, with Copilot signed in |
|
|
163
230
|
| Stub (no network, deterministic) | `stub` | none — used by default in tests |
|
|
164
231
|
|
|
165
232
|
The `openai` and `gemini` providers talk plain HTTPS via the standard
|
|
@@ -202,21 +269,114 @@ export MODELMAKER_LLM_MODEL=gpt-5.1
|
|
|
202
269
|
modelmaker-api
|
|
203
270
|
```
|
|
204
271
|
|
|
272
|
+
## Build with AI
|
|
273
|
+
|
|
274
|
+
Beyond drafting one block at a time, an AI can plan and build a whole model
|
|
275
|
+
graph for you (design: [agent-builder-proposal.md](agent-builder-proposal.md)):
|
|
276
|
+
|
|
277
|
+
1. **Prepare the data yourself.** Add your input block(s), run them, and tag
|
|
278
|
+
column roles in the port inspector: at least `target`, plus `excluded`
|
|
279
|
+
for anything that must never become a feature (leaky or post-outcome
|
|
280
|
+
columns). The AI never picks files or touches credentials.
|
|
281
|
+
2. **Select** those blocks (shift-click for several), click **Build with AI**
|
|
282
|
+
and describe the goal.
|
|
283
|
+
3. **Preflight** checks the selected blocks and everything upstream of them.
|
|
284
|
+
Blocks that aren't up to date get a warning, with **Run upstream** to fix
|
|
285
|
+
them or **Proceed anyway**.
|
|
286
|
+
4. **Review the plan.** It appears as ghost blocks on the canvas and as a
|
|
287
|
+
list in the panel. Nothing changes until you approve. Send feedback to
|
|
288
|
+
have it re-plan.
|
|
289
|
+
5. **Watch it build.** It adds blocks, runs each one, reads their summary
|
|
290
|
+
statistics, fixes failures, and asks you when it's stuck. The canvas is
|
|
291
|
+
read-only for you meanwhile. A large dataset is built on a sample, then
|
|
292
|
+
the whole graph runs once on the full data.
|
|
293
|
+
6. **Read the report** with **Open full report** in the panel. Every
|
|
294
|
+
build keeps its own report, listed under **Build reports**. AI-built
|
|
295
|
+
blocks carry an **AI** badge; click it to see the provenance record
|
|
296
|
+
(build, LLMs, time, whether a person has edited the block since) and
|
|
297
|
+
open the report of each build that made or changed it. **One Undo
|
|
298
|
+
reverts the whole build**, its report included.
|
|
299
|
+
|
|
300
|
+
Guardrails are enforced by the tools, not just the prompt:
|
|
301
|
+
- **No rows.** The AI only ever sees column names, dtypes, roles and
|
|
302
|
+
summary statistics. The min/max of text and id columns are withheld too,
|
|
303
|
+
for every AI feature.
|
|
304
|
+
- **Your blocks stay yours.** It can read and wire *from* your blocks, but
|
|
305
|
+
it only changes blocks it created, plus changes to existing blocks that
|
|
306
|
+
the plan listed and you approved.
|
|
307
|
+
- **Excluded means excluded.** Columns tagged `excluded` are refused as
|
|
308
|
+
features.
|
|
309
|
+
- **Your library is part of the toolbox.** The build can use your library
|
|
310
|
+
blocks, including ones earlier builds created, alongside the built-ins.
|
|
311
|
+
When nothing fits, it writes a new block to `drafts/` in your block
|
|
312
|
+
library, where you keep or discard it.
|
|
313
|
+
- **Limits.** Tool calls, new blocks, repeated failures and wall time
|
|
314
|
+
are all capped.
|
|
315
|
+
|
|
316
|
+
Builds run on `claude_cli` (your existing Claude login, via a small MCP
|
|
317
|
+
bridge), `anthropic`, `openai` (or any OpenAI-compatible endpoint that
|
|
318
|
+
supports tool calling, via its base URL), `gemini`, or `lmstudio`. They use
|
|
319
|
+
the same keys, models and base URLs as in the LLM provider settings above.
|
|
320
|
+
**Settings → AI builder** picks a separate plan LLM and build LLM, and each
|
|
321
|
+
build can override them.
|
|
322
|
+
|
|
323
|
+
`lmstudio` covers any local OpenAI-compatible server: LM Studio, or
|
|
324
|
+
llama.cpp's `llama-server` (start it with `--jinja`, which tool calling
|
|
325
|
+
needs), Ollama's `/v1`, or vLLM. The model is auto-detected when unset.
|
|
326
|
+
Local models get a compact prompt, where the block catalogue is block names
|
|
327
|
+
per category and details are fetched on demand. They also get length caps
|
|
328
|
+
on tool results, and older results are dropped when the conversation nears
|
|
329
|
+
the context window. The window size is read from the server (llama.cpp
|
|
330
|
+
reports it) or set with `MODELMAKER_LLM_CONTEXT_TOKENS`. Expect a local
|
|
331
|
+
build to take a while; `MODELMAKER_LLM_TIMEOUT_SECONDS` (default 900 for
|
|
332
|
+
local models) caps a single request.
|
|
333
|
+
|
|
334
|
+
Two **Settings → AI builder** switches help small models:
|
|
335
|
+
- **Small context** starts each build stage in a fresh conversation,
|
|
336
|
+
carrying only the outline, what's built and the decisions so far.
|
|
337
|
+
- **Decision hints** adds a short, rule-based recommendation (`next`) to the
|
|
338
|
+
results the build has to judge, so the model reads a recommendation
|
|
339
|
+
rather than a statistics table. For example:
|
|
340
|
+
- **Data:** empty, constant or id-like columns; exclusion rules that drop
|
|
341
|
+
a lot or nothing; failed data-quality rules; samples with too few
|
|
342
|
+
events or a different event rate.
|
|
343
|
+
- **Features:** candidates, no-signal and likely-leakage features by IV;
|
|
344
|
+
correlated pairs and high VIFs; unstable features; an immature last
|
|
345
|
+
period.
|
|
346
|
+
- **Fits:** wrong-sign (WoE) or insignificant coefficients; a fit that
|
|
347
|
+
didn't converge; the stepwise selection to use; a large calibration
|
|
348
|
+
shift; non-monotonic or thin rating grades; a short long-run history.
|
|
349
|
+
- **Validation:** Gini, KS, Hosmer-Lemeshow, LGD/CCF accuracy and bucket
|
|
350
|
+
calibration, PSI, train/test drops and the grade back-test each get a
|
|
351
|
+
verdict.
|
|
352
|
+
- **Stochastic:** a poor distribution fit; an inaccurate proxy. Departing
|
|
353
|
+
from a hint is allowed, but the model must say why with a recorded
|
|
354
|
+
deviation. The thresholds are the usual credit-risk rules of thumb, in
|
|
355
|
+
[`modelmaker/agent/hints.py`](modelmaker/agent/hints.py).
|
|
356
|
+
|
|
205
357
|
## Project structure
|
|
206
358
|
|
|
207
359
|
```
|
|
208
360
|
modelmaker/
|
|
209
361
|
api.py FastAPI app and HTTP routes
|
|
210
|
-
blocks/
|
|
362
|
+
blocks/ Built-in block files (data, modelling, stat tests, ...) and the new-block template
|
|
363
|
+
block_library.py Parses and validates block files (BLOCKS literal + functions)
|
|
364
|
+
library_store.py The user's block library folder: list, save, import/export, AI drafts
|
|
365
|
+
library_ai.py Create with AI: drafts a library block through the validator
|
|
366
|
+
sources.py Change detection for input blocks, from their form fields
|
|
367
|
+
metadata_transforms.py Column roles for every block, from its declared "meta" rules
|
|
211
368
|
llm/ Pluggable LLM providers for AI-assisted drafting
|
|
369
|
+
agent/ AI model builder: tools, guards, build lifecycle, loops, MCP bridge
|
|
212
370
|
graph.py Graph/block/wire data model
|
|
213
371
|
session.py Mutable project session wrapping the graph + runner
|
|
214
372
|
runner.py Block execution + caching engine
|
|
215
373
|
compiler.py Compiles a graph to a single Python script
|
|
374
|
+
demo_data.py Fixed-seed generator for the PD/LGD/CCF demo dataset
|
|
216
375
|
packet.py DataFramePacket: the typed value flowing over wires
|
|
217
376
|
project.py Load/save project files (JSON + block source files)
|
|
218
377
|
static/ Built frontend bundle (generated, gitignored)
|
|
219
|
-
frontend/ React + Vite UI
|
|
378
|
+
frontend/ React + Vite UI (npm run build -> modelmaker/static; npm run build:vscode -> vscode/media/webview)
|
|
379
|
+
vscode/ VS Code extension: custom editor, backend manager, Copilot relay
|
|
220
380
|
tests/ Pytest suite for the backend
|
|
221
|
-
sample_data/ Example CSVs
|
|
381
|
+
sample_data/ Example CSVs (tests also write a generated credit_risk_data.csv here, gitignored)
|
|
222
382
|
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": [
|
|
4
|
+
"react",
|
|
5
|
+
"typescript",
|
|
6
|
+
"oxc"
|
|
7
|
+
],
|
|
8
|
+
"rules": {
|
|
9
|
+
"react/rules-of-hooks": "error",
|
|
10
|
+
"react/only-export-components": [
|
|
11
|
+
"warn",
|
|
12
|
+
{
|
|
13
|
+
"allowConstantExport": true
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"no-restricted-globals": [
|
|
17
|
+
"error",
|
|
18
|
+
{
|
|
19
|
+
"name": "alert",
|
|
20
|
+
"message": "Use host.notify() -- VS Code webviews block alert()."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "confirm",
|
|
24
|
+
"message": "Use await host.confirm() -- VS Code webviews block confirm()."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "prompt",
|
|
28
|
+
"message": "Use await host.prompt() -- VS Code webviews block prompt()."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "localStorage",
|
|
32
|
+
"message": "Use host.getState()/setState()."
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@codemirror/commands": "^6.11.0",
|
|
12
12
|
"@codemirror/lang-python": "^6.2.1",
|
|
13
|
+
"@codemirror/language": "^6.13.1",
|
|
13
14
|
"@codemirror/state": "^6.7.4",
|
|
14
15
|
"@codemirror/view": "^6.43.11",
|
|
16
|
+
"@lezer/highlight": "^1.2.5",
|
|
15
17
|
"@xyflow/react": "^12.11.6",
|
|
16
18
|
"codemirror": "^6.0.2",
|
|
17
19
|
"react": "^19.2.8",
|
|
@@ -65,12 +67,13 @@
|
|
|
65
67
|
}
|
|
66
68
|
},
|
|
67
69
|
"node_modules/@codemirror/language": {
|
|
68
|
-
"version": "6.
|
|
69
|
-
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.
|
|
70
|
-
"integrity": "sha512-
|
|
70
|
+
"version": "6.13.1",
|
|
71
|
+
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.13.1.tgz",
|
|
72
|
+
"integrity": "sha512-zfvU2r3TyylQLMj/te+5CnQ0rSqZi8B1oTCBbQkagcLW4Xc6imab6qN+pEJhsuNOLaJqiRyBXp9UhWA1DhVvDw==",
|
|
71
73
|
"license": "MIT",
|
|
72
74
|
"dependencies": {
|
|
73
75
|
"@codemirror/state": "^6.0.0",
|
|
76
|
+
"@codemirror/streamparser": "^6.0.0",
|
|
74
77
|
"@codemirror/view": "^6.23.0",
|
|
75
78
|
"@lezer/common": "^1.5.0",
|
|
76
79
|
"@lezer/highlight": "^1.0.0",
|
|
@@ -109,6 +112,12 @@
|
|
|
109
112
|
"@marijn/find-cluster-break": "^1.0.0"
|
|
110
113
|
}
|
|
111
114
|
},
|
|
115
|
+
"node_modules/@codemirror/streamparser": {
|
|
116
|
+
"version": "6.0.0",
|
|
117
|
+
"resolved": "https://registry.npmjs.org/@codemirror/streamparser/-/streamparser-6.0.0.tgz",
|
|
118
|
+
"integrity": "sha512-JTFPF6xrfjt0mnfGPgzcLiMwYmvIyNaoizp8BYzv8FE8KrT6GBGDZ190rtt+O7Wke3gG/MFHyiY9YGNeimof4w==",
|
|
119
|
+
"license": "MIT"
|
|
120
|
+
},
|
|
112
121
|
"node_modules/@codemirror/view": {
|
|
113
122
|
"version": "6.43.11",
|
|
114
123
|
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.11.tgz",
|
|
@@ -128,9 +137,9 @@
|
|
|
128
137
|
"license": "MIT"
|
|
129
138
|
},
|
|
130
139
|
"node_modules/@lezer/highlight": {
|
|
131
|
-
"version": "1.2.
|
|
132
|
-
"resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.
|
|
133
|
-
"integrity": "sha512-
|
|
140
|
+
"version": "1.2.5",
|
|
141
|
+
"resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.5.tgz",
|
|
142
|
+
"integrity": "sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w==",
|
|
134
143
|
"license": "MIT",
|
|
135
144
|
"dependencies": {
|
|
136
145
|
"@lezer/common": "^1.3.0"
|