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.
Files changed (170) hide show
  1. {ebaml-0.3.2 → ebaml-0.3.3}/PKG-INFO +15 -16
  2. {ebaml-0.3.2 → ebaml-0.3.3}/README.md +14 -15
  3. {ebaml-0.3.2 → ebaml-0.3.3}/pyproject.toml +1 -4
  4. {ebaml-0.3.2 → ebaml-0.3.3}/pyproject.toml.orig +1 -5
  5. ebaml-0.3.3/src/ebaml/__init__.py +176 -0
  6. ebaml-0.3.2/src/ebaml/__init__.py +0 -75
  7. {ebaml-0.3.2 → ebaml-0.3.3}/LICENSE +0 -0
  8. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/.baml-generator-output-root +0 -0
  9. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/.baml-generator-output.json +0 -0
  10. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/.gitignore +0 -0
  11. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/__init__.py +0 -0
  12. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/__init__.pyi +0 -0
  13. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_baml_sources.py +0 -0
  14. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_function_registry.py +0 -0
  15. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_inlinedbaml.py +0 -0
  16. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_invocation_types.py +0 -0
  17. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_invocation_types.pyi +0 -0
  18. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/_typemap.py +0 -0
  19. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/__init__.py +0 -0
  20. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/__init__.pyi +0 -0
  21. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/clients/__init__.py +0 -0
  22. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/clients/__init__.pyi +0 -0
  23. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/content/__init__.py +0 -0
  24. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/content/__init__.pyi +0 -0
  25. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/errors/__init__.py +0 -0
  26. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/errors/__init__.pyi +0 -0
  27. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/events/__init__.py +0 -0
  28. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/events/__init__.pyi +0 -0
  29. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/internal/__init__.py +0 -0
  30. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/internal/__init__.pyi +0 -0
  31. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/mcp/__init__.py +0 -0
  32. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/mcp/__init__.pyi +0 -0
  33. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/stream/__init__.py +0 -0
  34. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/stream/__init__.pyi +0 -0
  35. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/tools/__init__.py +0 -0
  36. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/tools/__init__.pyi +0 -0
  37. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/wire/__init__.py +0 -0
  38. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/ai/wire/__init__.pyi +0 -0
  39. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/__init__.py +0 -0
  40. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/__init__.pyi +0 -0
  41. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/crypto/__init__.py +0 -0
  42. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/crypto/__init__.pyi +0 -0
  43. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/csv/__init__.py +0 -0
  44. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/csv/__init__.pyi +0 -0
  45. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/env/__init__.py +0 -0
  46. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/env/__init__.pyi +0 -0
  47. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/errors/__init__.py +0 -0
  48. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/errors/__init__.pyi +0 -0
  49. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/fs/__init__.py +0 -0
  50. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/fs/__init__.pyi +0 -0
  51. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/future/__init__.py +0 -0
  52. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/future/__init__.pyi +0 -0
  53. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/glob/__init__.py +0 -0
  54. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/glob/__init__.pyi +0 -0
  55. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/hash/__init__.py +0 -0
  56. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/hash/__init__.pyi +0 -0
  57. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/host/__init__.py +0 -0
  58. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/host/__init__.pyi +0 -0
  59. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/http/__init__.py +0 -0
  60. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/http/__init__.pyi +0 -0
  61. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/io/__init__.py +0 -0
  62. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/io/__init__.pyi +0 -0
  63. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/iter/__init__.py +0 -0
  64. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/iter/__init__.pyi +0 -0
  65. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/json/__init__.py +0 -0
  66. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/json/__init__.pyi +0 -0
  67. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/media/__init__.py +0 -0
  68. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/media/__init__.pyi +0 -0
  69. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/net/__init__.py +0 -0
  70. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/net/__init__.pyi +0 -0
  71. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/ops/__init__.py +0 -0
  72. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/ops/__init__.pyi +0 -0
  73. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/panics/__init__.py +0 -0
  74. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/panics/__init__.pyi +0 -0
  75. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/random/__init__.py +0 -0
  76. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/random/__init__.pyi +0 -0
  77. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/regex/__init__.py +0 -0
  78. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/regex/__init__.pyi +0 -0
  79. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/sap/__init__.py +0 -0
  80. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/sap/__init__.pyi +0 -0
  81. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/spawn/__init__.py +0 -0
  82. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/spawn/__init__.pyi +0 -0
  83. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/sys/__init__.py +0 -0
  84. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/sys/__init__.pyi +0 -0
  85. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/time/__init__.py +0 -0
  86. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/time/__init__.pyi +0 -0
  87. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/toml/__init__.py +0 -0
  88. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/toml/__init__.pyi +0 -0
  89. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/ws/__init__.py +0 -0
  90. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/ws/__init__.pyi +0 -0
  91. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/yaml/__init__.py +0 -0
  92. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/baml/yaml/__init__.pyi +0 -0
  93. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/experimental/__init__.py +0 -0
  94. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/experimental/__init__.pyi +0 -0
  95. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/py.typed +0 -0
  96. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/__init__.py +0 -0
  97. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/__init__.pyi +0 -0
  98. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/class_/__init__.py +0 -0
  99. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/class_/__init__.pyi +0 -0
  100. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/enum/__init__.py +0 -0
  101. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/enum/__init__.pyi +0 -0
  102. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/errors/__init__.py +0 -0
  103. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/errors/__init__.pyi +0 -0
  104. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/function/__init__.py +0 -0
  105. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/function/__init__.pyi +0 -0
  106. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/interface/__init__.py +0 -0
  107. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/reflect/interface/__init__.pyi +0 -0
  108. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/__init__.py +0 -0
  109. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/__init__.pyi +0 -0
  110. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/anthropic/__init__.py +0 -0
  111. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/anthropic/__init__.pyi +0 -0
  112. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/anthropic/internal/__init__.py +0 -0
  113. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/anthropic/internal/__init__.pyi +0 -0
  114. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/assert_/__init__.py +0 -0
  115. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/assert_/__init__.pyi +0 -0
  116. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/aws/__init__.py +0 -0
  117. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/aws/__init__.pyi +0 -0
  118. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/aws/internal/__init__.py +0 -0
  119. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/aws/internal/__init__.pyi +0 -0
  120. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/claude_code/__init__.py +0 -0
  121. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/claude_code/__init__.pyi +0 -0
  122. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/claude_code/internal/__init__.py +0 -0
  123. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/claude_code/internal/__init__.pyi +0 -0
  124. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/google/__init__.py +0 -0
  125. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/google/__init__.pyi +0 -0
  126. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/google/internal/__init__.py +0 -0
  127. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/google/internal/__init__.pyi +0 -0
  128. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/__init__.py +0 -0
  129. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/__init__.pyi +0 -0
  130. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/internal/__init__.py +0 -0
  131. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/internal/__init__.pyi +0 -0
  132. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/internal/decisions/__init__.py +0 -0
  133. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/openai/internal/decisions/__init__.pyi +0 -0
  134. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/testing/__init__.py +0 -0
  135. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/testing/__init__.pyi +0 -0
  136. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/trace/__init__.py +0 -0
  137. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/trace/__init__.pyi +0 -0
  138. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/typesafeai/__init__.py +0 -0
  139. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/typesafeai/__init__.pyi +0 -0
  140. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/typesafeai/internal/__init__.py +0 -0
  141. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/typesafeai/internal/__init__.pyi +0 -0
  142. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/vercel/__init__.py +0 -0
  143. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/vercel/__init__.pyi +0 -0
  144. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/vercel/internal/__init__.py +0 -0
  145. {ebaml-0.3.2 → ebaml-0.3.3}/src/baml_sdk/vendor/vercel/internal/__init__.pyi +0 -0
  146. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/benchmark.py +0 -0
  147. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/core/__init__.py +0 -0
  148. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/core/custom_types.py +0 -0
  149. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/core/exceptions.py +0 -0
  150. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/__init__.py +0 -0
  151. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/ebm_graph.py +0 -0
  152. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/graph_text.py +0 -0
  153. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/model_kinds.py +0 -0
  154. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/request_text.py +0 -0
  155. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/terms.py +0 -0
  156. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/token_budget.py +0 -0
  157. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/graphs/token_weights.py +0 -0
  158. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/__init__.py +0 -0
  159. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/descriptors.py +0 -0
  160. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/options.py +0 -0
  161. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/provider_errors.py +0 -0
  162. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/retry.py +0 -0
  163. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/sdk_setup.py +0 -0
  164. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/token_learning.py +0 -0
  165. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/llm/token_weights.json +0 -0
  166. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/local/__init__.py +0 -0
  167. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/local/audience.py +0 -0
  168. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/local/fact_text.py +0 -0
  169. {ebaml-0.3.2 → ebaml-0.3.3}/src/ebaml/local/facts.py +0 -0
  170. {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.2
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, `ebaml.llm.descriptors` runs `baml generate` when you import it. If the package was
128
- generated by another BAML toolchain than the one that `baml-bridge` expects (a version skew), the import runs
129
- `baml toolchain use <version>` and `baml generate`. If the agent skill check stops `baml generate`, the import runs it
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.llm.descriptors import describe_ebm, describe_graph
173
- from ebaml.llm.options import PromptOptions
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". The classes are in `ebaml.llm.options`. Token usage reported by the provider is logged at `INFO` on the `ebaml.llm.descriptors` logger.
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.llm.options import GraphOptions
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.llm.descriptors import describe_ebm, explain_instance
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`. All classes are in `ebaml.core.exceptions`, and `ebaml` exports
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. The functions in `ebaml.llm.descriptors` pass the
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.graphs.token_budget.check_token_budget`. That check needs no LLM and no key. To choose the weights, pass a
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.llm.descriptors import describe_ebm
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.llm.options import ModelOptions
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, `ebaml.llm.descriptors` runs `baml generate` when you import it. If the package was
97
- generated by another BAML toolchain than the one that `baml-bridge` expects (a version skew), the import runs
98
- `baml toolchain use <version>` and `baml generate`. If the agent skill check stops `baml generate`, the import runs it
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.llm.descriptors import describe_ebm, describe_graph
142
- from ebaml.llm.options import PromptOptions
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". The classes are in `ebaml.llm.options`. Token usage reported by the provider is logged at `INFO` on the `ebaml.llm.descriptors` logger.
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.llm.options import GraphOptions
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.llm.descriptors import describe_ebm, explain_instance
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`. All classes are in `ebaml.core.exceptions`, and `ebaml` exports
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. The functions in `ebaml.llm.descriptors` pass the
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.graphs.token_budget.check_token_budget`. That check needs no LLM and no key. To choose the weights, pass a
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.llm.descriptors import describe_ebm
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.llm.options import ModelOptions
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.2"
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.2"
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