ebaml 0.7.2__tar.gz → 0.8.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.
- {ebaml-0.7.2 → ebaml-0.8.0}/PKG-INFO +7 -4
- {ebaml-0.7.2 → ebaml-0.8.0}/README.md +5 -3
- {ebaml-0.7.2 → ebaml-0.8.0}/pyproject.toml +3 -1
- {ebaml-0.7.2 → ebaml-0.8.0}/pyproject.toml.orig +4 -1
- ebaml-0.8.0/src/ebaml/edit/data_effect.py +96 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/edit/edit_report.py +10 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/edit/edit_session.py +60 -8
- ebaml-0.8.0/src/ebaml/mcp/edit_tools.py +434 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/mcp/explain_tools.py +39 -17
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/mcp/llm_tools.py +12 -5
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/mcp/model_store.py +146 -10
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/mcp/read_tools.py +37 -10
- ebaml-0.8.0/src/ebaml/mcp/save_tools.py +196 -0
- ebaml-0.8.0/src/ebaml/mcp/server.py +552 -0
- ebaml-0.7.2/src/ebaml/mcp/server.py +0 -299
- {ebaml-0.7.2 → ebaml-0.8.0}/LICENSE +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/.baml-generator-output-root +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/.baml-generator-output.json +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/_baml_sources.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/_function_registry.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/_inlinedbaml.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/_invocation_types.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/_invocation_types.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/_typemap.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/clients/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/clients/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/content/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/content/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/errors/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/errors/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/events/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/events/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/internal/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/internal/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/mcp/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/mcp/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/stream/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/stream/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/tools/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/tools/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/wire/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/ai/wire/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/crypto/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/crypto/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/csv/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/csv/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/env/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/env/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/errors/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/errors/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/fs/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/fs/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/future/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/future/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/glob/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/glob/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/hash/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/hash/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/host/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/host/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/http/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/http/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/io/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/io/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/iter/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/iter/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/json/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/json/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/media/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/media/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/net/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/net/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/ops/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/ops/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/panics/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/panics/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/random/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/random/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/regex/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/regex/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/sap/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/sap/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/spawn/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/spawn/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/sys/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/sys/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/time/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/time/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/toml/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/toml/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/ws/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/ws/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/yaml/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/baml/yaml/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/experimental/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/experimental/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/py.typed +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/class_/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/class_/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/enum/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/enum/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/errors/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/errors/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/function/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/function/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/interface/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/reflect/interface/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/anthropic/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/anthropic/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/anthropic/internal/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/anthropic/internal/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/assert_/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/assert_/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/aws/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/aws/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/aws/internal/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/aws/internal/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/claude_code/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/claude_code/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/claude_code/internal/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/claude_code/internal/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/google/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/google/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/google/internal/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/google/internal/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/openai/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/openai/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/openai/internal/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/openai/internal/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/openai/internal/decisions/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/openai/internal/decisions/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/testing/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/testing/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/trace/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/trace/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/typesafeai/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/typesafeai/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/typesafeai/internal/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/typesafeai/internal/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/vercel/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/vercel/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/vercel/internal/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/baml_sdk/vendor/vercel/internal/__init__.pyi +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/benchmark.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/core/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/core/beartype_hook.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/core/custom_types.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/core/ebm_classes.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/core/exceptions.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/edit/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/edit/edit_records.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/edit/edits.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/edit/history.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/edit/model_view.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/edit/model_write.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/edit/revision_ids.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/edit/selections.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/graphs/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/graphs/ebm_graph.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/graphs/graph_text.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/graphs/model_kinds.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/graphs/request_text.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/graphs/terms.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/graphs/token_budget.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/graphs/token_weights.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/llm/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/llm/descriptors.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/llm/options.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/llm/progress_bars.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/llm/provider_errors.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/llm/requests.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/llm/retry.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/llm/sdk_setup.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/llm/token_learning.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/llm/token_weights.json +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/audience.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/completions.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/counterfactuals.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/covering_backend.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/covering_greedy.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/covering_problem.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/covering_solvers.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/decisions.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/fact_features.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/fact_text.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/fact_types.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/facts.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/local_kinds.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/minimality.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/ortools_backend.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/local/sufficient_reasons.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/mcp/__init__.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/mcp/chat.py +0 -0
- {ebaml-0.7.2 → ebaml-0.8.0}/src/ebaml/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ebaml
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: BAML for Explainable Boosting Machines: talk to your EBM.
|
|
5
5
|
Keywords: baml,llm,explainable-ai,explainable-boosting-machine,interpretml
|
|
6
6
|
Author: Johnny Godoy
|
|
@@ -31,6 +31,7 @@ Requires-Dist: uuid-utils>=0.12.0
|
|
|
31
31
|
Requires-Dist: cyclopts>=5.3.2 ; extra == 'mcp'
|
|
32
32
|
Requires-Dist: joblib>=1.6.0 ; extra == 'mcp'
|
|
33
33
|
Requires-Dist: mcp>=2.3.0 ; extra == 'mcp'
|
|
34
|
+
Requires-Dist: pydantic>=2.13.0 ; extra == 'mcp'
|
|
34
35
|
Requires-Dist: polars>=2.1.0 ; extra == 'mcp'
|
|
35
36
|
Requires-Python: >=3.13
|
|
36
37
|
Project-URL: Documentation, https://johnny-godoy.github.io/EBaMl/
|
|
@@ -384,8 +385,8 @@ uv run marimo edit notebooks/model_kinds.py
|
|
|
384
385
|
```
|
|
385
386
|
|
|
386
387
|
[`notebooks/mcp_server.py`](notebooks/mcp_server.py) starts the real `ebaml-mcp` server and connects to it as a client does.
|
|
387
|
-
It lists the tools, reads a graph with a token budget, explains a row,
|
|
388
|
-
that a user can fix. One button calls the LLM tool.
|
|
388
|
+
It lists the tools, reads a graph with a token budget, explains a row, edits the model and saves it after a confirmation,
|
|
389
|
+
serves each kind of model, and shows the errors that a user can fix. One button calls the LLM tool.
|
|
389
390
|
|
|
390
391
|
```bash
|
|
391
392
|
uv run marimo edit notebooks/mcp_server.py
|
|
@@ -409,7 +410,9 @@ uv run marimo edit notebooks/chat.py
|
|
|
409
410
|
## MCP server
|
|
410
411
|
|
|
411
412
|
`ebaml-mcp` serves a fitted EBM to an agent, for example Claude Code. The agent reads the features and the graphs, and
|
|
412
|
-
explains one prediction with the exact local facts.
|
|
413
|
+
explains one prediction with the exact local facts. The agent can also edit the model so that it meets a business
|
|
414
|
+
requirement: it lists the bins, previews and applies an edit with a reason, undoes it, and saves the model after a
|
|
415
|
+
person confirms. These tools call no LLM, so they need no key. See the
|
|
413
416
|
[MCP server guide](https://johnny-godoy.github.io/EBaMl/mcp/).
|
|
414
417
|
|
|
415
418
|
### Chat with the agent
|
|
@@ -342,8 +342,8 @@ uv run marimo edit notebooks/model_kinds.py
|
|
|
342
342
|
```
|
|
343
343
|
|
|
344
344
|
[`notebooks/mcp_server.py`](notebooks/mcp_server.py) starts the real `ebaml-mcp` server and connects to it as a client does.
|
|
345
|
-
It lists the tools, reads a graph with a token budget, explains a row,
|
|
346
|
-
that a user can fix. One button calls the LLM tool.
|
|
345
|
+
It lists the tools, reads a graph with a token budget, explains a row, edits the model and saves it after a confirmation,
|
|
346
|
+
serves each kind of model, and shows the errors that a user can fix. One button calls the LLM tool.
|
|
347
347
|
|
|
348
348
|
```bash
|
|
349
349
|
uv run marimo edit notebooks/mcp_server.py
|
|
@@ -367,7 +367,9 @@ uv run marimo edit notebooks/chat.py
|
|
|
367
367
|
## MCP server
|
|
368
368
|
|
|
369
369
|
`ebaml-mcp` serves a fitted EBM to an agent, for example Claude Code. The agent reads the features and the graphs, and
|
|
370
|
-
explains one prediction with the exact local facts.
|
|
370
|
+
explains one prediction with the exact local facts. The agent can also edit the model so that it meets a business
|
|
371
|
+
requirement: it lists the bins, previews and applies an edit with a reason, undoes it, and saves the model after a
|
|
372
|
+
person confirms. These tools call no LLM, so they need no key. See the
|
|
371
373
|
[MCP server guide](https://johnny-godoy.github.io/EBaMl/mcp/).
|
|
372
374
|
|
|
373
375
|
### Chat with the agent
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ebaml"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.8.0"
|
|
4
4
|
description = "BAML for Explainable Boosting Machines: talk to your EBM."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -48,6 +48,7 @@ mcp = [
|
|
|
48
48
|
"cyclopts>=5.3.2",
|
|
49
49
|
"joblib>=1.6.0",
|
|
50
50
|
"mcp>=2.3.0",
|
|
51
|
+
"pydantic>=2.13.0",
|
|
51
52
|
"polars>=2.1.0",
|
|
52
53
|
]
|
|
53
54
|
|
|
@@ -384,6 +385,7 @@ dev = [
|
|
|
384
385
|
"pandas-stubs>=3.1.0.261029",
|
|
385
386
|
"polars>=2.1.0",
|
|
386
387
|
"pyarrow>=26.0.0",
|
|
388
|
+
"pydantic>=2.13.0",
|
|
387
389
|
"pyrefly>=1.4.0",
|
|
388
390
|
"pytest>=9.2.0",
|
|
389
391
|
"pytest-cov>=7.1.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ebaml"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.8.0"
|
|
4
4
|
description = "BAML for Explainable Boosting Machines: talk to your EBM."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -48,6 +48,8 @@ mcp = [
|
|
|
48
48
|
"cyclopts>=5.3.2",
|
|
49
49
|
"joblib>=1.6.0",
|
|
50
50
|
"mcp>=2.3.0",
|
|
51
|
+
# ebaml.mcp builds the schema of the confirmation of a save with a pydantic model, which the MCP SDK needs
|
|
52
|
+
"pydantic>=2.13.0",
|
|
51
53
|
# ebaml.mcp reads the CSV file of --data with polars
|
|
52
54
|
"polars>=2.1.0",
|
|
53
55
|
]
|
|
@@ -188,6 +190,7 @@ dev = [
|
|
|
188
190
|
"pandas-stubs>=3.1.0.261029",
|
|
189
191
|
"polars>=2.1.0",
|
|
190
192
|
"pyarrow>=26.0.0",
|
|
193
|
+
"pydantic>=2.13.0",
|
|
191
194
|
"pyrefly>=1.4.0",
|
|
192
195
|
"pytest>=9.2.0",
|
|
193
196
|
"pytest-cov>=7.1.0",
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""The effect of an edit on rows of data: how many predictions change, and by how much.
|
|
2
|
+
|
|
3
|
+
The count needs no labels. It uses the prediction of the model itself (``predict`` and ``predict_proba``), so it does
|
|
4
|
+
not assume a link function. A row with a missing value stays in the count, because an edit of the missing bin affects
|
|
5
|
+
only such rows. The count is not a measure of quality: it says how many rows an edit reaches, not whether the edit is
|
|
6
|
+
good.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import attrs
|
|
10
|
+
import numpy as np
|
|
11
|
+
import numpy.typing as npt
|
|
12
|
+
|
|
13
|
+
from ebaml.core.custom_types import ExplainableBoostingModel, Frame
|
|
14
|
+
from ebaml.core.ebm_classes import ExplainableBoostingClassifier
|
|
15
|
+
from ebaml.core.exceptions import InvalidInstanceError
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@attrs.frozen
|
|
19
|
+
class RowChanges:
|
|
20
|
+
"""How an edit changes the predictions for a set of rows.
|
|
21
|
+
|
|
22
|
+
``value`` is the probability of the positive class for a classifier, and the predicted value for a regressor.
|
|
23
|
+
``rows_with_changed_class`` is ``None`` for a regressor, which has no class.
|
|
24
|
+
|
|
25
|
+
Attributes
|
|
26
|
+
----------
|
|
27
|
+
row_count: int
|
|
28
|
+
The number of rows that the count covers.
|
|
29
|
+
rows_with_changed_value: int
|
|
30
|
+
The number of rows whose value differs after the edit.
|
|
31
|
+
rows_with_changed_class: int | None
|
|
32
|
+
The number of rows whose predicted class differs after the edit.
|
|
33
|
+
largest_value_change: float
|
|
34
|
+
The largest absolute change of the value in one row.
|
|
35
|
+
mean_value_change: float
|
|
36
|
+
The mean change of the value over all rows. A positive number means that the edit raises the value on average.
|
|
37
|
+
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
row_count: int
|
|
41
|
+
rows_with_changed_value: int
|
|
42
|
+
rows_with_changed_class: int | None
|
|
43
|
+
largest_value_change: float
|
|
44
|
+
mean_value_change: float
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def row_changes(before: ExplainableBoostingModel, after: ExplainableBoostingModel, data: Frame) -> RowChanges:
|
|
48
|
+
"""Count the rows whose prediction differs between two models.
|
|
49
|
+
|
|
50
|
+
Parameters
|
|
51
|
+
----------
|
|
52
|
+
before : ExplainableBoostingModel
|
|
53
|
+
The model that the edit started from.
|
|
54
|
+
after : ExplainableBoostingModel
|
|
55
|
+
The model that the edit made. It has the same features as ``before``.
|
|
56
|
+
data : Frame
|
|
57
|
+
The rows. The frame needs a column for each feature of the model, and may have more columns.
|
|
58
|
+
|
|
59
|
+
Returns
|
|
60
|
+
-------
|
|
61
|
+
RowChanges
|
|
62
|
+
The counts and the size of the change.
|
|
63
|
+
|
|
64
|
+
Raises
|
|
65
|
+
------
|
|
66
|
+
InvalidInstanceError
|
|
67
|
+
If the frame lacks a column for a feature of the model.
|
|
68
|
+
|
|
69
|
+
"""
|
|
70
|
+
names = list(before.feature_names_in_)
|
|
71
|
+
missing = [name for name in names if name not in data.columns]
|
|
72
|
+
if missing:
|
|
73
|
+
msg = f"The data has no column for these features: {missing}."
|
|
74
|
+
raise InvalidInstanceError(msg)
|
|
75
|
+
# interpret reads the columns of a frame by position, so select them in the order of the model
|
|
76
|
+
rows = data.select(names).to_native()
|
|
77
|
+
|
|
78
|
+
def values(model: ExplainableBoostingModel) -> npt.NDArray[np.float64]:
|
|
79
|
+
# a classifier gives the probability of its positive class, and a regressor gives the predicted value
|
|
80
|
+
if isinstance(model, ExplainableBoostingClassifier):
|
|
81
|
+
return np.asarray(model.predict_proba(rows), dtype=float)[:, 1]
|
|
82
|
+
return np.asarray(model.predict(rows), dtype=float)
|
|
83
|
+
|
|
84
|
+
value_change = values(after) - values(before)
|
|
85
|
+
class_change = (
|
|
86
|
+
int(np.count_nonzero(np.asarray(after.predict(rows)) != np.asarray(before.predict(rows))))
|
|
87
|
+
if isinstance(before, ExplainableBoostingClassifier)
|
|
88
|
+
else None
|
|
89
|
+
)
|
|
90
|
+
return RowChanges(
|
|
91
|
+
row_count=len(value_change),
|
|
92
|
+
rows_with_changed_value=int(np.count_nonzero(value_change)),
|
|
93
|
+
rows_with_changed_class=class_change,
|
|
94
|
+
largest_value_change=float(np.abs(value_change).max(initial=0.0)),
|
|
95
|
+
mean_value_change=float(value_change.mean()) if len(value_change) else 0.0,
|
|
96
|
+
)
|
|
@@ -37,6 +37,9 @@ class EditReport:
|
|
|
37
37
|
``weight_share`` is the share of the training weight that the changed bins hold: the number of training rows that
|
|
38
38
|
the edit reaches, divided by the number of training rows. It needs no data. A ``bins_changed`` of 0 means that
|
|
39
39
|
the edit set every selected score to the value that it had.
|
|
40
|
+
|
|
41
|
+
``base_revision`` is the revision that the edit started from. ``revision`` is the revision that ``apply`` made, and
|
|
42
|
+
it is ``None`` for a ``preview``, which makes none.
|
|
40
43
|
"""
|
|
41
44
|
|
|
42
45
|
feature: str | None
|
|
@@ -52,6 +55,8 @@ class EditReport:
|
|
|
52
55
|
removed_terms: tuple[str, ...]
|
|
53
56
|
graph_before: str | None
|
|
54
57
|
graph_after: str | None
|
|
58
|
+
base_revision: str
|
|
59
|
+
revision: str | None = None
|
|
55
60
|
|
|
56
61
|
@property
|
|
57
62
|
def bins_changed(self) -> int:
|
|
@@ -111,6 +116,7 @@ def build_report(
|
|
|
111
116
|
after: ExplainableBoostingModel,
|
|
112
117
|
edit_type: str,
|
|
113
118
|
outcome: EditOutcome,
|
|
119
|
+
base_revision: str,
|
|
114
120
|
) -> EditReport:
|
|
115
121
|
"""Compare a model before and after an edit.
|
|
116
122
|
|
|
@@ -124,6 +130,8 @@ def build_report(
|
|
|
124
130
|
The name of the class of the edit.
|
|
125
131
|
outcome : EditOutcome
|
|
126
132
|
What the edit reported.
|
|
133
|
+
base_revision : str
|
|
134
|
+
The revision that ``before`` is, as ``EditSession.revision_info`` names it.
|
|
127
135
|
|
|
128
136
|
Returns
|
|
129
137
|
-------
|
|
@@ -146,6 +154,7 @@ def build_report(
|
|
|
146
154
|
removed_terms=outcome.removed_terms,
|
|
147
155
|
graph_before=None,
|
|
148
156
|
graph_after=None,
|
|
157
|
+
base_revision=base_revision,
|
|
149
158
|
)
|
|
150
159
|
view_before = term_view(before, outcome.feature)
|
|
151
160
|
view_after = term_view(after, outcome.feature)
|
|
@@ -178,4 +187,5 @@ def build_report(
|
|
|
178
187
|
removed_terms=(),
|
|
179
188
|
graph_before=_graph_text(before, outcome.feature),
|
|
180
189
|
graph_after=_graph_text(after, outcome.feature),
|
|
190
|
+
base_revision=base_revision,
|
|
181
191
|
)
|
|
@@ -47,6 +47,19 @@ def _utc_now() -> datetime:
|
|
|
47
47
|
return datetime.now(UTC)
|
|
48
48
|
|
|
49
49
|
|
|
50
|
+
@attrs.frozen
|
|
51
|
+
class RevisionInfo:
|
|
52
|
+
"""A revision and the state of the session at the moment of the read.
|
|
53
|
+
|
|
54
|
+
``revision`` is ``original`` or the id of an edit, never ``current``. ``head`` is the revision of the head, and
|
|
55
|
+
``edit_count`` is the number of edits that the head holds.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
revision: str
|
|
59
|
+
head: str
|
|
60
|
+
edit_count: int
|
|
61
|
+
|
|
62
|
+
|
|
50
63
|
@attrs.frozen(eq=False)
|
|
51
64
|
class _State:
|
|
52
65
|
"""The whole state of a session. A writer replaces it in one step, so a reader sees one consistent state."""
|
|
@@ -69,6 +82,17 @@ class _State:
|
|
|
69
82
|
def last_save_sequence(self) -> int:
|
|
70
83
|
return max((save.sequence for save in self.saves), default=-1)
|
|
71
84
|
|
|
85
|
+
def pending_edits(self) -> list[EditEntry]:
|
|
86
|
+
"""List the applied edits that no save has recorded yet, in the order of their sequence numbers.
|
|
87
|
+
|
|
88
|
+
Returns
|
|
89
|
+
-------
|
|
90
|
+
list[EditEntry]
|
|
91
|
+
The edits that the next save records.
|
|
92
|
+
|
|
93
|
+
"""
|
|
94
|
+
return [entry for entry in self.edits[: self.position] if entry.sequence > self.last_save_sequence()]
|
|
95
|
+
|
|
72
96
|
def entries(self) -> tuple[HistoryEntry, ...]:
|
|
73
97
|
return tuple(sorted((*self.edits, *self.saves), key=lambda entry: entry.sequence))
|
|
74
98
|
|
|
@@ -169,6 +193,25 @@ class EditSession:
|
|
|
169
193
|
"""The head: ``original``, or the id of the last applied edit."""
|
|
170
194
|
return self._state.head_revision
|
|
171
195
|
|
|
196
|
+
def revision_info(self, revision: str | uuid.UUID = CURRENT) -> "RevisionInfo":
|
|
197
|
+
"""Name a revision by its fixed name, and say what the head holds.
|
|
198
|
+
|
|
199
|
+
Parameters
|
|
200
|
+
----------
|
|
201
|
+
revision : str | uuid.UUID
|
|
202
|
+
The revision to name. ``current`` names the head.
|
|
203
|
+
|
|
204
|
+
Returns
|
|
205
|
+
-------
|
|
206
|
+
RevisionInfo
|
|
207
|
+
The fixed name of the revision, the head, and the number of edits that the head holds.
|
|
208
|
+
|
|
209
|
+
"""
|
|
210
|
+
state = self._state
|
|
211
|
+
position = state.position_of(revision)
|
|
212
|
+
name = ORIGINAL if position == 0 else str(state.edits[position - 1].id)
|
|
213
|
+
return RevisionInfo(revision=name, head=state.head_revision, edit_count=state.position)
|
|
214
|
+
|
|
172
215
|
@property
|
|
173
216
|
def model(self) -> ExplainableBoostingModel:
|
|
174
217
|
"""A copy of the model at the head. Changing it does not change the session."""
|
|
@@ -197,18 +240,26 @@ class EditSession:
|
|
|
197
240
|
"""The entries in the order of their sequence numbers: the edits, and the saves."""
|
|
198
241
|
return self._state.entries()
|
|
199
242
|
|
|
200
|
-
def history_table(self) -> list[HistoryRow]:
|
|
243
|
+
def history_table(self, *, pending_only: bool = False) -> list[HistoryRow]:
|
|
201
244
|
"""List the entries as rows: id, time, kind, feature, edit type, description, reason and review.
|
|
202
245
|
|
|
246
|
+
Parameters
|
|
247
|
+
----------
|
|
248
|
+
pending_only : bool
|
|
249
|
+
If ``True``, list only the applied edits that no save has recorded yet. These are the edits that the next
|
|
250
|
+
``save`` records. The short ids stay the same as in the whole table.
|
|
251
|
+
|
|
203
252
|
Returns
|
|
204
253
|
-------
|
|
205
254
|
list[HistoryRow]
|
|
206
255
|
One row for each entry. ``short_id`` is a short unique prefix of the random tail of the id.
|
|
207
256
|
|
|
208
257
|
"""
|
|
209
|
-
|
|
258
|
+
state = self._state
|
|
259
|
+
entries = state.entries()
|
|
210
260
|
shorts = short_ids([entry.id for entry in entries])
|
|
211
|
-
|
|
261
|
+
chosen = state.pending_edits() if pending_only else entries
|
|
262
|
+
return [entry.row(shorts[entry.id]) for entry in chosen]
|
|
212
263
|
|
|
213
264
|
def to_json(self) -> bytes:
|
|
214
265
|
"""Write the history as JSON that ``replay`` reads.
|
|
@@ -235,13 +286,14 @@ class EditSession:
|
|
|
235
286
|
Returns
|
|
236
287
|
-------
|
|
237
288
|
EditReport
|
|
238
|
-
The report that ``apply`` gives for the same edit on the same revision
|
|
289
|
+
The report that ``apply`` gives for the same edit on the same revision, except that its ``revision`` is
|
|
290
|
+
``None``.
|
|
239
291
|
|
|
240
292
|
"""
|
|
241
293
|
before = self.model_at(revision)
|
|
242
294
|
after = before.copy()
|
|
243
295
|
outcome = edit.run(after)
|
|
244
|
-
return build_report(before, after, type(edit).__name__, outcome)
|
|
296
|
+
return build_report(before, after, type(edit).__name__, outcome, self.revision_info(revision).revision)
|
|
245
297
|
|
|
246
298
|
def apply(self, edit: Edit, message: str, *, expected_revision: str | uuid.UUID | None = None) -> EditReport:
|
|
247
299
|
"""Apply an edit as a new revision.
|
|
@@ -271,7 +323,7 @@ class EditSession:
|
|
|
271
323
|
before = state.head_model
|
|
272
324
|
after = before.copy()
|
|
273
325
|
outcome = edit.run(after)
|
|
274
|
-
report = build_report(before, after, type(edit).__name__, outcome)
|
|
326
|
+
report = build_report(before, after, type(edit).__name__, outcome, state.head_revision)
|
|
275
327
|
with self._lock:
|
|
276
328
|
if self._state is state:
|
|
277
329
|
entry = EditEntry(
|
|
@@ -290,7 +342,7 @@ class EditSession:
|
|
|
290
342
|
position=state.position + 1,
|
|
291
343
|
next_sequence=state.next_sequence + 1,
|
|
292
344
|
)
|
|
293
|
-
return report
|
|
345
|
+
return attrs.evolve(report, revision=str(entry.id))
|
|
294
346
|
# another writer changed the state while this call computed, so compute again on the new head
|
|
295
347
|
|
|
296
348
|
def _move(self, target: Callable[[_State], int], expected_revision: str | uuid.UUID | None) -> str:
|
|
@@ -424,7 +476,7 @@ class EditSession:
|
|
|
424
476
|
_require_message(message)
|
|
425
477
|
state = self._state
|
|
426
478
|
state.check_expected(expected_revision)
|
|
427
|
-
pending =
|
|
479
|
+
pending = state.pending_edits()
|
|
428
480
|
unreviewed = [entry for entry in pending if not entry.reviewed]
|
|
429
481
|
if unreviewed and not allow_unreviewed:
|
|
430
482
|
ids = [str(entry.id) for entry in unreviewed]
|