Releases: AbductiveLearning/ABLkit
Releases · AbductiveLearning/ABLkit
Release list
ablkit 1.0.0
First stable release. Adds four new ABL method variants to the core package, broadens example coverage, and modernizes CI / packaging.
📦 Install: pip install ablkit==1.0.0
📚 Docs: https://ablkit.readthedocs.io/
New methods (all opt-in; standard ABL is unchanged)
- A3BL (Ambiguity-Aware Abductive Learning) —
ablkit.reasoning.A3BLReasoner+ablkit.bridge.A3BLBridge. Soft-label aggregation over top-K consistent candidates. Reference: https://github.com/Hao-Yuan-He/A3BL - Verification Learning —
ablkit.reasoning.VerificationReasoner+ablkit.bridge.VerificationBridge. Lawler-style best-first enumeration of the top-K consistent label assignments, trained one-per-segment. Reference: https://github.com/VerificationLearning/VerificationLearning - Multi-label —
ablkit.learning.MultiLabelABLModel,MultiLabelBasicNN,MultiLabelClassificationDataset(sigmoid + threshold pipeline; powers the BDD-OIA example). - Semi-supervised —
SimpleBridge.train(..., use_supervised_data=True)with partial-labeltrain_data(None entries get abduced). - New predefined
dist_funcoptions —similarity(cosine-geometry over model embeddings; requires base modelextract_features) andrejection(confidence + candidate-complexity).
Examples
- New BDD-OIA example under
examples/bdd_oia/(multi-label autonomous-driving action prediction). - MNIST-Add (
examples/mnist_add/main.py): new--method {standard,a3bl,verification},--dist-func {hamming,confidence,avg_confidence,similarity,rejection},--labeled-ratio FLOAT,--top-k INTflags. The oldnew_feature.pyis removed. - HWF (
examples/hwf/main.py):eval()replaced with a precedence-awareastwalker;_valid_candidatededuped between KB classes. - Zoo (
examples/zoo/kb.py):exec()/eval()replaced with an explicit Z3 variable dict.
Refactoring and cleanup
extract_featurespromoted toBasicNNso any user model withextract_features(x)opts intodist_func='similarity'without subclassing.SimpleBridge.train()split into_resolve_segment_size/_train_one_segment/_maybe_eval/_maybe_savehelpers.- All reasoners (
Reasoner,A3BLReasoner,VerificationReasoner) consolidated inablkit/reasoning/reasoner.pywith section banners. A3BLBridgemoved fromexamples/mnist_add/intoablkit/bridge/(it was generic, not example-specific).- Naming pedagogy:
cls = LeNet5(...)→net = LeNet5(...)across examples and docs (clsconventionally means a class).get_args→parse_argsfor cross-example consistency. Missing__init__.pyadded to example sub-packages. - Logging:
print()→print_log()in dataset downloaders and the Prolog install hint.
Packaging & CI
pyproject.toml:requires-python>=3.8.0;pytestadded to[test]extras..github/workflows/build-and-test.yaml:actions/checkout v2 → v4,setup-python v2 → v5,codecov-action v1 → v4. Drop Python 3.7 (EOL). Switched tosetup-python's built-in pip cache. Install viapip install -e ".[test]".fail-fast: false; coverage uploaded once..github/workflows/lint.yaml: action bumps, Python 3.10, scope flake8 toablkit/.
Documentation
- New
Intro/Advanced.rstpage covering all four new methods (multi-label, semi-supervised, A3BL, Verification Learning) in one place. - New
Examples/BDD-OIA.rstwalkthrough. Examples/MNISTAdd.rst: documented new CLI flags.- Sphinx title-underline fixes across
Intro/andAPI/pages; explicit:members:forablkit.reasoningandablkit.utils.
Compatibility
- Python 3.7 is no longer supported. Minimum: Python 3.8.
examples/mnist_add/new_feature.pyremoved (its scope folded intomain.py).examples/mnist_add/models/a3bl_model.pyremoved (itsA3BLBasicNNshell collapsed into the new coreBasicNN.extract_features).examples/bdd_oia/models/{bdd_nn,bdd_model}.pyremoved (replaced by the coreMultiLabelBasicNN/MultiLabelABLModel).