Skip to content

Releases: AbductiveLearning/ABLkit

Release list

ablkit 1.0.0

Choose a tag to compare

@troyyyyy troyyyyy released this 17 May 11:57

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 Learningablkit.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-labelablkit.learning.MultiLabelABLModel, MultiLabelBasicNN, MultiLabelClassificationDataset (sigmoid + threshold pipeline; powers the BDD-OIA example).
  • Semi-supervisedSimpleBridge.train(..., use_supervised_data=True) with partial-label train_data (None entries get abduced).
  • New predefined dist_func optionssimilarity (cosine-geometry over model embeddings; requires base model extract_features) and rejection (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 INT flags. The old new_feature.py is removed.
  • HWF (examples/hwf/main.py): eval() replaced with a precedence-aware ast walker; _valid_candidate deduped between KB classes.
  • Zoo (examples/zoo/kb.py): exec() / eval() replaced with an explicit Z3 variable dict.

Refactoring and cleanup

  • extract_features promoted to BasicNN so any user model with extract_features(x) opts into dist_func='similarity' without subclassing.
  • SimpleBridge.train() split into _resolve_segment_size / _train_one_segment / _maybe_eval / _maybe_save helpers.
  • All reasoners (Reasoner, A3BLReasoner, VerificationReasoner) consolidated in ablkit/reasoning/reasoner.py with section banners.
  • A3BLBridge moved from examples/mnist_add/ into ablkit/bridge/ (it was generic, not example-specific).
  • Naming pedagogy: cls = LeNet5(...)net = LeNet5(...) across examples and docs (cls conventionally means a class). get_argsparse_args for cross-example consistency. Missing __init__.py added 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; pytest added 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 to setup-python's built-in pip cache. Install via pip install -e ".[test]". fail-fast: false; coverage uploaded once.
  • .github/workflows/lint.yaml: action bumps, Python 3.10, scope flake8 to ablkit/.

Documentation

  • New Intro/Advanced.rst page covering all four new methods (multi-label, semi-supervised, A3BL, Verification Learning) in one place.
  • New Examples/BDD-OIA.rst walkthrough.
  • Examples/MNISTAdd.rst: documented new CLI flags.
  • Sphinx title-underline fixes across Intro/ and API/ pages; explicit :members: for ablkit.reasoning and ablkit.utils.

Compatibility

  • Python 3.7 is no longer supported. Minimum: Python 3.8.
  • examples/mnist_add/new_feature.py removed (its scope folded into main.py).
  • examples/mnist_add/models/a3bl_model.py removed (its A3BLBasicNN shell collapsed into the new core BasicNN.extract_features).
  • examples/bdd_oia/models/{bdd_nn,bdd_model}.py removed (replaced by the core MultiLabelBasicNN / MultiLabelABLModel).