ebaml 0.2.0__tar.gz → 0.2.1__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.2.0 → ebaml-0.2.1}/PKG-INFO +28 -2
- {ebaml-0.2.0 → ebaml-0.2.1}/README.md +27 -1
- {ebaml-0.2.0 → ebaml-0.2.1}/pyproject.toml +9 -1
- {ebaml-0.2.0 → ebaml-0.2.1}/pyproject.toml.orig +14 -1
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/graphs/ebm_graph.py +1 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/graphs/model_kinds.py +1 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/LICENSE +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/.baml-generator-output-root +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/.baml-generator-output.json +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/.gitignore +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/_baml_sources.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/_function_registry.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/_inlinedbaml.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/_invocation_types.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/_invocation_types.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/_typemap.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/clients/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/clients/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/content/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/content/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/errors/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/errors/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/events/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/events/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/internal/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/internal/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/mcp/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/mcp/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/stream/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/stream/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/tools/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/tools/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/wire/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/ai/wire/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/crypto/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/crypto/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/csv/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/csv/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/env/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/env/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/errors/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/errors/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/fs/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/fs/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/future/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/future/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/glob/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/glob/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/hash/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/hash/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/host/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/host/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/http/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/http/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/io/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/io/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/iter/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/iter/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/json/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/json/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/media/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/media/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/net/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/net/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/ops/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/ops/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/panics/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/panics/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/random/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/random/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/regex/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/regex/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/sap/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/sap/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/spawn/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/spawn/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/sys/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/sys/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/time/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/time/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/toml/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/toml/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/ws/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/ws/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/yaml/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/baml/yaml/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/experimental/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/experimental/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/py.typed +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/class_/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/class_/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/enum/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/enum/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/errors/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/errors/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/function/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/function/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/interface/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/reflect/interface/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/anthropic/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/anthropic/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/anthropic/internal/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/anthropic/internal/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/assert_/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/assert_/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/aws/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/aws/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/aws/internal/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/aws/internal/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/claude_code/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/claude_code/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/claude_code/internal/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/claude_code/internal/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/google/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/google/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/google/internal/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/google/internal/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/openai/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/openai/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/openai/internal/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/openai/internal/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/openai/internal/decisions/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/openai/internal/decisions/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/testing/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/testing/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/trace/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/trace/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/typesafeai/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/typesafeai/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/typesafeai/internal/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/typesafeai/internal/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/vercel/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/vercel/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/vercel/internal/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/baml_sdk/vendor/vercel/internal/__init__.pyi +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/benchmark.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/core/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/core/custom_types.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/core/exceptions.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/graphs/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/graphs/graph_text.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/llm/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/llm/descriptors.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/llm/options.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/llm/provider_errors.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/llm/retry.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/llm/sdk_setup.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/local/__init__.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/local/fact_text.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/local/facts.py +0 -0
- {ebaml-0.2.0 → ebaml-0.2.1}/src/ebaml/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ebaml
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
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
|
|
@@ -186,7 +186,8 @@ Three keyword-only arguments set the options. `graph=GraphOptions(...)` sets the
|
|
|
186
186
|
A multiclass classifier has one graph series per class. `GraphOptions(classes=[...])` selects the classes to describe,
|
|
187
187
|
because the text of a model with many classes is long. In every bin, the scores have the same mean over all the classes
|
|
188
188
|
of the model. Only the differences between the classes change the predicted probabilities.
|
|
189
|
-
`notebooks/multiclass.py` shows each option on the iris data.
|
|
189
|
+
`notebooks/multiclass.py` shows each option on the iris data. `notebooks/model_kinds.py` compares the graphs and the local
|
|
190
|
+
explanations of a binary classifier, a multiclass classifier and a regressor.
|
|
190
191
|
|
|
191
192
|
<!-- invisible-code-block: python
|
|
192
193
|
import numpy as np
|
|
@@ -304,6 +305,31 @@ compare what the LLM reads for a layperson and a data scientist, and (with a key
|
|
|
304
305
|
uv run marimo edit notebooks/local_explanations.py
|
|
305
306
|
```
|
|
306
307
|
|
|
308
|
+
[`notebooks/model_providers.py`](notebooks/model_providers.py) sends the same request to OpenRouter, OpenAI, Anthropic,
|
|
309
|
+
Ollama and a gateway with an OpenAI-compatible API, one section for each provider. It shows the key that each provider
|
|
310
|
+
needs, and the errors for an unknown provider and a missing key. Each button sends real requests to one provider.
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
uv run marimo edit notebooks/model_providers.py
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
[`notebooks/multiclass.py`](notebooks/multiclass.py) reads an EBM of the iris data, which has three classes. It shows the
|
|
317
|
+
graph with one series per class, the centring that keeps the predictions, the `classes` and `normalization` options, and
|
|
318
|
+
the errors of wrong options. Two buttons describe a graph and the whole model.
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
uv run marimo edit notebooks/multiclass.py
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
[`notebooks/model_kinds.py`](notebooks/model_kinds.py) fits a binary classifier, a multiclass classifier and a regressor
|
|
325
|
+
on the same iris features. It compares the kind that `model_kind` reads, the graph text of each kind, the fields of the
|
|
326
|
+
local explanations and the error for the kinds that they do not accept. One button for each model describes the same
|
|
327
|
+
graph.
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
uv run marimo edit notebooks/model_kinds.py
|
|
331
|
+
```
|
|
332
|
+
|
|
307
333
|
## Benchmark
|
|
308
334
|
|
|
309
335
|
The benchmark follows [TalkToEBM's benchmark](https://github.com/interpretml/TalkToEBM/tree/main/benchmark) that checks how well a
|
|
@@ -158,7 +158,8 @@ Three keyword-only arguments set the options. `graph=GraphOptions(...)` sets the
|
|
|
158
158
|
A multiclass classifier has one graph series per class. `GraphOptions(classes=[...])` selects the classes to describe,
|
|
159
159
|
because the text of a model with many classes is long. In every bin, the scores have the same mean over all the classes
|
|
160
160
|
of the model. Only the differences between the classes change the predicted probabilities.
|
|
161
|
-
`notebooks/multiclass.py` shows each option on the iris data.
|
|
161
|
+
`notebooks/multiclass.py` shows each option on the iris data. `notebooks/model_kinds.py` compares the graphs and the local
|
|
162
|
+
explanations of a binary classifier, a multiclass classifier and a regressor.
|
|
162
163
|
|
|
163
164
|
<!-- invisible-code-block: python
|
|
164
165
|
import numpy as np
|
|
@@ -276,6 +277,31 @@ compare what the LLM reads for a layperson and a data scientist, and (with a key
|
|
|
276
277
|
uv run marimo edit notebooks/local_explanations.py
|
|
277
278
|
```
|
|
278
279
|
|
|
280
|
+
[`notebooks/model_providers.py`](notebooks/model_providers.py) sends the same request to OpenRouter, OpenAI, Anthropic,
|
|
281
|
+
Ollama and a gateway with an OpenAI-compatible API, one section for each provider. It shows the key that each provider
|
|
282
|
+
needs, and the errors for an unknown provider and a missing key. Each button sends real requests to one provider.
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
uv run marimo edit notebooks/model_providers.py
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
[`notebooks/multiclass.py`](notebooks/multiclass.py) reads an EBM of the iris data, which has three classes. It shows the
|
|
289
|
+
graph with one series per class, the centring that keeps the predictions, the `classes` and `normalization` options, and
|
|
290
|
+
the errors of wrong options. Two buttons describe a graph and the whole model.
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
uv run marimo edit notebooks/multiclass.py
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
[`notebooks/model_kinds.py`](notebooks/model_kinds.py) fits a binary classifier, a multiclass classifier and a regressor
|
|
297
|
+
on the same iris features. It compares the kind that `model_kind` reads, the graph text of each kind, the fields of the
|
|
298
|
+
local explanations and the error for the kinds that they do not accept. One button for each model describes the same
|
|
299
|
+
graph.
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
uv run marimo edit notebooks/model_kinds.py
|
|
303
|
+
```
|
|
304
|
+
|
|
279
305
|
## Benchmark
|
|
280
306
|
|
|
281
307
|
The benchmark follows [TalkToEBM's benchmark](https://github.com/interpretml/TalkToEBM/tree/main/benchmark) that checks how well a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ebaml"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "BAML for Explainable Boosting Machines: talk to your EBM."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -42,6 +42,14 @@ Changelog = "https://github.com/johnny-godoy/EBaMl/blob/main/CHANGELOG.md"
|
|
|
42
42
|
|
|
43
43
|
[tool.uv]
|
|
44
44
|
exclude-newer = "7 days"
|
|
45
|
+
override-dependencies = [
|
|
46
|
+
"mcp>=1.30.0,<2",
|
|
47
|
+
"opentelemetry-api>=1.45.1,<2",
|
|
48
|
+
"opentelemetry-sdk>=1.45.1,<2",
|
|
49
|
+
"opentelemetry-exporter-otlp-proto-http>=1.45.1,<2",
|
|
50
|
+
"opentelemetry-instrumentation-requests>=0.66b0",
|
|
51
|
+
"opentelemetry-instrumentation-threading>=0.66b0",
|
|
52
|
+
]
|
|
45
53
|
|
|
46
54
|
[tool.uv.exclude-newer-package]
|
|
47
55
|
certifi = false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ebaml"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "BAML for Explainable Boosting Machines: talk to your EBM."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -43,6 +43,19 @@ exclude-newer = "7 days"
|
|
|
43
43
|
# skew error. CI installs the newest toolchain, and toolchain 0.23.0 changed the ai.Client interface, so the repository
|
|
44
44
|
# needs baml-bridge 0.23.0 at once. Remove the entry once 0.23.0 is more than 7 days old.
|
|
45
45
|
exclude-newer-package = { certifi = false, baml-bridge = false }
|
|
46
|
+
# reason: semgrep 1.182.1 pins mcp==1.29.0 and opentelemetry-api~=1.37.0, which have 5 known CVEs fixed in mcp 1.30.0
|
|
47
|
+
# and opentelemetry-api 1.45.1. Dependabot cannot update them, so the override forces the fixed releases. The
|
|
48
|
+
# opentelemetry packages must move together, because semgrep fails to import with opentelemetry-api 1.45 and the older
|
|
49
|
+
# exporter. The upper bound keeps mcp on 1.x. Remove the override once semgrep loosens its pins
|
|
50
|
+
# (https://github.com/semgrep/semgrep/issues/12018).
|
|
51
|
+
override-dependencies = [
|
|
52
|
+
"mcp>=1.30.0,<2",
|
|
53
|
+
"opentelemetry-api>=1.45.1,<2",
|
|
54
|
+
"opentelemetry-sdk>=1.45.1,<2",
|
|
55
|
+
"opentelemetry-exporter-otlp-proto-http>=1.45.1,<2",
|
|
56
|
+
"opentelemetry-instrumentation-requests>=0.66b0",
|
|
57
|
+
"opentelemetry-instrumentation-threading>=0.66b0",
|
|
58
|
+
]
|
|
46
59
|
|
|
47
60
|
[tool.uv.build-backend]
|
|
48
61
|
# baml_sdk is generated by `baml generate` and gitignored: run it before `uv build`, or the wheel lacks it.
|
|
@@ -336,6 +336,7 @@ class EBMGraph:
|
|
|
336
336
|
classes of the model, before it selects ``classes``. The standard deviations stay those of the EBM.
|
|
337
337
|
The normalization then shifts all the scores by one constant, so the differences between the classes of a bin
|
|
338
338
|
do not change.
|
|
339
|
+
``proofs/papers/multiclass-scores/paper.typ`` proves that these graphs keep the predictions of the EBM.
|
|
339
340
|
|
|
340
341
|
"""
|
|
341
342
|
# read the variables from the ebm
|
|
@@ -88,6 +88,7 @@ class MulticlassClassifier(ModelKind):
|
|
|
88
88
|
|
|
89
89
|
Softmax does not change when the same constant is added to the scores of all classes, so only the differences
|
|
90
90
|
between the classes of a bin carry meaning.
|
|
91
|
+
The proof is in ``proofs/papers/multiclass-scores/paper.typ``.
|
|
91
92
|
|
|
92
93
|
Examples
|
|
93
94
|
--------
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|