ebaml 0.3.2__tar.gz → 0.3.3__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.3.2 → ebaml-0.3.3}/PKG-INFO +15 -16
- {ebaml-0.3.2 → ebaml-0.3.3}/README.md +14 -15
- {ebaml-0.3.2 → ebaml-0.3.3}/pyproject.toml +1 -4
- {ebaml-0.3.2 → ebaml-0.3.3}/pyproject.toml.orig +1 -5
- ebaml-0.3.3/src/ebaml/__init__.py +176 -0
- ebaml-0.3.2/src/ebaml/__init__.py +0 -75
- {ebaml-0.3.2 → ebaml-0.3.3}/LICENSE +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/.baml-generator-output-root +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/.baml-generator-output.json +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/.gitignore +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_baml_sources.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_function_registry.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_inlinedbaml.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_invocation_types.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_invocation_types.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_typemap.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/clients/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/clients/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/content/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/content/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/errors/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/errors/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/events/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/events/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/internal/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/internal/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/mcp/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/mcp/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/stream/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/stream/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/tools/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/tools/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/wire/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/wire/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/crypto/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/crypto/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/csv/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/csv/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/env/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/env/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/errors/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/errors/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/fs/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/fs/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/future/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/future/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/glob/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/glob/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/hash/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/hash/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/host/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/host/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/http/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/http/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/io/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/io/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/iter/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/iter/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/json/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/json/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/media/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/media/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/net/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/net/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/ops/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/ops/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/panics/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/panics/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/random/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/random/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/regex/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/regex/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/sap/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/sap/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/spawn/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/spawn/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/sys/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/sys/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/time/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/time/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/toml/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/toml/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/ws/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/ws/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/yaml/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/yaml/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/experimental/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/experimental/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/py.typed +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/class_/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/class_/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/enum/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/enum/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/errors/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/errors/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/function/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/function/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/interface/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/interface/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/anthropic/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/anthropic/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/anthropic/internal/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/anthropic/internal/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/assert_/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/assert_/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/aws/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/aws/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/aws/internal/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/aws/internal/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/claude_code/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/claude_code/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/claude_code/internal/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/claude_code/internal/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/google/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/google/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/google/internal/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/google/internal/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/internal/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/internal/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/internal/decisions/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/internal/decisions/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/testing/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/testing/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/trace/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/trace/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/typesafeai/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/typesafeai/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/typesafeai/internal/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/typesafeai/internal/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/vercel/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/vercel/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/vercel/internal/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/vercel/internal/__init__.pyi +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/benchmark.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/core/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/core/custom_types.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/core/exceptions.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/ebm_graph.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/graph_text.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/model_kinds.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/request_text.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/terms.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/token_budget.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/token_weights.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/descriptors.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/options.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/provider_errors.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/retry.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/sdk_setup.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/token_learning.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/token_weights.json +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/local/__init__.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/local/audience.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/local/fact_text.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/local/facts.py +0 -0
- {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ebaml
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
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
|
|
@@ -124,10 +124,10 @@ baml generate
|
|
|
124
124
|
This writes the `src/baml_sdk/` package from `baml_src/`, next to `ebaml`, so it imports wherever the project is
|
|
125
125
|
installed. Rerun it every time a `.baml` file changes, including when you change the provider.
|
|
126
126
|
|
|
127
|
-
If `src/baml_sdk/` does not exist,
|
|
128
|
-
|
|
129
|
-
`baml
|
|
130
|
-
again with `--agent-skill-check off`. If none of this works, `SDKUnavailableError` lists the steps that fix the cause.
|
|
127
|
+
If `src/baml_sdk/` does not exist, the first use of `describe_graph`, `describe_ebm` or `explain_instance` runs
|
|
128
|
+
`baml generate`. `import ebaml` alone does not run it. If the package was generated by another BAML toolchain than the one
|
|
129
|
+
that `baml-bridge` expects (a version skew), the first use runs `baml toolchain use <version>` and `baml generate`. If
|
|
130
|
+
the agent skill check stops `baml generate`, the first use runs it again with `--agent-skill-check off`. If none of this works, `SDKUnavailableError` lists the steps that fix the cause.
|
|
131
131
|
|
|
132
132
|
### 5. Check the setup
|
|
133
133
|
|
|
@@ -169,8 +169,8 @@ It fits a small EBM, runs the three-turn chain directly and checks that the prov
|
|
|
169
169
|
```python
|
|
170
170
|
from interpret.glassbox import ExplainableBoostingClassifier
|
|
171
171
|
|
|
172
|
-
from ebaml
|
|
173
|
-
from ebaml
|
|
172
|
+
from ebaml import describe_ebm, describe_graph
|
|
173
|
+
from ebaml import PromptOptions
|
|
174
174
|
|
|
175
175
|
ebm = ExplainableBoostingClassifier().fit(X, y)
|
|
176
176
|
|
|
@@ -184,7 +184,7 @@ embedded in a longer prompt. It needs the confidence bounds, and it only reads c
|
|
|
184
184
|
Three keyword-only arguments set the options. `graph=GraphOptions(...)` sets the options of `EBMGraph.from_ebm` and
|
|
185
185
|
`EBMGraph.to_text`, for example `max_tokens`. `prompt=PromptOptions(...)` sets the descriptions that the prompts use
|
|
186
186
|
(`expert_description`, `graph_description`, `dataset_description` and `task_description`). `model=` selects the LLM, see
|
|
187
|
-
"Choosing the model".
|
|
187
|
+
"Choosing the model". `GraphOptions`, `PromptOptions` and `ModelOptions` are importable from `ebaml`. Token usage reported by the provider is logged at `INFO` on the `ebaml.llm.descriptors` logger.
|
|
188
188
|
|
|
189
189
|
A multiclass classifier has one graph series per class. `GraphOptions(classes=[...])` selects the classes to describe,
|
|
190
190
|
because the text of a model with many classes is long. In every bin, the scores have the same mean over all the classes
|
|
@@ -199,7 +199,7 @@ y_multiclass = np.select([X["age"] < 30, X["age"] < 60], ["young", "middle"], "o
|
|
|
199
199
|
-->
|
|
200
200
|
|
|
201
201
|
```python
|
|
202
|
-
from ebaml
|
|
202
|
+
from ebaml import GraphOptions
|
|
203
203
|
|
|
204
204
|
multiclass = ExplainableBoostingClassifier(interactions=0).fit(X, y_multiclass)
|
|
205
205
|
print(describe_graph(multiclass, feature_index=0, graph=GraphOptions(classes=["young", "old"])))
|
|
@@ -208,7 +208,7 @@ print(describe_graph(multiclass, feature_index=0, graph=GraphOptions(classes=["y
|
|
|
208
208
|
### Explaining one prediction
|
|
209
209
|
|
|
210
210
|
```python
|
|
211
|
-
from ebaml
|
|
211
|
+
from ebaml import describe_ebm, explain_instance
|
|
212
212
|
|
|
213
213
|
ebm = ExplainableBoostingClassifier(interactions=0).fit(X, y) # binary classifier, no interactions
|
|
214
214
|
global_explanation = describe_ebm(ebm) # computed once, prepended to every local prompt
|
|
@@ -252,8 +252,7 @@ of `ebaml` apart from the errors of other code. Each error for a bad value also
|
|
|
252
252
|
| `RateLimitedError` | no | A provider limits the rate of the requests. |
|
|
253
253
|
| `ProviderUnreachableError` | no | A request does not reach the provider. |
|
|
254
254
|
|
|
255
|
-
`EBMGraphShapeError`, `EBMGraphTokenLimitError` and `EBMGraphSimplificationError` derive from `EBMGraphError`. The four provider errors derive from `LLMRequestError`.
|
|
256
|
-
them too.
|
|
255
|
+
`EBMGraphShapeError`, `EBMGraphTokenLimitError` and `EBMGraphSimplificationError` derive from `EBMGraphError`. The four provider errors derive from `LLMRequestError`. `ebaml` exports all of these classes.
|
|
257
256
|
|
|
258
257
|
<!-- --8<-- [end:usage] -->
|
|
259
258
|
## How it works
|
|
@@ -288,9 +287,9 @@ them too.
|
|
|
288
287
|
graph texts that one current model counted. The estimate has a margin above the fit, so it is more often too high
|
|
289
288
|
than too low. Other models count other numbers of tokens, so the estimate is a guide. Going a little over
|
|
290
289
|
`max_tokens` only warns. Going more than `overbudget_percent` (default 50) over makes `to_text` simplify the graph, or
|
|
291
|
-
raise if it cannot. The provider's own error is the real limit.
|
|
290
|
+
raise if it cannot. The provider's own error is the real limit. `describe_graph`, `describe_ebm` and `explain_instance` pass the
|
|
292
291
|
check. A direct call of `EBMGraph.to_text` checks nothing, unless you pass `check_budget`, for example
|
|
293
|
-
`ebaml.
|
|
292
|
+
`ebaml.check_token_budget`. That check needs no LLM and no key. To choose the weights, pass a
|
|
294
293
|
`TokenEstimator` instead. To use the weights of each model and to learn them, pass
|
|
295
294
|
`GraphOptions(token_learner=TokenLearner(learning=True))`. The learner starts each model at the weights of a table
|
|
296
295
|
that ships with the package. Then it moves them toward the tokens of the graphs in your real calls. The weights
|
|
@@ -368,7 +367,7 @@ request of that call to that model. You do not change the package.
|
|
|
368
367
|
Pass the shorthand `"provider/model"`:
|
|
369
368
|
|
|
370
369
|
```python
|
|
371
|
-
from ebaml
|
|
370
|
+
from ebaml import describe_ebm
|
|
372
371
|
|
|
373
372
|
print(describe_ebm(ebm, model="anthropic/claude-haiku-4-5"))
|
|
374
373
|
```
|
|
@@ -376,7 +375,7 @@ print(describe_ebm(ebm, model="anthropic/claude-haiku-4-5"))
|
|
|
376
375
|
Pass `ModelOptions` to set more:
|
|
377
376
|
|
|
378
377
|
```python
|
|
379
|
-
from ebaml
|
|
378
|
+
from ebaml import ModelOptions
|
|
380
379
|
|
|
381
380
|
model = ModelOptions(provider="anthropic", model="claude-haiku-4-5", temperature=0.2, max_output_tokens=8000)
|
|
382
381
|
print(describe_ebm(ebm, model=model))
|
|
@@ -93,10 +93,10 @@ baml generate
|
|
|
93
93
|
This writes the `src/baml_sdk/` package from `baml_src/`, next to `ebaml`, so it imports wherever the project is
|
|
94
94
|
installed. Rerun it every time a `.baml` file changes, including when you change the provider.
|
|
95
95
|
|
|
96
|
-
If `src/baml_sdk/` does not exist,
|
|
97
|
-
|
|
98
|
-
`baml
|
|
99
|
-
again with `--agent-skill-check off`. If none of this works, `SDKUnavailableError` lists the steps that fix the cause.
|
|
96
|
+
If `src/baml_sdk/` does not exist, the first use of `describe_graph`, `describe_ebm` or `explain_instance` runs
|
|
97
|
+
`baml generate`. `import ebaml` alone does not run it. If the package was generated by another BAML toolchain than the one
|
|
98
|
+
that `baml-bridge` expects (a version skew), the first use runs `baml toolchain use <version>` and `baml generate`. If
|
|
99
|
+
the agent skill check stops `baml generate`, the first use runs it again with `--agent-skill-check off`. If none of this works, `SDKUnavailableError` lists the steps that fix the cause.
|
|
100
100
|
|
|
101
101
|
### 5. Check the setup
|
|
102
102
|
|
|
@@ -138,8 +138,8 @@ It fits a small EBM, runs the three-turn chain directly and checks that the prov
|
|
|
138
138
|
```python
|
|
139
139
|
from interpret.glassbox import ExplainableBoostingClassifier
|
|
140
140
|
|
|
141
|
-
from ebaml
|
|
142
|
-
from ebaml
|
|
141
|
+
from ebaml import describe_ebm, describe_graph
|
|
142
|
+
from ebaml import PromptOptions
|
|
143
143
|
|
|
144
144
|
ebm = ExplainableBoostingClassifier().fit(X, y)
|
|
145
145
|
|
|
@@ -153,7 +153,7 @@ embedded in a longer prompt. It needs the confidence bounds, and it only reads c
|
|
|
153
153
|
Three keyword-only arguments set the options. `graph=GraphOptions(...)` sets the options of `EBMGraph.from_ebm` and
|
|
154
154
|
`EBMGraph.to_text`, for example `max_tokens`. `prompt=PromptOptions(...)` sets the descriptions that the prompts use
|
|
155
155
|
(`expert_description`, `graph_description`, `dataset_description` and `task_description`). `model=` selects the LLM, see
|
|
156
|
-
"Choosing the model".
|
|
156
|
+
"Choosing the model". `GraphOptions`, `PromptOptions` and `ModelOptions` are importable from `ebaml`. Token usage reported by the provider is logged at `INFO` on the `ebaml.llm.descriptors` logger.
|
|
157
157
|
|
|
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
|
|
@@ -168,7 +168,7 @@ y_multiclass = np.select([X["age"] < 30, X["age"] < 60], ["young", "middle"], "o
|
|
|
168
168
|
-->
|
|
169
169
|
|
|
170
170
|
```python
|
|
171
|
-
from ebaml
|
|
171
|
+
from ebaml import GraphOptions
|
|
172
172
|
|
|
173
173
|
multiclass = ExplainableBoostingClassifier(interactions=0).fit(X, y_multiclass)
|
|
174
174
|
print(describe_graph(multiclass, feature_index=0, graph=GraphOptions(classes=["young", "old"])))
|
|
@@ -177,7 +177,7 @@ print(describe_graph(multiclass, feature_index=0, graph=GraphOptions(classes=["y
|
|
|
177
177
|
### Explaining one prediction
|
|
178
178
|
|
|
179
179
|
```python
|
|
180
|
-
from ebaml
|
|
180
|
+
from ebaml import describe_ebm, explain_instance
|
|
181
181
|
|
|
182
182
|
ebm = ExplainableBoostingClassifier(interactions=0).fit(X, y) # binary classifier, no interactions
|
|
183
183
|
global_explanation = describe_ebm(ebm) # computed once, prepended to every local prompt
|
|
@@ -221,8 +221,7 @@ of `ebaml` apart from the errors of other code. Each error for a bad value also
|
|
|
221
221
|
| `RateLimitedError` | no | A provider limits the rate of the requests. |
|
|
222
222
|
| `ProviderUnreachableError` | no | A request does not reach the provider. |
|
|
223
223
|
|
|
224
|
-
`EBMGraphShapeError`, `EBMGraphTokenLimitError` and `EBMGraphSimplificationError` derive from `EBMGraphError`. The four provider errors derive from `LLMRequestError`.
|
|
225
|
-
them too.
|
|
224
|
+
`EBMGraphShapeError`, `EBMGraphTokenLimitError` and `EBMGraphSimplificationError` derive from `EBMGraphError`. The four provider errors derive from `LLMRequestError`. `ebaml` exports all of these classes.
|
|
226
225
|
|
|
227
226
|
<!-- --8<-- [end:usage] -->
|
|
228
227
|
## How it works
|
|
@@ -257,9 +256,9 @@ them too.
|
|
|
257
256
|
graph texts that one current model counted. The estimate has a margin above the fit, so it is more often too high
|
|
258
257
|
than too low. Other models count other numbers of tokens, so the estimate is a guide. Going a little over
|
|
259
258
|
`max_tokens` only warns. Going more than `overbudget_percent` (default 50) over makes `to_text` simplify the graph, or
|
|
260
|
-
raise if it cannot. The provider's own error is the real limit.
|
|
259
|
+
raise if it cannot. The provider's own error is the real limit. `describe_graph`, `describe_ebm` and `explain_instance` pass the
|
|
261
260
|
check. A direct call of `EBMGraph.to_text` checks nothing, unless you pass `check_budget`, for example
|
|
262
|
-
`ebaml.
|
|
261
|
+
`ebaml.check_token_budget`. That check needs no LLM and no key. To choose the weights, pass a
|
|
263
262
|
`TokenEstimator` instead. To use the weights of each model and to learn them, pass
|
|
264
263
|
`GraphOptions(token_learner=TokenLearner(learning=True))`. The learner starts each model at the weights of a table
|
|
265
264
|
that ships with the package. Then it moves them toward the tokens of the graphs in your real calls. The weights
|
|
@@ -337,7 +336,7 @@ request of that call to that model. You do not change the package.
|
|
|
337
336
|
Pass the shorthand `"provider/model"`:
|
|
338
337
|
|
|
339
338
|
```python
|
|
340
|
-
from ebaml
|
|
339
|
+
from ebaml import describe_ebm
|
|
341
340
|
|
|
342
341
|
print(describe_ebm(ebm, model="anthropic/claude-haiku-4-5"))
|
|
343
342
|
```
|
|
@@ -345,7 +344,7 @@ print(describe_ebm(ebm, model="anthropic/claude-haiku-4-5"))
|
|
|
345
344
|
Pass `ModelOptions` to set more:
|
|
346
345
|
|
|
347
346
|
```python
|
|
348
|
-
from ebaml
|
|
347
|
+
from ebaml import ModelOptions
|
|
349
348
|
|
|
350
349
|
model = ModelOptions(provider="anthropic", model="claude-haiku-4-5", temperature=0.2, max_output_tokens=8000)
|
|
351
350
|
print(describe_ebm(ebm, model=model))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ebaml"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.3"
|
|
4
4
|
description = "BAML for Explainable Boosting Machines: talk to your EBM."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -54,9 +54,6 @@ override-dependencies = [
|
|
|
54
54
|
"opentelemetry-instrumentation-threading>=0.66b0",
|
|
55
55
|
]
|
|
56
56
|
|
|
57
|
-
[tool.uv.exclude-newer-package]
|
|
58
|
-
baml-bridge = false
|
|
59
|
-
|
|
60
57
|
[tool.uv.build-backend]
|
|
61
58
|
module-name = [
|
|
62
59
|
"ebaml",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ebaml"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.3"
|
|
4
4
|
description = "BAML for Explainable Boosting Machines: talk to your EBM."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -39,10 +39,6 @@ Changelog = "https://github.com/johnny-godoy/EBaMl/blob/main/CHANGELOG.md"
|
|
|
39
39
|
[tool.uv]
|
|
40
40
|
# A relative span keeps the cutoff 7 days behind today, so uv never picks a release that is less than 7 days old.
|
|
41
41
|
exclude-newer = "7 days"
|
|
42
|
-
# reason: baml-bridge must match the BAML toolchain that generates src/baml_sdk, or the SDK fails at start with a version
|
|
43
|
-
# skew error. CI installs the newest toolchain, and toolchain 0.23.0 changed the ai.Client interface, so the repository
|
|
44
|
-
# needs baml-bridge 0.23.0 at once. Remove the entry once 0.23.0 is more than 7 days old.
|
|
45
|
-
exclude-newer-package = { baml-bridge = false }
|
|
46
42
|
# 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
43
|
# and opentelemetry-api 1.45.1. Dependabot cannot update them, so the override forces the fixed releases. The
|
|
48
44
|
# opentelemetry packages must move together, because semgrep fails to import with opentelemetry-api 1.45 and the older
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"""Talk 2 EBM in BAML.
|
|
2
|
+
|
|
3
|
+
Import every public name from ``ebaml``. The names ``describe_graph``, ``describe_ebm``, ``explain_instance`` and
|
|
4
|
+
``LocalExplanation`` load on first use, because the module that holds them can run ``baml generate``.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from importlib.metadata import version
|
|
8
|
+
from typing import TYPE_CHECKING, cast
|
|
9
|
+
|
|
10
|
+
from beartype import BeartypeConf
|
|
11
|
+
from beartype.claw import beartype_this_package
|
|
12
|
+
|
|
13
|
+
# The hook must run before any submodule import, or those modules stay unchecked.
|
|
14
|
+
# The numeric tower lets an int satisfy a float hint, as PEP 484 says.
|
|
15
|
+
# Checking annotated variables is off, because structlog's lazy logger proxy does not match its own logger type.
|
|
16
|
+
beartype_this_package(conf=BeartypeConf(is_pep484_tower=True, claw_is_pep526=False)) # ruff: ignore[non-empty-init-module] -- the hook must run before the submodule imports below
|
|
17
|
+
|
|
18
|
+
from ebaml.core.custom_types import FeatureType, Normalization # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
19
|
+
from ebaml.core.exceptions import ( # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
20
|
+
APIKeyRejectedError,
|
|
21
|
+
EBaMlError,
|
|
22
|
+
EBMGraphError,
|
|
23
|
+
EBMGraphShapeError,
|
|
24
|
+
EBMGraphSimplificationError,
|
|
25
|
+
EBMGraphTokenLimitError,
|
|
26
|
+
GraphTextError,
|
|
27
|
+
InvalidInstanceError,
|
|
28
|
+
InvalidOptionError,
|
|
29
|
+
LLMRequestError,
|
|
30
|
+
MissingAPIKeyError,
|
|
31
|
+
OptionRangeError,
|
|
32
|
+
ProviderUnreachableError,
|
|
33
|
+
RateLimitedError,
|
|
34
|
+
SDKUnavailableError,
|
|
35
|
+
TokenFitError,
|
|
36
|
+
UnsupportedModelError,
|
|
37
|
+
)
|
|
38
|
+
from ebaml.graphs.ebm_graph import EBMGraph # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
39
|
+
from ebaml.graphs.model_kinds import ( # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
40
|
+
BinaryClassifier,
|
|
41
|
+
ModelKind,
|
|
42
|
+
MulticlassClassifier,
|
|
43
|
+
Regressor,
|
|
44
|
+
model_kind,
|
|
45
|
+
)
|
|
46
|
+
from ebaml.graphs.token_budget import check_token_budget # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
47
|
+
from ebaml.llm.options import GraphOptions, ModelOptions, PromptOptions # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
48
|
+
from ebaml.local.audience import ( # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
49
|
+
Audience,
|
|
50
|
+
DataScientist,
|
|
51
|
+
Layperson,
|
|
52
|
+
likelihood_word,
|
|
53
|
+
points_towards,
|
|
54
|
+
resolve_audience,
|
|
55
|
+
round_value,
|
|
56
|
+
strength_word,
|
|
57
|
+
)
|
|
58
|
+
from ebaml.local.fact_text import FactTexts, facts_to_texts # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
59
|
+
from ebaml.local.facts import ( # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
60
|
+
Change,
|
|
61
|
+
CompletionStep,
|
|
62
|
+
Contribution,
|
|
63
|
+
Counterfactual,
|
|
64
|
+
LocalFacts,
|
|
65
|
+
LocalOptions,
|
|
66
|
+
Prediction,
|
|
67
|
+
SufficientReason,
|
|
68
|
+
compute_local_facts,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
if TYPE_CHECKING:
|
|
72
|
+
from ebaml.llm.descriptors import LocalExplanation, describe_ebm, describe_graph, explain_instance
|
|
73
|
+
|
|
74
|
+
__version__: str = version("ebaml")
|
|
75
|
+
|
|
76
|
+
__all__ = [
|
|
77
|
+
"APIKeyRejectedError",
|
|
78
|
+
"Audience",
|
|
79
|
+
"BinaryClassifier",
|
|
80
|
+
"Change",
|
|
81
|
+
"CompletionStep",
|
|
82
|
+
"Contribution",
|
|
83
|
+
"Counterfactual",
|
|
84
|
+
"DataScientist",
|
|
85
|
+
"EBMGraph",
|
|
86
|
+
"EBMGraphError",
|
|
87
|
+
"EBMGraphShapeError",
|
|
88
|
+
"EBMGraphSimplificationError",
|
|
89
|
+
"EBMGraphTokenLimitError",
|
|
90
|
+
"EBaMlError",
|
|
91
|
+
"FactTexts",
|
|
92
|
+
"FeatureType",
|
|
93
|
+
"GraphOptions",
|
|
94
|
+
"GraphTextError",
|
|
95
|
+
"InvalidInstanceError",
|
|
96
|
+
"InvalidOptionError",
|
|
97
|
+
"LLMRequestError",
|
|
98
|
+
"Layperson",
|
|
99
|
+
"LocalExplanation",
|
|
100
|
+
"LocalFacts",
|
|
101
|
+
"LocalOptions",
|
|
102
|
+
"MissingAPIKeyError",
|
|
103
|
+
"ModelKind",
|
|
104
|
+
"ModelOptions",
|
|
105
|
+
"MulticlassClassifier",
|
|
106
|
+
"Normalization",
|
|
107
|
+
"OptionRangeError",
|
|
108
|
+
"Prediction",
|
|
109
|
+
"PromptOptions",
|
|
110
|
+
"ProviderUnreachableError",
|
|
111
|
+
"RateLimitedError",
|
|
112
|
+
"Regressor",
|
|
113
|
+
"SDKUnavailableError",
|
|
114
|
+
"SufficientReason",
|
|
115
|
+
"TokenFitError",
|
|
116
|
+
"UnsupportedModelError",
|
|
117
|
+
"__version__",
|
|
118
|
+
"check_token_budget",
|
|
119
|
+
"compute_local_facts",
|
|
120
|
+
"describe_ebm",
|
|
121
|
+
"describe_graph",
|
|
122
|
+
"explain_instance",
|
|
123
|
+
"facts_to_texts",
|
|
124
|
+
"likelihood_word",
|
|
125
|
+
"model_kind",
|
|
126
|
+
"points_towards",
|
|
127
|
+
"resolve_audience",
|
|
128
|
+
"round_value",
|
|
129
|
+
"strength_word",
|
|
130
|
+
]
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
# nosemgrep: ebaml-no-object-type -- PEP 562 returns a function or a class chosen by name, so no single type fits
|
|
134
|
+
def __getattr__(name: str) -> object:
|
|
135
|
+
"""Load a name of ``ebaml.llm.descriptors`` on first use.
|
|
136
|
+
|
|
137
|
+
That module can run ``baml generate`` when it is imported, so ``import ebaml`` must not load it. The loaded name
|
|
138
|
+
goes into the module namespace, and the next access skips this function.
|
|
139
|
+
|
|
140
|
+
Parameters
|
|
141
|
+
----------
|
|
142
|
+
name
|
|
143
|
+
The name of the attribute.
|
|
144
|
+
|
|
145
|
+
Returns
|
|
146
|
+
-------
|
|
147
|
+
object
|
|
148
|
+
The function or class of ``ebaml.llm.descriptors`` with this name.
|
|
149
|
+
|
|
150
|
+
Raises
|
|
151
|
+
------
|
|
152
|
+
AttributeError
|
|
153
|
+
If ``name`` is not a public name that loads on first use.
|
|
154
|
+
|
|
155
|
+
"""
|
|
156
|
+
lazy_names = {"LocalExplanation", "describe_ebm", "describe_graph", "explain_instance"}
|
|
157
|
+
if name not in lazy_names:
|
|
158
|
+
msg = f"module {__name__!r} has no attribute {name!r}"
|
|
159
|
+
raise AttributeError(msg)
|
|
160
|
+
from ebaml.llm import descriptors # ruff: ignore[import-outside-top-level] -- the import must wait until first use
|
|
161
|
+
|
|
162
|
+
value = getattr(descriptors, name)
|
|
163
|
+
globals()[name] = value
|
|
164
|
+
return cast("object", value) # getattr returns Any, and the hint names the real type
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def __dir__() -> list[str]:
|
|
168
|
+
"""List the public names, including the names that load on first use.
|
|
169
|
+
|
|
170
|
+
Returns
|
|
171
|
+
-------
|
|
172
|
+
list[str]
|
|
173
|
+
The sorted names of ``__all__``.
|
|
174
|
+
|
|
175
|
+
"""
|
|
176
|
+
return sorted(__all__)
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"""Talk 2 EBM in BAML."""
|
|
2
|
-
|
|
3
|
-
from importlib.metadata import version
|
|
4
|
-
|
|
5
|
-
from beartype import BeartypeConf
|
|
6
|
-
from beartype.claw import beartype_this_package
|
|
7
|
-
|
|
8
|
-
# The hook must run before any submodule import, or those modules stay unchecked.
|
|
9
|
-
# The numeric tower lets an int satisfy a float hint, as PEP 484 says.
|
|
10
|
-
# Checking annotated variables is off, because structlog's lazy logger proxy does not match its own logger type.
|
|
11
|
-
beartype_this_package(conf=BeartypeConf(is_pep484_tower=True, claw_is_pep526=False)) # ruff: ignore[non-empty-init-module] -- the hook must run before the submodule imports below
|
|
12
|
-
|
|
13
|
-
from ebaml.core.custom_types import FeatureType, Normalization # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
14
|
-
from ebaml.core.exceptions import ( # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
15
|
-
APIKeyRejectedError,
|
|
16
|
-
EBaMlError,
|
|
17
|
-
EBMGraphError,
|
|
18
|
-
EBMGraphShapeError,
|
|
19
|
-
EBMGraphSimplificationError,
|
|
20
|
-
EBMGraphTokenLimitError,
|
|
21
|
-
GraphTextError,
|
|
22
|
-
InvalidInstanceError,
|
|
23
|
-
InvalidOptionError,
|
|
24
|
-
LLMRequestError,
|
|
25
|
-
MissingAPIKeyError,
|
|
26
|
-
OptionRangeError,
|
|
27
|
-
ProviderUnreachableError,
|
|
28
|
-
RateLimitedError,
|
|
29
|
-
SDKUnavailableError,
|
|
30
|
-
TokenFitError,
|
|
31
|
-
UnsupportedModelError,
|
|
32
|
-
)
|
|
33
|
-
from ebaml.graphs.ebm_graph import EBMGraph # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
34
|
-
from ebaml.graphs.model_kinds import ( # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
35
|
-
BinaryClassifier,
|
|
36
|
-
ModelKind,
|
|
37
|
-
MulticlassClassifier,
|
|
38
|
-
Regressor,
|
|
39
|
-
model_kind,
|
|
40
|
-
)
|
|
41
|
-
from ebaml.local.audience import Audience, DataScientist, Layperson # ruff: ignore[module-import-not-at-top-of-file] -- the beartype hook must run first
|
|
42
|
-
|
|
43
|
-
__version__: str = version("ebaml")
|
|
44
|
-
|
|
45
|
-
__all__ = [
|
|
46
|
-
"APIKeyRejectedError",
|
|
47
|
-
"Audience",
|
|
48
|
-
"BinaryClassifier",
|
|
49
|
-
"DataScientist",
|
|
50
|
-
"EBMGraph",
|
|
51
|
-
"EBMGraphError",
|
|
52
|
-
"EBMGraphShapeError",
|
|
53
|
-
"EBMGraphSimplificationError",
|
|
54
|
-
"EBMGraphTokenLimitError",
|
|
55
|
-
"EBaMlError",
|
|
56
|
-
"FeatureType",
|
|
57
|
-
"GraphTextError",
|
|
58
|
-
"InvalidInstanceError",
|
|
59
|
-
"InvalidOptionError",
|
|
60
|
-
"LLMRequestError",
|
|
61
|
-
"Layperson",
|
|
62
|
-
"MissingAPIKeyError",
|
|
63
|
-
"ModelKind",
|
|
64
|
-
"MulticlassClassifier",
|
|
65
|
-
"Normalization",
|
|
66
|
-
"OptionRangeError",
|
|
67
|
-
"ProviderUnreachableError",
|
|
68
|
-
"RateLimitedError",
|
|
69
|
-
"Regressor",
|
|
70
|
-
"SDKUnavailableError",
|
|
71
|
-
"TokenFitError",
|
|
72
|
-
"UnsupportedModelError",
|
|
73
|
-
"__version__",
|
|
74
|
-
"model_kind",
|
|
75
|
-
]
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|