quantology-modelmaker 0.3.2__tar.gz → 0.3.4__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.3.2/quantology_modelmaker.egg-info → quantology_modelmaker-0.3.4}/PKG-INFO +5 -2
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/README.md +4 -1
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/App.tsx +34 -6
- quantology_modelmaker-0.3.4/frontend/src/LibraryPage.tsx +65 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/LibraryPanel.tsx +24 -8
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/Toolbar.tsx +46 -14
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/host.ts +9 -2
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/main.tsx +3 -1
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/build.py +14 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/catalogue.py +5 -9
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/controller.py +57 -1
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/hint_rules.py +14 -1
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/hints.py +45 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/prompts.py +65 -1
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/tools.py +4 -2
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/api.py +10 -6
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/assistant_api.py +117 -2
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/assistant_mcp.py +25 -1
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/blocks/_template.py +5 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/blocks/base.py +15 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/blocks/library.py +91 -7
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/cache.py +104 -6
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/capabilities.py +3 -3
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/datasets.py +0 -4
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/library_api.py +2 -11
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/prompts.py +23 -1
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/run_worker.py +46 -9
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/runner.py +42 -8
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/session.py +24 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/stochastic/accumulate.py +0 -18
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/tui/client.py +0 -6
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/tui/screens.py +0 -2
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/util.py +0 -7
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/pyproject.toml +1 -1
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4/quantology_modelmaker.egg-info}/PKG-INFO +5 -2
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/quantology_modelmaker.egg-info/SOURCES.txt +2 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_agent_build.py +31 -1
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_agent_foundations.py +10 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_agent_hints.py +32 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_assistant_mcp.py +18 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_datasets.py +1 -1
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_embedding.py +80 -0
- quantology_modelmaker-0.3.4/tests/test_large_data.py +207 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/LICENSE +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/MANIFEST.in +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/NOTICE +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/.gitignore +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/.npmrc +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/.oxlintrc.json +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/README.md +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/index.html +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/package-lock.json +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/package.json +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/public/brand-quantology/favicon.svg +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/public/brand-quantology/icon-mark-light.svg +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/public/icons.svg +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/scripts/check-host.mjs +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/BlockNode.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/BuildPanel.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/BuildReport.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/CodeEditor.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/DataModal.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/DataPicker.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/DataWireEdge.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/EnvVarField.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/FileBrowser.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/GhostNode.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/GitPanel.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/Inspector.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/LaneBand.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/LaneLabels.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/NodeDisplay.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/Palette.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/ParamsForm.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/PortDataView.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/PortInspector.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/SettingsPanel.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/UpdateDialog.tsx +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/api.ts +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/assets/hero.png +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/assets/react.svg +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/assets/vite.svg +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/features.ts +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/index.css +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/roles.ts +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/src/types.ts +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/tsconfig.app.json +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/tsconfig.json +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/tsconfig.node.json +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/frontend/vite.config.ts +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/__init__.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/__main__.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/__init__.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/layout.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/leakage.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/loop.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/agent/mcp_server.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/block_library.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/blocks/__init__.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/blocks/binning.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/blocks/data_quality.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/blocks/feature_analysis.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/blocks/modelling.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/blocks/stat_tests.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/blocks/stochastic.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/cli.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/compiler.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/demo_data.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/execution/__init__.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/execution/agent.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/execution/base.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/execution/env.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/execution/limits.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/execution/local.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/execution/protocol.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/execution/remote.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/execution/safe_pickle.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/execution/wire.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/features.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/forms.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/gitops.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/graph.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/library_ai.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/library_store.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/library_updates.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/__init__.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/anthropic_provider.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/base.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/claude_cli_provider.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/copilot_provider.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/gemini_provider.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/lmstudio_provider.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/openai_provider.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/redact.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/settings.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/llm/stub_provider.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/metadata_transforms.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/packet.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/project.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/runslot.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/signature.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/sources.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/stochastic/__init__.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/stochastic/credit.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/stochastic/dependency.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/stochastic/distributions.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/stochastic/proxy.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/stochastic/seed.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/stochastic/var_covar.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/tui/__init__.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/tui/app.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/tui/canvas.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/tui/charts.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/tui/inspector.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/tui/paramspecs.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/tui/preview.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/worker_pool.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/modelmaker/workspace.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/projects/demo_pd_model/model.json +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/quantology_modelmaker.egg-info/dependency_links.txt +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/quantology_modelmaker.egg-info/entry_points.txt +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/quantology_modelmaker.egg-info/requires.txt +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/quantology_modelmaker.egg-info/top_level.txt +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/run.bat +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/setup.cfg +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/setup.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_agent_api.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_agent_leakage.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_agent_loops.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_api.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_binning.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_block_library.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_cache.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_compiler.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_data_quality.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_demo_data.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_demo_project.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_display_blocks.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_env_vars.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_execution_agent.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_execution_executor.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_execution_limits.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_execution_security.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_execution_wire.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_feature_analysis.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_features.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_forms.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_gitops.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_graph.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_hosting_hooks.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_input_blocks.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_library.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_llm.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_llm_connections.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_master_scale.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_modelling.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_no_exec_in_api.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_packet.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_prep_blocks.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_project.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_risk_parameter_blocks.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_runner.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_runner_streaming.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_session.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_stat_tests.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_stochastic_blocks.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_stochastic_core.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_stochastic_credit.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_stochastic_fan_out.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_stochastic_runner.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_tui_app.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_tui_charts.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_tui_client.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_validation_blocks.py +0 -0
- {quantology_modelmaker-0.3.2 → quantology_modelmaker-0.3.4}/tests/test_workspaces.py +0 -0
{quantology_modelmaker-0.3.2/quantology_modelmaker.egg-info → quantology_modelmaker-0.3.4}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantology-modelmaker
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
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
|
|
@@ -197,7 +197,10 @@ then run `modelmaker-api` (or `modelmaker-tui`) from inside that folder.
|
|
|
197
197
|
A few things worth knowing beyond the canvas itself.
|
|
198
198
|
|
|
199
199
|
- **Sample mode** — the `Sample` toggle in the top bar caps *every* source at
|
|
200
|
-
|
|
200
|
+
N rows, so a whole pipeline stays fast to iterate on. A source with a
|
|
201
|
+
column tagged as the ID (on the input block itself) keeps whole IDs
|
|
202
|
+
instead of the first N rows: about N rows, every row of each kept ID, so
|
|
203
|
+
a panel's histories stay complete and the sample spans the whole file. It changes
|
|
201
204
|
every block's cache key, so sampled and full results never mix; a banner
|
|
202
205
|
keeps it obvious that what you're looking at isn't the full population.
|
|
203
206
|
Switching back off needs the sources re-read.
|
|
@@ -145,7 +145,10 @@ then run `modelmaker-api` (or `modelmaker-tui`) from inside that folder.
|
|
|
145
145
|
A few things worth knowing beyond the canvas itself.
|
|
146
146
|
|
|
147
147
|
- **Sample mode** — the `Sample` toggle in the top bar caps *every* source at
|
|
148
|
-
|
|
148
|
+
N rows, so a whole pipeline stays fast to iterate on. A source with a
|
|
149
|
+
column tagged as the ID (on the input block itself) keeps whole IDs
|
|
150
|
+
instead of the first N rows: about N rows, every row of each kept ID, so
|
|
151
|
+
a panel's histories stay complete and the sample spans the whole file. It changes
|
|
149
152
|
every block's cache key, so sampled and full results never mix; a banner
|
|
150
153
|
keeps it obvious that what you're looking at isn't the full population.
|
|
151
154
|
Switching back off needs the sources re-read.
|
|
@@ -100,6 +100,12 @@ function AppInner() {
|
|
|
100
100
|
// The block library overlay (null: closed), the counter the palette
|
|
101
101
|
// refetches the library on, and the block whose update dialog is open.
|
|
102
102
|
const [libraryView, setLibraryView] = useState<LibraryView | null>(null)
|
|
103
|
+
// In VS Code the library is an editor tab of its own (vscode/src/library.ts);
|
|
104
|
+
// in the browser, a dialog over the canvas.
|
|
105
|
+
const openLibrary = useCallback((view: LibraryView) => {
|
|
106
|
+
if (host.kind === 'vscode') host.post('openLibrary', view)
|
|
107
|
+
else setLibraryView(view)
|
|
108
|
+
}, [])
|
|
103
109
|
const [libraryVersion, setLibraryVersion] = useState(0)
|
|
104
110
|
const [updateBlockId, setUpdateBlockId] = useState<string | null>(null)
|
|
105
111
|
const [selectedPort, setSelectedPort] = useState<{ blockId: string; port: string; portType: PortType } | null>(null)
|
|
@@ -640,6 +646,26 @@ function AppInner() {
|
|
|
640
646
|
[reload],
|
|
641
647
|
)
|
|
642
648
|
|
|
649
|
+
// From the library's own tab (VS Code; see LibraryPage): place a block
|
|
650
|
+
// here, so it's in this canvas's undo history; open the update dialog;
|
|
651
|
+
// refresh the palette's library section.
|
|
652
|
+
useEffect(
|
|
653
|
+
() =>
|
|
654
|
+
host.onEvent(({ name, data }) => {
|
|
655
|
+
const d = (data ?? {}) as { file?: string; id?: string; category?: string; blockId?: string }
|
|
656
|
+
if (name === 'placeLibraryBlock' && d.file && d.id) addLibraryBlock(d.file, d.id).catch((e) => host.notify((e as Error).message))
|
|
657
|
+
else if (name === 'placeBuiltinBlock' && d.category) addBlock(d.category)
|
|
658
|
+
else if (name === 'openUpdate' && d.blockId) {
|
|
659
|
+
reload()
|
|
660
|
+
setUpdateBlockId(d.blockId)
|
|
661
|
+
} else if (name === 'libraryChanged') {
|
|
662
|
+
setLibraryVersion((v) => v + 1)
|
|
663
|
+
reload()
|
|
664
|
+
}
|
|
665
|
+
}),
|
|
666
|
+
[addBlock, addLibraryBlock, reload],
|
|
667
|
+
)
|
|
668
|
+
|
|
643
669
|
const onDragOver = useCallback((e: React.DragEvent) => {
|
|
644
670
|
if (!e.dataTransfer.types.includes('application/x-modelmaker-block')) return
|
|
645
671
|
e.preventDefault()
|
|
@@ -696,6 +722,7 @@ function AppInner() {
|
|
|
696
722
|
onRedo={redo}
|
|
697
723
|
sampleRows={graph?.sample_rows ?? null}
|
|
698
724
|
autosave={autosave}
|
|
725
|
+
onOpenLibrary={has('custom_blocks') ? () => openLibrary({ kind: 'browse' }) : undefined}
|
|
699
726
|
/>
|
|
700
727
|
{graph?.sample_rows != null && (
|
|
701
728
|
<div
|
|
@@ -759,8 +786,8 @@ function AppInner() {
|
|
|
759
786
|
onToggle={lean ? togglePalette : undefined}
|
|
760
787
|
onAdd={addBlock}
|
|
761
788
|
onAddLibrary={(file, id) => addLibraryBlock(file, id).catch((e) => host.notify(e.message))}
|
|
762
|
-
onOpenLibrary={() =>
|
|
763
|
-
onCreateWithAI={() =>
|
|
789
|
+
onOpenLibrary={() => openLibrary({ kind: 'browse' })}
|
|
790
|
+
onCreateWithAI={() => openLibrary({ kind: 'ai', start: { addToCanvas: true, contextBlock: selectedBlockContext } })}
|
|
764
791
|
onAddLane={addLane}
|
|
765
792
|
libraryVersion={libraryVersion}
|
|
766
793
|
/>
|
|
@@ -805,7 +832,8 @@ function AppInner() {
|
|
|
805
832
|
AI is editing -- canvas read-only
|
|
806
833
|
</span>
|
|
807
834
|
)}
|
|
808
|
-
{
|
|
835
|
+
{/* In VS Code the assistant beside the canvas (Copilot, Claude Code) builds. */}
|
|
836
|
+
{has('ai_builder') && !lean && (
|
|
809
837
|
<button
|
|
810
838
|
className={buildOpen ? undefined : 'brand-primary'}
|
|
811
839
|
onClick={() => setBuildOpen((o) => !o)}
|
|
@@ -841,7 +869,7 @@ function AppInner() {
|
|
|
841
869
|
)}
|
|
842
870
|
</ReactFlow>
|
|
843
871
|
</div>
|
|
844
|
-
{graph && has('ai_builder') && (buildOpen || buildLive) && (
|
|
872
|
+
{graph && has('ai_builder') && !lean && (buildOpen || buildLive) && (
|
|
845
873
|
// Kept mounted (just hidden) while a build is live, so it keeps
|
|
846
874
|
// polling the build -- and the canvas -- with the panel closed.
|
|
847
875
|
<div style={{ display: buildOpen ? 'flex' : 'none' }}>
|
|
@@ -871,8 +899,8 @@ function AppInner() {
|
|
|
871
899
|
onChanged={reload}
|
|
872
900
|
provider={llmSettings?.active_provider ?? null}
|
|
873
901
|
onOpenUpdate={(b) => setUpdateBlockId(b.id)}
|
|
874
|
-
onFixWithAI={(b) =>
|
|
875
|
-
onOpenInLibrary={(file, id) =>
|
|
902
|
+
onFixWithAI={(b) => openLibrary({ kind: 'ai', start: { fixBlock: b.id } })}
|
|
903
|
+
onOpenInLibrary={(file, id) => openLibrary({ kind: 'browse', selected: { file, id } })}
|
|
876
904
|
/>
|
|
877
905
|
)}
|
|
878
906
|
</div>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useCallback, useEffect, useState } from 'react'
|
|
2
|
+
import { api } from './api'
|
|
3
|
+
import { host } from './host'
|
|
4
|
+
import { LibraryPanel, type LibraryView } from './LibraryPanel'
|
|
5
|
+
import type { GraphOut } from './types'
|
|
6
|
+
|
|
7
|
+
// The block library in a VS Code editor tab of its own (Model-Maker: Open
|
|
8
|
+
// Block Library, or the canvas's Library button), on the same backend as
|
|
9
|
+
// its project's canvas. Whatever changes the canvas -- placing a block,
|
|
10
|
+
// opening the update dialog -- goes to the canvas through the extension
|
|
11
|
+
// (vscode/src/library.ts), so it lands in the canvas's undo history; then
|
|
12
|
+
// the canvas tab comes to the front.
|
|
13
|
+
|
|
14
|
+
const GRAPH_POLL_MS = 2000
|
|
15
|
+
|
|
16
|
+
export function LibraryPage() {
|
|
17
|
+
const [view, setView] = useState<{ key: number; view: LibraryView }>({
|
|
18
|
+
key: 0,
|
|
19
|
+
view: (host.initialLibraryView as LibraryView | undefined) ?? { kind: 'browse' },
|
|
20
|
+
})
|
|
21
|
+
const [graph, setGraph] = useState<GraphOut | null>(null)
|
|
22
|
+
const [provider, setProvider] = useState<string | null>(null)
|
|
23
|
+
|
|
24
|
+
const loadGraph = useCallback(() => {
|
|
25
|
+
api.graph().then(setGraph).catch(() => {})
|
|
26
|
+
}, [])
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
loadGraph()
|
|
30
|
+
api
|
|
31
|
+
.llmSettings()
|
|
32
|
+
.then((s) => setProvider(s.active_provider ?? null))
|
|
33
|
+
.catch(() => setProvider(null))
|
|
34
|
+
// The canvas edits the same graph: keep what this page shows of it
|
|
35
|
+
// (where a block is placed, Fix with AI's block) current.
|
|
36
|
+
const id = setInterval(() => {
|
|
37
|
+
if (!document.hidden) loadGraph()
|
|
38
|
+
}, GRAPH_POLL_MS)
|
|
39
|
+
return () => clearInterval(id)
|
|
40
|
+
}, [loadGraph])
|
|
41
|
+
|
|
42
|
+
// Opened again from the canvas on another view (e.g. Fix with AI).
|
|
43
|
+
useEffect(
|
|
44
|
+
() =>
|
|
45
|
+
host.onEvent(({ name, data }) => {
|
|
46
|
+
if (name === 'libraryView') setView((v) => ({ key: v.key + 1, view: data as LibraryView }))
|
|
47
|
+
}),
|
|
48
|
+
[],
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<LibraryPanel
|
|
53
|
+
key={view.key}
|
|
54
|
+
page
|
|
55
|
+
initialView={view.view}
|
|
56
|
+
graph={graph}
|
|
57
|
+
provider={provider}
|
|
58
|
+
onClose={() => host.post('showCanvas')}
|
|
59
|
+
onLibraryChanged={() => host.post('libraryChanged')}
|
|
60
|
+
onPlace={async (file, id) => host.post('placeLibraryBlock', { file, id })}
|
|
61
|
+
onPlaceBuiltin={(category) => host.post('placeBuiltinBlock', { category })}
|
|
62
|
+
onOpenUpdate={(blockId) => host.post('openUpdate', { blockId })}
|
|
63
|
+
/>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
@@ -71,6 +71,7 @@ function fileToBase64(file: File): Promise<string> {
|
|
|
71
71
|
* file, create or fix a block with AI, import and export. A full-screen
|
|
72
72
|
* overlay over the canvas. */
|
|
73
73
|
export function LibraryPanel({
|
|
74
|
+
page = false,
|
|
74
75
|
initialView,
|
|
75
76
|
graph,
|
|
76
77
|
provider,
|
|
@@ -80,6 +81,9 @@ export function LibraryPanel({
|
|
|
80
81
|
onPlaceBuiltin,
|
|
81
82
|
onOpenUpdate,
|
|
82
83
|
}: {
|
|
84
|
+
// A page of its own (VS Code's library tab) rather than a dialog over the
|
|
85
|
+
// canvas: no backdrop, no close button.
|
|
86
|
+
page?: boolean
|
|
83
87
|
initialView: LibraryView
|
|
84
88
|
graph: GraphOut | null
|
|
85
89
|
provider: string | null
|
|
@@ -114,11 +118,11 @@ export function LibraryPanel({
|
|
|
114
118
|
|
|
115
119
|
useEffect(() => {
|
|
116
120
|
const onKey = (e: KeyboardEvent) => {
|
|
117
|
-
if (e.key === 'Escape' && view.kind === 'browse') onClose()
|
|
121
|
+
if (e.key === 'Escape' && view.kind === 'browse' && !page) onClose()
|
|
118
122
|
}
|
|
119
123
|
window.addEventListener('keydown', onKey)
|
|
120
124
|
return () => window.removeEventListener('keydown', onKey)
|
|
121
|
-
}, [view.kind, onClose])
|
|
125
|
+
}, [view.kind, onClose, page])
|
|
122
126
|
|
|
123
127
|
const title =
|
|
124
128
|
view.kind === 'browse'
|
|
@@ -134,11 +138,21 @@ export function LibraryPanel({
|
|
|
134
138
|
: 'Import blocks'
|
|
135
139
|
|
|
136
140
|
return (
|
|
137
|
-
<div
|
|
141
|
+
<div
|
|
142
|
+
style={
|
|
143
|
+
page
|
|
144
|
+
? { position: 'fixed', inset: 0, display: 'flex' }
|
|
145
|
+
: { position: 'fixed', inset: 0, background: 'rgba(11,35,64,0.35)', zIndex: 50, display: 'flex', padding: 24 }
|
|
146
|
+
}
|
|
147
|
+
>
|
|
138
148
|
<div
|
|
139
|
-
role=
|
|
149
|
+
role={page ? 'main' : 'dialog'}
|
|
140
150
|
aria-label={title}
|
|
141
|
-
style={
|
|
151
|
+
style={
|
|
152
|
+
page
|
|
153
|
+
? { flex: 1, background: 'var(--mm-bg-subtle-3)', display: 'flex', flexDirection: 'column', overflow: 'hidden' }
|
|
154
|
+
: { flex: 1, background: 'var(--mm-bg-subtle-3)', borderRadius: 12, display: 'flex', flexDirection: 'column', overflow: 'hidden', boxShadow: '0 20px 50px rgba(11,35,64,0.3)' }
|
|
155
|
+
}
|
|
142
156
|
>
|
|
143
157
|
<div style={{ display: 'flex', alignItems: 'center', gap: 8, padding: '12px 16px', borderBottom: '1px solid var(--mm-border)', background: 'var(--mm-bg)' }}>
|
|
144
158
|
{view.kind !== 'browse' && (
|
|
@@ -168,9 +182,11 @@ export function LibraryPanel({
|
|
|
168
182
|
</button>
|
|
169
183
|
</>
|
|
170
184
|
)}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
185
|
+
{!page && (
|
|
186
|
+
<button aria-label="Close" onClick={onClose}>
|
|
187
|
+
✕
|
|
188
|
+
</button>
|
|
189
|
+
)}
|
|
174
190
|
</div>
|
|
175
191
|
{error && (
|
|
176
192
|
<div style={{ background: 'var(--mm-error-bg)', color: 'var(--mm-error)', padding: '6px 16px', fontSize: 12 }}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react'
|
|
1
|
+
import { Fragment, useEffect, useState } from 'react'
|
|
2
2
|
import type { AutosaveStatus } from './App'
|
|
3
3
|
import { api } from './api'
|
|
4
4
|
import { CodeEditor } from './CodeEditor'
|
|
@@ -36,6 +36,7 @@ export function Toolbar({
|
|
|
36
36
|
onRedo,
|
|
37
37
|
sampleRows,
|
|
38
38
|
autosave,
|
|
39
|
+
onOpenLibrary,
|
|
39
40
|
}: {
|
|
40
41
|
onChanged: () => void
|
|
41
42
|
projectPath: string | null
|
|
@@ -54,6 +55,8 @@ export function Toolbar({
|
|
|
54
55
|
onRedo: () => void
|
|
55
56
|
sampleRows: number | null
|
|
56
57
|
autosave: AutosaveStatus
|
|
58
|
+
// The block library (VS Code: its own tab); absent where custom blocks are off.
|
|
59
|
+
onOpenLibrary?: () => void
|
|
57
60
|
}) {
|
|
58
61
|
const [busy, setBusy] = useState(false)
|
|
59
62
|
const [compiled, setCompiled] = useState<string | null>(null)
|
|
@@ -159,6 +162,11 @@ export function Toolbar({
|
|
|
159
162
|
borderBottom: '1px solid rgba(11,35,64,0.1)',
|
|
160
163
|
}}
|
|
161
164
|
>
|
|
165
|
+
{lean && (
|
|
166
|
+
<a href="https://www.quantology.nl/" target="_blank" rel="noreferrer" title="Quantology Model Maker" style={{ display: 'flex', marginRight: 2 }}>
|
|
167
|
+
<img src={`${import.meta.env.BASE_URL}brand-quantology/icon-mark-light.svg`} alt="Quantology" width={20} height={20} style={{ display: 'block' }} />
|
|
168
|
+
</a>
|
|
169
|
+
)}
|
|
162
170
|
{!lean && (
|
|
163
171
|
<a
|
|
164
172
|
href="https://www.quantology.nl/"
|
|
@@ -220,6 +228,11 @@ export function Toolbar({
|
|
|
220
228
|
<button disabled={busy} onClick={() => doCompile()} title={lean ? 'Compile the pipeline to one Python script, opened in an editor tab' : undefined}>
|
|
221
229
|
Compile
|
|
222
230
|
</button>
|
|
231
|
+
{lean && onOpenLibrary && (
|
|
232
|
+
<button onClick={onOpenLibrary} title="Open the block library in a tab of its own">
|
|
233
|
+
Library
|
|
234
|
+
</button>
|
|
235
|
+
)}
|
|
223
236
|
{lean ? (
|
|
224
237
|
<div style={{ position: 'relative' }}>
|
|
225
238
|
<button disabled={busy} onClick={() => setShowMore((m) => !m)} title="More run and compile options">
|
|
@@ -234,6 +247,9 @@ export function Toolbar({
|
|
|
234
247
|
{ label: 'Refresh sources', disabled: running, onClick: () => run(() => api.refreshAll()) },
|
|
235
248
|
{ label: 'Check all sources', disabled: running, onClick: () => run(() => api.checkAllSources()) },
|
|
236
249
|
{ label: 'Compile (streaming)', onClick: () => doCompile(true) },
|
|
250
|
+
{ label: 'Quantology', href: 'https://www.quantology.nl/', divider: true },
|
|
251
|
+
{ label: 'Model-Maker on GitHub', href: 'https://github.com/mmalkus/Model-Maker' },
|
|
252
|
+
{ label: 'Apache 2.0 License', href: 'https://www.apache.org/licenses/LICENSE-2.0' },
|
|
237
253
|
]}
|
|
238
254
|
/>
|
|
239
255
|
)}
|
|
@@ -401,7 +417,8 @@ export function Toolbar({
|
|
|
401
417
|
)
|
|
402
418
|
}
|
|
403
419
|
|
|
404
|
-
|
|
420
|
+
// An action, or a link (opened in the browser); `divider` starts a group.
|
|
421
|
+
type MenuItem = { label: string; onClick?: () => void; href?: string; disabled?: boolean; divider?: boolean }
|
|
405
422
|
|
|
406
423
|
function MoreMenu({ items, onClose }: { items: MenuItem[]; onClose: () => void }) {
|
|
407
424
|
return (
|
|
@@ -428,18 +445,33 @@ function MoreMenu({ items, onClose }: { items: MenuItem[]; onClose: () => void }
|
|
|
428
445
|
}}
|
|
429
446
|
>
|
|
430
447
|
{items.map((item) => (
|
|
431
|
-
<
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
448
|
+
<Fragment key={item.label}>
|
|
449
|
+
{item.divider && <hr style={{ border: 'none', borderTop: '1px solid var(--mm-border)', margin: '4px 0', width: '100%' }} />}
|
|
450
|
+
{item.href ? (
|
|
451
|
+
<a
|
|
452
|
+
role="menuitem"
|
|
453
|
+
href={item.href}
|
|
454
|
+
target="_blank"
|
|
455
|
+
rel="noreferrer"
|
|
456
|
+
onClick={onClose}
|
|
457
|
+
style={{ padding: '4px 10px', fontSize: 12, textDecoration: 'none', color: 'inherit' }}
|
|
458
|
+
>
|
|
459
|
+
{item.label}
|
|
460
|
+
</a>
|
|
461
|
+
) : (
|
|
462
|
+
<button
|
|
463
|
+
role="menuitem"
|
|
464
|
+
disabled={item.disabled}
|
|
465
|
+
onClick={() => {
|
|
466
|
+
onClose()
|
|
467
|
+
item.onClick?.()
|
|
468
|
+
}}
|
|
469
|
+
style={{ textAlign: 'left', border: 'none', background: 'transparent' }}
|
|
470
|
+
>
|
|
471
|
+
{item.label}
|
|
472
|
+
</button>
|
|
473
|
+
)}
|
|
474
|
+
</Fragment>
|
|
443
475
|
))}
|
|
444
476
|
</div>
|
|
445
477
|
</>
|
|
@@ -21,6 +21,10 @@ export type HostEvent = { name: string; data?: unknown }
|
|
|
21
21
|
|
|
22
22
|
export interface Host {
|
|
23
23
|
readonly kind: 'browser' | 'vscode'
|
|
24
|
+
// What this page shows: the canvas, or (in its own VS Code tab) the block
|
|
25
|
+
// library, opened on `initialLibraryView`.
|
|
26
|
+
readonly view: 'canvas' | 'library'
|
|
27
|
+
readonly initialLibraryView?: unknown
|
|
24
28
|
// Prefix for every API URL: '' in the browser (same origin), the backend's
|
|
25
29
|
// http://127.0.0.1:<port> in VS Code.
|
|
26
30
|
readonly apiBase: string
|
|
@@ -48,7 +52,7 @@ export interface Host {
|
|
|
48
52
|
|
|
49
53
|
declare global {
|
|
50
54
|
interface Window {
|
|
51
|
-
__MODELMAKER__?: { apiBase: string; token: string }
|
|
55
|
+
__MODELMAKER__?: { apiBase: string; token: string; view?: 'canvas' | 'library'; libraryView?: unknown }
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
|
|
@@ -67,6 +71,7 @@ function anchorDownload(href: string, name: string) {
|
|
|
67
71
|
|
|
68
72
|
export const browserHost: Host = {
|
|
69
73
|
kind: 'browser',
|
|
74
|
+
view: 'canvas',
|
|
70
75
|
apiBase: '',
|
|
71
76
|
authHeaders: () => ({}),
|
|
72
77
|
withToken: (url) => url,
|
|
@@ -112,7 +117,7 @@ declare function acquireVsCodeApi(): VsCodeApi
|
|
|
112
117
|
// {kind: 'post', name, data} (one-way)
|
|
113
118
|
// extension -> webview {kind: 'response', id, ok, result | error}
|
|
114
119
|
// {kind: 'event', name, data}
|
|
115
|
-
function makeVsCodeHost(config: { apiBase: string; token: string }): Host {
|
|
120
|
+
function makeVsCodeHost(config: { apiBase: string; token: string; view?: 'canvas' | 'library'; libraryView?: unknown }): Host {
|
|
116
121
|
const vscode = acquireVsCodeApi()
|
|
117
122
|
const pending = new Map<number, { resolve: (v: unknown) => void; reject: (e: Error) => void }>()
|
|
118
123
|
const listeners = new Set<(event: HostEvent) => void>()
|
|
@@ -155,6 +160,8 @@ function makeVsCodeHost(config: { apiBase: string; token: string }): Host {
|
|
|
155
160
|
|
|
156
161
|
return {
|
|
157
162
|
kind: 'vscode',
|
|
163
|
+
view: config.view ?? 'canvas',
|
|
164
|
+
initialLibraryView: config.libraryView,
|
|
158
165
|
apiBase: config.apiBase,
|
|
159
166
|
authHeaders,
|
|
160
167
|
withToken: (url) => appendQuery(url, 'token', config.token),
|
|
@@ -3,13 +3,15 @@ import { createRoot } from 'react-dom/client'
|
|
|
3
3
|
import './index.css'
|
|
4
4
|
import App from './App.tsx'
|
|
5
5
|
import { loadFeatures } from './features'
|
|
6
|
+
import { host } from './host'
|
|
7
|
+
import { LibraryPage } from './LibraryPage'
|
|
6
8
|
|
|
7
9
|
// What this workspace offers decides which controls exist, so it's read
|
|
8
10
|
// before the first render.
|
|
9
11
|
void loadFeatures().finally(() =>
|
|
10
12
|
createRoot(document.getElementById('root')!).render(
|
|
11
13
|
<StrictMode>
|
|
12
|
-
<App />
|
|
14
|
+
{host.view === 'library' ? <LibraryPage /> : <App />}
|
|
13
15
|
</StrictMode>,
|
|
14
16
|
),
|
|
15
17
|
)
|
|
@@ -200,6 +200,14 @@ class AgentBuild:
|
|
|
200
200
|
self.owned_lanes: set[str] = set()
|
|
201
201
|
self.lane_map: dict[str, str] = {} # plan lane key / name asked for -> lane id
|
|
202
202
|
self.sample_rows_used: int | None = None
|
|
203
|
+
# The anchors' size on the full data (rows, estimated bytes) when
|
|
204
|
+
# known -- preflight reads it before the build turns sample mode on
|
|
205
|
+
# -- and how much bigger the full data is than the sample the build
|
|
206
|
+
# runs on (full rows / sampled rows at the anchors; 1.0 on the full
|
|
207
|
+
# data, None when unknown). For large-data guidance and size hints.
|
|
208
|
+
self.full_rows: int | None = None
|
|
209
|
+
self.full_bytes: int | None = None
|
|
210
|
+
self.sample_scale: float | None = 1.0
|
|
203
211
|
self.changed_sample_mode = False # the build turned sample mode on (and must turn it off)
|
|
204
212
|
self.finished = False # the model called finish
|
|
205
213
|
# Set by a successful terminal tool (submit_plan, ask_user,
|
|
@@ -323,6 +331,9 @@ class AgentBuild:
|
|
|
323
331
|
"owned_lanes": sorted(self.owned_lanes),
|
|
324
332
|
"lane_map": self.lane_map,
|
|
325
333
|
"sample_rows_used": self.sample_rows_used,
|
|
334
|
+
"full_rows": self.full_rows,
|
|
335
|
+
"full_bytes": self.full_bytes,
|
|
336
|
+
"sample_scale": self.sample_scale,
|
|
326
337
|
"counters": self.counters,
|
|
327
338
|
"usage": self.usage,
|
|
328
339
|
"error": self.error,
|
|
@@ -380,6 +391,9 @@ class AgentBuild:
|
|
|
380
391
|
done = [i for i, st in enumerate(b.stages) if st["status"] in (STAGE_DONE, STAGE_SKIPPED)]
|
|
381
392
|
b.stage_index = min(max(done, default=-1) + 1, max(len(b.stages) - 1, 0))
|
|
382
393
|
b.sample_rows_used = record.get("sample_rows_used")
|
|
394
|
+
b.full_rows = record.get("full_rows")
|
|
395
|
+
b.full_bytes = record.get("full_bytes")
|
|
396
|
+
b.sample_scale = record.get("sample_scale", 1.0 if not b.sample_rows_used else None)
|
|
383
397
|
b.counters.update({k: v for k, v in (record.get("counters") or {}).items() if k in b.counters})
|
|
384
398
|
b.usage.update(record.get("usage") or {})
|
|
385
399
|
b._events = list(record.get("events") or [])
|
|
@@ -10,8 +10,7 @@ from typing import Any
|
|
|
10
10
|
|
|
11
11
|
from .. import capabilities
|
|
12
12
|
from ..block_library import INJECTED_PARAMS, load_builtin
|
|
13
|
-
from ..blocks.base import BLOCK_REGISTRY, BlockDefinition
|
|
14
|
-
from ..packet import ColumnRole
|
|
13
|
+
from ..blocks.base import BLOCK_REGISTRY, BlockDefinition, streaming_note
|
|
15
14
|
from ..signature import ParamSpec
|
|
16
15
|
from ..util import ROLE_PARAM_NAMES, find_role_param
|
|
17
16
|
|
|
@@ -32,6 +31,7 @@ AGENT_DISALLOWED: dict[str, str] = {
|
|
|
32
31
|
"read_dataset": "input blocks are prepared by the user, not the AI build",
|
|
33
32
|
"read_source": "input blocks are prepared by the user, not the AI build",
|
|
34
33
|
"write_csv": "writing files is left to the user",
|
|
34
|
+
"write_parquet": "writing files is left to the user",
|
|
35
35
|
"export": "exporting results is left to the user",
|
|
36
36
|
"iterate": "fan-out (iterate/collect) isn't supported in AI builds yet",
|
|
37
37
|
"collect": "fan-out (iterate/collect) isn't supported in AI builds yet",
|
|
@@ -247,6 +247,9 @@ def catalogue_entry(spec: BlockDefinition, detail: bool = False) -> dict[str, An
|
|
|
247
247
|
if detail:
|
|
248
248
|
entry["doc"] = doc
|
|
249
249
|
entry["params"] = block_params(spec)
|
|
250
|
+
# What it costs on large data: a block that doesn't stream holds its
|
|
251
|
+
# whole input and output tables in memory on the full run.
|
|
252
|
+
entry["streaming"] = streaming_note(spec) or "no: holds its whole input and output tables in memory"
|
|
250
253
|
return entry
|
|
251
254
|
|
|
252
255
|
|
|
@@ -286,10 +289,3 @@ def describe_block_type(category: str, include_library: bool = True) -> dict[str
|
|
|
286
289
|
if spec is None:
|
|
287
290
|
raise KeyError(f"unknown block category {category!r}")
|
|
288
291
|
return catalogue_entry(spec, detail=True)
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
ROLE_NOTES = {
|
|
292
|
-
ColumnRole.TARGET.value: "the modelling target; params named target/target_col auto-fill from it",
|
|
293
|
-
ColumnRole.PREDICTED.value: "set automatically on model outputs; params named score_col/predicted_col auto-fill from it",
|
|
294
|
-
ColumnRole.EXCLUDED.value: "must never be used as a model feature",
|
|
295
|
-
}
|
|
@@ -120,9 +120,51 @@ def run_preflight(build: AgentBuild) -> dict[str, Any]:
|
|
|
120
120
|
):
|
|
121
121
|
warnings.append(_issue("no_date", "The goal mentions out-of-time/vintages but no column is tagged date."))
|
|
122
122
|
max_rows = max((f.data.height for f in frames), default=None)
|
|
123
|
+
if runner.sample_rows is None and frames:
|
|
124
|
+
# The full data: what the build's large-data guidance and size
|
|
125
|
+
# hints scale a sample's numbers up to (see AgentBuild.full_rows).
|
|
126
|
+
build.full_rows = max_rows
|
|
127
|
+
build.full_bytes = max(f.data.estimated_size() for f in frames)
|
|
128
|
+
warnings += _large_data_issues(build, frames, max_rows)
|
|
123
129
|
return {"blocking": blocking, "warnings": warnings, "max_rows": max_rows}
|
|
124
130
|
|
|
125
131
|
|
|
132
|
+
def _large_data_issues(build: AgentBuild, frames: list[DataFramePacket], max_rows: int | None) -> list[dict[str, Any]]:
|
|
133
|
+
"""Preflight warnings for a source big enough to build on a sample:
|
|
134
|
+
without an ID tagged on the input block itself, sample mode cuts the
|
|
135
|
+
first N rows -- for a panel sorted by id and date, a few ids' histories
|
|
136
|
+
and nothing else."""
|
|
137
|
+
big = (
|
|
138
|
+
(max_rows or 0) > AUTO_SAMPLE_THRESHOLD_ROWS
|
|
139
|
+
or bool(build.options.sample_rows)
|
|
140
|
+
or build.session.runner.sample_rows is not None
|
|
141
|
+
)
|
|
142
|
+
if not big:
|
|
143
|
+
return []
|
|
144
|
+
from ..runner import sample_key
|
|
145
|
+
|
|
146
|
+
graph = build.session.graph
|
|
147
|
+
scope = build.scope_block_ids()
|
|
148
|
+
inputs = [bid for bid in graph.topo_order() if bid in scope and graph.blocks[bid].block_type == "input"]
|
|
149
|
+
if not inputs or any(sample_key(graph.blocks[bid]) for bid in inputs):
|
|
150
|
+
return []
|
|
151
|
+
tagged = sorted({n for f in frames for n, m in f.schema_meta.items() if m.role == ColumnRole.ID})
|
|
152
|
+
where = (
|
|
153
|
+
f"{tagged[0]} is tagged id downstream, but not on the input block, where sample mode reads it"
|
|
154
|
+
if tagged
|
|
155
|
+
else "No column is tagged id on the input block"
|
|
156
|
+
)
|
|
157
|
+
return [
|
|
158
|
+
_issue(
|
|
159
|
+
"sample_without_id",
|
|
160
|
+
f"{where}. The data is large, so the build runs on a sample: with the id (loan, account) tagged on "
|
|
161
|
+
"the input block, the sample keeps every row of a random set of ids -- complete histories from "
|
|
162
|
+
"across the file -- instead of the file's first rows.",
|
|
163
|
+
inputs,
|
|
164
|
+
)
|
|
165
|
+
]
|
|
166
|
+
|
|
167
|
+
|
|
126
168
|
def _record_resolved_model(choice: LLMChoice, loop: AgentLoop) -> None:
|
|
127
169
|
"""When no model was chosen, the loop picks one (a provider default, or
|
|
128
170
|
whatever a local server has loaded) -- record which, so provenance and
|
|
@@ -583,14 +625,28 @@ class BuildController:
|
|
|
583
625
|
current = session.runner.sample_rows
|
|
584
626
|
if not requested or current is not None:
|
|
585
627
|
# Off, or the user already has sample mode on -- build on
|
|
586
|
-
# whatever they're looking at and leave the setting alone.
|
|
628
|
+
# whatever they're looking at and leave the setting alone. A
|
|
629
|
+
# sample the user turned on hides the full size: unknown.
|
|
587
630
|
b.sample_rows_used = current
|
|
631
|
+
b.sample_scale = 1.0 if current is None else None
|
|
588
632
|
return
|
|
589
633
|
session.set_sample_rows(requested)
|
|
590
634
|
b.sample_rows_used = requested
|
|
591
635
|
b.changed_sample_mode = True
|
|
592
636
|
b.log("sample_mode", rows=requested)
|
|
593
637
|
self._reread_inputs()
|
|
638
|
+
sampled = self._anchor_rows()
|
|
639
|
+
b.sample_scale = b.full_rows / sampled if b.full_rows and sampled else None
|
|
640
|
+
|
|
641
|
+
def _anchor_rows(self) -> int | None:
|
|
642
|
+
"""The anchors' largest current output, in rows."""
|
|
643
|
+
runner = self.session.runner
|
|
644
|
+
rows = []
|
|
645
|
+
for a in self.build.anchors:
|
|
646
|
+
st = runner.state.get(a)
|
|
647
|
+
entry = runner.cache.get(st.last_successful_key) if st and st.last_successful_key else None
|
|
648
|
+
rows += [v.data.height for v in (entry.outputs.values() if entry else []) if isinstance(v, DataFramePacket)]
|
|
649
|
+
return max(rows, default=None)
|
|
594
650
|
|
|
595
651
|
def _read_stale_inputs(self) -> None:
|
|
596
652
|
"""(Re)read the in-scope input blocks that aren't current. Caller
|
|
@@ -12,7 +12,7 @@ from __future__ import annotations
|
|
|
12
12
|
|
|
13
13
|
from typing import Any, Callable
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
import polars as pl
|
|
16
16
|
|
|
17
17
|
from ..packet import DataFramePacket
|
|
18
18
|
from . import hints as h
|
|
@@ -47,6 +47,19 @@ def _split_hints(outputs: dict[str, Any]) -> list[str]:
|
|
|
47
47
|
for port, packet in outputs.items():
|
|
48
48
|
if isinstance(packet, DataFramePacket) and packet.data.height == 0:
|
|
49
49
|
hints.append(f"{port} is empty -- check the split settings (test_size, cutoff, oot_end).")
|
|
50
|
+
# A random row split of a panel (several rows per id) puts rows of one
|
|
51
|
+
# id on both sides. Only for train/test: an out-of-time split of a
|
|
52
|
+
# panel is meant to see the same ids again, later.
|
|
53
|
+
train, test = outputs.get("train"), outputs.get("test")
|
|
54
|
+
key = h.id_column(train)
|
|
55
|
+
if key is not None and isinstance(test, DataFramePacket) and key in test.data.columns:
|
|
56
|
+
shared = train.data.select(pl.col(key).unique()).filter(pl.col(key).is_in(test.data[key].implode())).height
|
|
57
|
+
if shared:
|
|
58
|
+
hints.append(
|
|
59
|
+
f"{shared:,} {key} values have rows in both train and test -- the data has several rows per "
|
|
60
|
+
f"{key} (a panel), so a random row split leaks: test isn't unseen. Split by time "
|
|
61
|
+
"(time_split), or derive a per-id split flag and filter on it."
|
|
62
|
+
)
|
|
50
63
|
thin = [f"{p} has {ev}" for p, (_, _, ev) in samples.items() if ev is not None and ev < h.MIN_EVENTS]
|
|
51
64
|
if thin:
|
|
52
65
|
hints.append(f"Few events (< {h.MIN_EVENTS}): {h.names(thin)} -- metrics on it will be noisy.")
|