sdm-learn 0.1.0.dev0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. sdm_learn-0.1.1/CHANGELOG.md +84 -0
  2. sdm_learn-0.1.1/FAQ.md +24 -0
  3. sdm_learn-0.1.1/MANIFEST.in +12 -0
  4. sdm_learn-0.1.1/PKG-INFO +613 -0
  5. sdm_learn-0.1.1/README.md +573 -0
  6. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/pyproject.toml +10 -4
  7. sdm_learn-0.1.1/settings.example.json +5 -0
  8. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm/__init__.py +15 -9
  9. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm/__main__.py +19 -2
  10. sdm_learn-0.1.1/src/sdm/benchmarks.py +243 -0
  11. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm/data.py +2 -13
  12. sdm_learn-0.1.1/src/sdm/datasets.py +695 -0
  13. sdm_learn-0.1.1/src/sdm/experiment.py +231 -0
  14. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm/format.md +41 -21
  15. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm/formats.py +301 -130
  16. sdm_learn-0.1.1/src/sdm/gateway.py +387 -0
  17. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm/learn.py +403 -121
  18. sdm_learn-0.1.1/src/sdm/prauc.py +166 -0
  19. sdm_learn-0.1.1/src/sdm/science.py +700 -0
  20. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm/signals.py +4 -128
  21. sdm_learn-0.1.1/src/sdm/ui.py +552 -0
  22. sdm_learn-0.1.1/src/sdm_learn.egg-info/PKG-INFO +613 -0
  23. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm_learn.egg-info/SOURCES.txt +9 -1
  24. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm_learn.egg-info/requires.txt +9 -2
  25. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/tests/test_sdm.py +522 -101
  26. sdm_learn-0.1.0.dev0/MANIFEST.in +0 -10
  27. sdm_learn-0.1.0.dev0/PKG-INFO +0 -35
  28. sdm_learn-0.1.0.dev0/README.md +0 -1
  29. sdm_learn-0.1.0.dev0/examples/demo.py +0 -319
  30. sdm_learn-0.1.0.dev0/src/sdm/gateway.py +0 -169
  31. sdm_learn-0.1.0.dev0/src/sdm_learn.egg-info/PKG-INFO +0 -35
  32. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/LICENSE +0 -0
  33. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/setup.cfg +0 -0
  34. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm_learn.egg-info/dependency_links.txt +0 -0
  35. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm_learn.egg-info/entry_points.txt +0 -0
  36. {sdm_learn-0.1.0.dev0 → sdm_learn-0.1.1}/src/sdm_learn.egg-info/top_level.txt +0 -0
@@ -0,0 +1,84 @@
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.1] - 2026-09-09
8
+
9
+ ### Added
10
+ - `sdm ui`: a local web page that configures and launches runs (dataset,
11
+ algorithm, format, style, provider / model / API key, gate settings) and
12
+ shows the live log, the per-epoch verdicts, the results, and the learned
13
+ document. Standard library only; binds to localhost.
14
+ - `reproduce/showcase.py` takes several datasets in one page
15
+ (`GROUP/LABEL=RUN_DIR`) with a dataset switcher.
16
+ - `rulebook-html` format: the numbered rulebook written out as an HTML page
17
+ with a section per class, and a `SKETCH | class | <svg>` edit that gives a
18
+ class one schematic. `--passes N` walks the training rows N times;
19
+ `--max-rules 100,200` sets one cap per pass; `--no-gate` keeps every valid
20
+ revision. The four science datasets default to this protocol, which is
21
+ the one their checked-in rulebooks were learned under.
22
+
23
+ ## [0.1.0] - 2026-09-09
24
+
25
+ The first non-development release. The library was cut down to what the
26
+ paper describes and made to run through one command.
27
+
28
+ ### Added
29
+ - `sdm run --dataset NAME|DIR --algo sdm|base --format ...`: one command for
30
+ every benchmark and for a directory of your own `train.jsonl` /
31
+ `test.jsonl` rows (`src/sdm/benchmarks.py`). Each built-in dataset carries
32
+ the gate settings its protocol uses; flags override them.
33
+ - `--style` / `train(style=...)`: a free-text guide, shown only to the
34
+ writer, naming the kinds of content the document should use.
35
+ - SEARCH/REPLACE `<patch>` revisions for the `text`, `html`, `image`, and
36
+ `audio` formats, so a revision costs its difference rather than a rewrite.
37
+ - A `text` format: one plain-text document.
38
+ - `image` format refuses every text element; the picture carries the
39
+ hypothesis.
40
+ - Gateway knobs: `SDM_TEMPERATURE`, `SDM_EXTRA_PAYLOAD`,
41
+ `SDM_MAX_COMPLETION_TOKENS`, and a separate writer model or endpoint
42
+ (`SDM_WRITER_MODEL`, `SDM_WRITER_EFFORT`, `SDM_WRITER_GATEWAY_URL`,
43
+ `SDM_WRITER_API_KEY`).
44
+ - Writer robustness for small models: lenient edit parsing, one corrected
45
+ retry on an invalid revision, context-window failures skip the candidate,
46
+ `proposal_examples` caps the feedback shown per epoch.
47
+ - `reproduce/showcase.py`: an interactive page comparing formats on one
48
+ dataset (accuracy or PR-AUC, document growth, per-class curves, every
49
+ epoch's document with playable audio).
50
+ - Four science benchmarks with their learned HTML rulebooks and designed
51
+ views: `gravityspy`, `galaxy10`, `bloodmnist`, `eclipsing` (`sdm.science`,
52
+ the `science` extra, `reproduce/ai4science`).
53
+ - The offline test suite is tracked and run by CI.
54
+
55
+ ### Changed
56
+ - **Algorithms are `sdm` and `base`** (formerly `gate` and `baseline`).
57
+ - **The gate accepts ties.** A candidate is kept unless it lowers protected
58
+ accuracy; the strict-gain rule and the 5% compression exception are gone.
59
+ On PODS this raised the markdown rulebook from 91.7 to 95.4 PR-AUC.
60
+ - **`cycles` are `epochs`** everywhere: options, state, candidate log, raw
61
+ folders. Runs saved under the old name do not resume.
62
+ - `format.md` is the single source of the default formats
63
+ (`DEFAULT_FORMAT_MD` reads it). Size caps: `html` 12,000 words / 60,000
64
+ characters, `image` 40,000 characters.
65
+ - Rendered formats ask the writer for ASCII text (cairosvg has no glyph for
66
+ arrows and draws a box).
67
+ - README rewritten as the package's reference documentation.
68
+
69
+ ### Removed
70
+ - The in-context (`icl`) control, the GEPA and SkillOpt baselines, the
71
+ fine-tuning export, the graded free-response mode, and the ungated
72
+ `accept_all` switch.
73
+ - Every dataset loader and experiment except `cifar10`, `pods`, `df2`, and
74
+ `camelyon17` (GSM8K, MBPP, LiveMath, IFBench, tabular, Omniglot, Dogs, the
75
+ other WILDS subsets, and more).
76
+ - The `video` format: on PODS, 70 objects in 12 frames reached 18.5 PR-AUC
77
+ against 64.5 for one wordless picture.
78
+ - The `--val` protected-validation option of the Camelyon17 command
79
+ (`holdout_split` remains in the Python API).
80
+
81
+ ## [0.1.0.dev0] - 2026-08-29
82
+
83
+ First upload: the gate, the `markdown`, `html`, `image`, `audio`, and
84
+ `video` formats, CIFAR-10, and the experiment template.
sdm_learn-0.1.1/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