Skip to main content

qlm-measure

Open measurement SDK for education AI — evidence events, record verification, and dataset clients.

Apache-2.0 · Documentation · JS package

Limitations (read first)

  • This SDK is the public interface layer, not the measurement engine. The estimation service (Bayesian posteriors, calibration) is QLM's hosted engine.
  • The verifier checks bookkeeping integrity, not estimation correctness. It can tell you if a record was tampered with. It cannot tell you if the posteriors are accurate. That distinction is the design.
  • Evidence event schemas are v0.2 and may change in minor versions. Pin your dependency.
  • verify makes no network calls. Records never leave your machine.

What the verifier deliberately cannot check

  • Whether posteriors are correctly computed (that requires the engine's update rule; see ESTIMATE.REPRODUCE, planned)
  • Whether evidential weights are appropriate (those are calibrated server-side)
  • Whether triage classifications are accurate (those use rules not in this package)

Install

pip install qlm-measure

Verify a file

qlm-measure verify record.json
qlm-measure verify records.jsonl --format json --report report.json
qlm-measure explain HASH.ENTRY_RECOMPUTE
qlm-measure version

Exit codes: 0 all valid, 1 at least one invalid, 2 usage or parse error.

Report formats

Text (default):

record syn-8f2c-0042  (schema 0.2, 6 entries)
  Schema
    ✓ Required fields present
    ✓ Field types valid
    ✓ Timestamp is ISO 8601
  ...
  VERDICT: CLEAN — record is verifiable

JSON (--format json or --report FILE):

{
  "tool": {"name": "qlm-measure", "version": "0.2.2", "language": "python"},
  "summary": {"records": 1, "valid": 1, "invalid": 0, "checks_run": 9, "checks_passed": 9}
}

Verify in code

from qlm_measure import verify_record

record = {"studentScopeId": "...", "entries": [...]}
result = verify_record(record)
if not result.valid:
    for v in result.violations:
        print(f"[{v.check_id}] v{v.version}: {v.message}")

Check catalog

10 shipped checks, run by verify:

ID Label
SCHEMA.REQUIRED Required fields present
SCHEMA.TYPES Field types valid
SCHEMA.TIMESTAMP_FORMAT Timestamp is ISO 8601
VERSION.MONOTONIC Versions strictly increase
TIMESTAMP.MONOTONIC Timestamps do not go backward
ENUM.VALID Enum values permitted
HASH.PREV_LINK Chain link valid
HASH.ENTRY_RECOMPUTE Entry hash recomputes
POSTERIOR.CHAIN Posterior chain consistent
COMPACTION.BOUNDARY Compaction boundary intact

5 planned checks (listed by explain, not yet run): ESTIMATE.REPRODUCE, TEMPORAL.T_DESIGN, TEMPORAL.T_RESULT, CONSENT.SCOPE, CONSENT.WITHDRAWAL

Use qlm-measure explain CHECK_ID for details on any check.

File formats

  • .json — one record object, or an array of records
  • .jsonl / .ndjson — one record per line
  • - — stdin (format auto-detected)
  • UTF-8, tolerates BOM. Parse errors report line number.

Privacy

  • studentScopeId is pseudonymous by contract. Never include PII.
  • --redact replaces scope IDs with their SHA-256 prefix in output.
  • The SDK does not store data, make network calls, or set cookies.

Links

License

Apache-2.0. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qlm_measure-0.2.4.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qlm_measure-0.2.4-py3-none-any.whl (41.4 kB view details)

Uploaded Python 3

File details

Details for the file qlm_measure-0.2.4.tar.gz.

File metadata

  • Download URL: qlm_measure-0.2.4.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for qlm_measure-0.2.4.tar.gz
Algorithm Hash digest
SHA256 a8f7c000456e15e19cb4bd612cb8827f1e84e45c99d87b7c72365077574d03ca
MD5 df598f3bb437955fa3fa08eae8e811b5
BLAKE2b-256 4e3ddee76daa7f69e67a9c425281b1ee4584353a722923a9f7e89a2a77beb3a8

See more details on using hashes here.

File details

Details for the file qlm_measure-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: qlm_measure-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 41.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for qlm_measure-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 431382770dc1ce2d7a0508bbc41bd659a7d14faeb17785aa4b6fa1d8afe1f2f8
MD5 95e43cfca7e14028aea7598f37cce05e
BLAKE2b-256 d9b6fec87cf2477d3a4f889dde85cbb42072fd6d9b6465d77415bfb15fa60374

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page