sdm-learn 0.1.0.dev0__tar.gz → 0.1.2__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 (37) hide show
  1. sdm_learn-0.1.2/CHANGELOG.md +96 -0
  2. sdm_learn-0.1.2/FAQ.md +24 -0
  3. sdm_learn-0.1.2/MANIFEST.in +12 -0
  4. sdm_learn-0.1.2/PKG-INFO +619 -0
  5. sdm_learn-0.1.2/README.md +579 -0
  6. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/pyproject.toml +10 -4
  7. sdm_learn-0.1.2/settings.example.json +5 -0
  8. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm/__init__.py +15 -9
  9. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm/__main__.py +28 -2
  10. sdm_learn-0.1.2/src/sdm/benchmarks.py +243 -0
  11. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm/data.py +2 -13
  12. sdm_learn-0.1.2/src/sdm/datasets.py +695 -0
  13. sdm_learn-0.1.2/src/sdm/experiment.py +231 -0
  14. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm/format.md +41 -21
  15. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm/formats.py +301 -130
  16. sdm_learn-0.1.2/src/sdm/gateway.py +387 -0
  17. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm/learn.py +403 -121
  18. sdm_learn-0.1.2/src/sdm/prauc.py +166 -0
  19. sdm_learn-0.1.2/src/sdm/science.py +700 -0
  20. sdm_learn-0.1.2/src/sdm/showcase.py +591 -0
  21. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm/signals.py +4 -128
  22. sdm_learn-0.1.2/src/sdm/ui.py +665 -0
  23. sdm_learn-0.1.2/src/sdm_learn.egg-info/PKG-INFO +619 -0
  24. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm_learn.egg-info/SOURCES.txt +10 -1
  25. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm_learn.egg-info/requires.txt +9 -2
  26. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/tests/test_sdm.py +549 -101
  27. sdm_learn-0.1.0.dev0/MANIFEST.in +0 -10
  28. sdm_learn-0.1.0.dev0/PKG-INFO +0 -35
  29. sdm_learn-0.1.0.dev0/README.md +0 -1
  30. sdm_learn-0.1.0.dev0/examples/demo.py +0 -319
  31. sdm_learn-0.1.0.dev0/src/sdm/gateway.py +0 -169
  32. sdm_learn-0.1.0.dev0/src/sdm_learn.egg-info/PKG-INFO +0 -35
  33. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/LICENSE +0 -0
  34. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/setup.cfg +0 -0
  35. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm_learn.egg-info/dependency_links.txt +0 -0
  36. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm_learn.egg-info/entry_points.txt +0 -0
  37. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.2}/src/sdm_learn.egg-info/top_level.txt +0 -0
@@ -0,0 +1,96 @@
1
+ # Changelog
2
+
3
+ All notable changes to `sdm-learn`. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
5
+ [PEP 440](https://peps.python.org/pep-0440/).
6
+
7
+ ## [0.1.2] - 2026-09-09
8
+
9
+ ### Added
10
+ - `sdm ui` is now the whole product: a **Runs** table over everything under
11
+ `runs/` (filters, checkboxes), **New run**, **Run detail** with the document
12
+ epoch by epoch, and **Compare**, which opens on every finished run grouped
13
+ by dataset and switches formats and gate rules like the showcase page.
14
+ Deep links: `#run/<name>`, `#compare/<a>,<b>`, `#new`.
15
+ - `sdm showcase OUT.html [GROUP/]LABEL[|RULE]=RUN_DIR ...` writes the
16
+ standalone comparison page from the same component (`sdm.showcase`);
17
+ `reproduce/showcase.py` is gone.
18
+
19
+ ## [0.1.1] - 2026-09-09
20
+
21
+ ### Added
22
+ - `sdm ui`: a local web page that configures and launches runs (dataset,
23
+ algorithm, format, style, provider / model / API key, gate settings) and
24
+ shows the live log, the per-epoch verdicts, the results, and the learned
25
+ document. Standard library only; binds to localhost.
26
+ - `reproduce/showcase.py` takes several datasets in one page
27
+ (`GROUP/LABEL=RUN_DIR`) with a dataset switcher.
28
+ - `rulebook-html` format: the numbered rulebook written out as an HTML page
29
+ with a section per class, and a `SKETCH | class | <svg>` edit that gives a
30
+ class one schematic. `--passes N` walks the training rows N times;
31
+ `--max-rules 100,200` sets one cap per pass; `--no-gate` keeps every valid
32
+ revision. The four science datasets default to this protocol, which is
33
+ the one their checked-in rulebooks were learned under.
34
+
35
+ ## [0.1.0] - 2026-09-09
36
+
37
+ The first non-development release. The library was cut down to what the
38
+ paper describes and made to run through one command.
39
+
40
+ ### Added
41
+ - `sdm run --dataset NAME|DIR --algo sdm|base --format ...`: one command for
42
+ every benchmark and for a directory of your own `train.jsonl` /
43
+ `test.jsonl` rows (`src/sdm/benchmarks.py`). Each built-in dataset carries
44
+ the gate settings its protocol uses; flags override them.
45
+ - `--style` / `train(style=...)`: a free-text guide, shown only to the
46
+ writer, naming the kinds of content the document should use.
47
+ - SEARCH/REPLACE `<patch>` revisions for the `text`, `html`, `image`, and
48
+ `audio` formats, so a revision costs its difference rather than a rewrite.
49
+ - A `text` format: one plain-text document.
50
+ - `image` format refuses every text element; the picture carries the
51
+ hypothesis.
52
+ - Gateway knobs: `SDM_TEMPERATURE`, `SDM_EXTRA_PAYLOAD`,
53
+ `SDM_MAX_COMPLETION_TOKENS`, and a separate writer model or endpoint
54
+ (`SDM_WRITER_MODEL`, `SDM_WRITER_EFFORT`, `SDM_WRITER_GATEWAY_URL`,
55
+ `SDM_WRITER_API_KEY`).
56
+ - Writer robustness for small models: lenient edit parsing, one corrected
57
+ retry on an invalid revision, context-window failures skip the candidate,
58
+ `proposal_examples` caps the feedback shown per epoch.
59
+ - `reproduce/showcase.py`: an interactive page comparing formats on one
60
+ dataset (accuracy or PR-AUC, document growth, per-class curves, every
61
+ epoch's document with playable audio).
62
+ - Four science benchmarks with their learned HTML rulebooks and designed
63
+ views: `gravityspy`, `galaxy10`, `bloodmnist`, `eclipsing` (`sdm.science`,
64
+ the `science` extra, `reproduce/ai4science`).
65
+ - The offline test suite is tracked and run by CI.
66
+
67
+ ### Changed
68
+ - **Algorithms are `sdm` and `base`** (formerly `gate` and `baseline`).
69
+ - **The gate accepts ties.** A candidate is kept unless it lowers protected
70
+ accuracy; the strict-gain rule and the 5% compression exception are gone.
71
+ On PODS this raised the markdown rulebook from 91.7 to 95.4 PR-AUC.
72
+ - **`cycles` are `epochs`** everywhere: options, state, candidate log, raw
73
+ folders. Runs saved under the old name do not resume.
74
+ - `format.md` is the single source of the default formats
75
+ (`DEFAULT_FORMAT_MD` reads it). Size caps: `html` 12,000 words / 60,000
76
+ characters, `image` 40,000 characters.
77
+ - Rendered formats ask the writer for ASCII text (cairosvg has no glyph for
78
+ arrows and draws a box).
79
+ - README rewritten as the package's reference documentation.
80
+
81
+ ### Removed
82
+ - The in-context (`icl`) control, the GEPA and SkillOpt baselines, the
83
+ fine-tuning export, the graded free-response mode, and the ungated
84
+ `accept_all` switch.
85
+ - Every dataset loader and experiment except `cifar10`, `pods`, `df2`, and
86
+ `camelyon17` (GSM8K, MBPP, LiveMath, IFBench, tabular, Omniglot, Dogs, the
87
+ other WILDS subsets, and more).
88
+ - The `video` format: on PODS, 70 objects in 12 frames reached 18.5 PR-AUC
89
+ against 64.5 for one wordless picture.
90
+ - The `--val` protected-validation option of the Camelyon17 command
91
+ (`holdout_split` remains in the Python API).
92
+
93
+ ## [0.1.0.dev0] - 2026-08-29
94
+
95
+ First upload: the gate, the `markdown`, `html`, `image`, `audio`, and
96
+ `video` formats, CIFAR-10, and the experiment template.
sdm_learn-0.1.2/FAQ.md ADDED
@@ -0,0 +1,24 @@
1
+ # Frequently Asked Questions
2
+
3
+ ## Where do I configure the LLM?
4
+
5
+ Copy `settings.example.json` to `settings.json`, then set `provider`, `model`,
6
+ and `api_key` there. `settings.json` is gitignored.
7
+
8
+ ## Which LLM APIs are supported?
9
+
10
+ See the **VIEW SUPPORTED APIs** table in the
11
+ [README](README.md#configure-an-llm-api). OpenAI-compatible providers can also
12
+ be configured with `"provider": "custom"` and a `gateway_url`.
13
+
14
+ ## Where should I put my experiment?
15
+
16
+ Copy `runs/my_experiment.py`, update its `load_data()` function, and run the
17
+ copy from the repository root. The shipped benchmarks need no copy:
18
+ `sdm run --dataset cifar10|pods|df2|camelyon17`. Files created under `runs/` are gitignored except for
19
+ the template.
20
+
21
+ ## Why use a virtual environment?
22
+
23
+ It keeps this project's dependencies isolated and ensures the package is
24
+ installed with the Python interpreter you intend to use.
@@ -0,0 +1,12 @@
1
+ include LICENSE
2
+ include README.md
3
+ include FAQ.md
4
+ include CHANGELOG.md
5
+ include settings.example.json
6
+
7
+ # The GIFs stay out of the distribution: 2.5 MB of animation helps a reader on
8
+ # GitHub and does nothing for an install. The README reaches them by relative
9
+ # path, which GitHub resolves and PyPI does not, so the PyPI page shows a
10
+ # broken image until that link is made absolute at release time.
11
+ prune assets
12
+ prune runs