Skip to content

Add DAG inference as a dicekit.learn submodule#16

Merged
koaning merged 3 commits into
mainfrom
koaning/dice-dag-api
Jun 17, 2026
Merged

Add DAG inference as a dicekit.learn submodule#16
koaning merged 3 commits into
mainfrom
koaning/dice-dag-api

Conversation

@koaning

@koaning koaning commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Introduces a Bayesian-network / DAG inference API (DAG, Node, Event, Evidence, Factor) in a new dicekit.learn submodule, queried through p. Core p becomes a functools.singledispatch generic that only knows about Dice; the DAG layer registers its own Node/Event handlers, keeping core unaware of the inference layer with no import cycle. Migrates the notebook build from nbs/build.py to mobuild (Makefile + dev dependency), adding a second export for nbs/learn.pydicekit/learn.py. Adds tests/test_learn.py covering the submodule API; all 45 tests pass and basedpyright reports zero errors.

🤖 Generated with Claude Code

koaning and others added 3 commits June 17, 2026 14:06
Introduce a Bayesian-network / DAG inference API (DAG, Node, Event,
Evidence, Factor) in a new `dicekit.learn` submodule, queried via `p`.
Core `p` becomes a `functools.singledispatch` generic that knows only
about Dice; the DAG layer registers its own Node/Event handlers, so core
stays unaware of the inference layer and there is no import cycle.

Migrate the notebook build from nbs/build.py to `mobuild` (Makefile +
dev dependency) and add a second export for nbs/learn.py -> dicekit/learn.py.
Add tests/test_learn.py covering the submodule API.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New feature release: adds the DAG inference submodule. Sync uv.lock.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Removed per review: the symbol move is covered elsewhere.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@koaning
koaning merged commit 1c555df into main Jun 17, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant