ask-or-act 1.0.0__py3-none-any.whl
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.
- ask_or_act/__init__.py +42 -0
- ask_or_act/__main__.py +5 -0
- ask_or_act/api.py +743 -0
- ask_or_act/audit.py +282 -0
- ask_or_act/changelog.py +367 -0
- ask_or_act/cli.py +1576 -0
- ask_or_act/core/__init__.py +1 -0
- ask_or_act/core/budget.py +42 -0
- ask_or_act/core/cache.py +103 -0
- ask_or_act/core/config.py +231 -0
- ask_or_act/core/decider.py +119 -0
- ask_or_act/core/limits.py +134 -0
- ask_or_act/core/runner.py +302 -0
- ask_or_act/core/runs.py +181 -0
- ask_or_act/core/types.py +160 -0
- ask_or_act/data/__init__.py +1 -0
- ask_or_act/data/examples.py +144 -0
- ask_or_act/data/hub.py +101 -0
- ask_or_act/data/manifest.py +135 -0
- ask_or_act/data/sampling.py +216 -0
- ask_or_act/data/sources.py +179 -0
- ask_or_act/data/training.py +106 -0
- ask_or_act/deciders/__init__.py +105 -0
- ask_or_act/deciders/baselines.py +105 -0
- ask_or_act/deciders/classic.py +247 -0
- ask_or_act/deciders/fake.py +169 -0
- ask_or_act/deciders/gemini_decisions.py +158 -0
- ask_or_act/deciders/http.py +189 -0
- ask_or_act/deciders/llm.py +1000 -0
- ask_or_act/deciders/pricing.py +186 -0
- ask_or_act/deciders/prompts.py +224 -0
- ask_or_act/deciders/signals.py +141 -0
- ask_or_act/demo.py +102 -0
- ask_or_act/exit_codes.py +11 -0
- ask_or_act/gate.py +724 -0
- ask_or_act/gate_markdown.py +122 -0
- ask_or_act/guarantees/__init__.py +1 -0
- ask_or_act/guarantees/binomial.py +75 -0
- ask_or_act/guarantees/cascade.py +134 -0
- ask_or_act/guarantees/fixed_sequence.py +304 -0
- ask_or_act/guarantees/mt_bench.py +147 -0
- ask_or_act/guarantees/recommend.py +320 -0
- ask_or_act/guarantees/sample_size.py +89 -0
- ask_or_act/judge.py +407 -0
- ask_or_act/metrics/__init__.py +1 -0
- ask_or_act/metrics/ace.py +233 -0
- ask_or_act/metrics/calibration.py +211 -0
- ask_or_act/metrics/classification.py +101 -0
- ask_or_act/metrics/command.py +57 -0
- ask_or_act/metrics/data.py +136 -0
- ask_or_act/metrics/excess.py +126 -0
- ask_or_act/metrics/feasibility.py +68 -0
- ask_or_act/metrics/mt_bench.py +118 -0
- ask_or_act/metrics/report.py +489 -0
- ask_or_act/metrics/selective.py +137 -0
- ask_or_act/metrics/stats.py +231 -0
- ask_or_act/metrics/tango.py +148 -0
- ask_or_act/predictions.py +1149 -0
- ask_or_act/project_config.py +102 -0
- ask_or_act/py.typed +0 -0
- ask_or_act/report/__init__.py +1 -0
- ask_or_act/report/build.py +773 -0
- ask_or_act/report/files.py +548 -0
- ask_or_act/report/svg.py +346 -0
- ask_or_act/report/table.py +270 -0
- ask_or_act/report/template.html +112 -0
- ask_or_act/run.py +293 -0
- ask_or_act/study.py +381 -0
- ask_or_act/summaries.py +158 -0
- ask_or_act/term.py +62 -0
- ask_or_act-1.0.0.dist-info/METADATA +249 -0
- ask_or_act-1.0.0.dist-info/RECORD +75 -0
- ask_or_act-1.0.0.dist-info/WHEEL +4 -0
- ask_or_act-1.0.0.dist-info/entry_points.txt +3 -0
- ask_or_act-1.0.0.dist-info/licenses/LICENSE +21 -0
ask_or_act/__init__.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""ask-or-act: evaluate and calibrate AI decisions, and decide when to act, ask or escalate.
|
|
2
|
+
|
|
3
|
+
The public API (docs/cli-design.md §5.3):
|
|
4
|
+
|
|
5
|
+
import ask_or_act as aoa
|
|
6
|
+
th = aoa.find_thresholds("preds.csv", alpha=0.1)
|
|
7
|
+
|
|
8
|
+
Names load on first use, so ``import ask_or_act`` (and every CLI command) stays fast.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from importlib import import_module
|
|
12
|
+
from importlib.metadata import version
|
|
13
|
+
from typing import Any
|
|
14
|
+
|
|
15
|
+
__version__ = version("ask-or-act")
|
|
16
|
+
|
|
17
|
+
_PUBLIC = {
|
|
18
|
+
"find_thresholds": "ask_or_act.api",
|
|
19
|
+
"evaluate": "ask_or_act.api",
|
|
20
|
+
"compare": "ask_or_act.api",
|
|
21
|
+
"write_report": "ask_or_act.api",
|
|
22
|
+
"Thresholds": "ask_or_act.api",
|
|
23
|
+
"Evaluation": "ask_or_act.api",
|
|
24
|
+
"Comparison": "ask_or_act.api",
|
|
25
|
+
"NotEnoughData": "ask_or_act.api",
|
|
26
|
+
"read_predictions": "ask_or_act.predictions",
|
|
27
|
+
"check": "ask_or_act.predictions",
|
|
28
|
+
"CheckResult": "ask_or_act.predictions",
|
|
29
|
+
"InputError": "ask_or_act.predictions",
|
|
30
|
+
"Problem": "ask_or_act.predictions",
|
|
31
|
+
"DecisionTable": "ask_or_act.report.table",
|
|
32
|
+
"DecisionRow": "ask_or_act.report.table",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
__all__ = ["__version__", *_PUBLIC]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def __getattr__(name: str) -> Any:
|
|
39
|
+
module = _PUBLIC.get(name)
|
|
40
|
+
if module is None:
|
|
41
|
+
raise AttributeError(f"module 'ask_or_act' has no attribute {name!r}")
|
|
42
|
+
return getattr(import_module(module), name)
|