You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(nemobridge): persistent opt-in for nemo delegation via pyirk config
The delegation flag was env-only (PYIRK_NEMO_DELEGATION), which is tedious
for a developer who wants the speedup in all their own runs. Add a
delegation_enabled() resolver: env var (decisive in both directions) over
pyirk config [nemo] delegation over a shipped default of off. The general
user is unaffected unless they opt in; an individual can enable it
persistently in their config.
Also fixes a latent bug: the old 'if os.environ.get(...)' treated
PYIRK_NEMO_DELEGATION=0 / =false as truthy and wrongly ENABLED delegation,
contradicting the docs. Falsy tokens (0/false/no/off) now disable correctly.
Docs (how-to + README) document the config toggle and precedence; 7 new
unit tests cover the env/config/default matrix. Full suite green with flag
off (197 passed); rule-based reasoning green with flag on.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ Note that, originally pyirk (imperative representation of knowledge) was called
47
47
48
48
# Optional: Nemo rule-engine delegation
49
49
50
-
For performance-critical rule sets, pyirk can optionally delegate evaluation of a curated subset of rules to the Nemo datalog engine via its `nmo` CLI (see the upstream Nemo project for installation instructions). The feature is **off by default**; set the environment variable `PYIRK_NEMO_DELEGATION=1`to enable it (and optionally `PYIRK_NEMO_BIN=/abs/path/to/nmo` to pin the binary). The native Python engine remains the authoritative reference and the automatic fallback path. See the how-to guide [`docs/source/howto/nemo_delegation.md`](docs/source/howto/nemo_delegation.md) for resolver order, version policy, and known limits.
50
+
For performance-critical rule sets, pyirk can optionally delegate evaluation of a curated subset of rules to the Nemo datalog engine via its `nmo` CLI (see the upstream Nemo project for installation instructions). The feature is **off by default**; enable it either per-invocation via the environment variable `PYIRK_NEMO_DELEGATION=1`or persistently via `[nemo] delegation = true` in your pyirk config (optionally pin the binary with `PYIRK_NEMO_BIN=/abs/path/to/nmo`). The native Python engine remains the authoritative reference and the automatic fallback path. See the how-to guide [`docs/source/howto/nemo_delegation.md`](docs/source/howto/nemo_delegation.md) for resolver order, version policy, and known limits.
0 commit comments