cyberneticlibrary

Enforce notebook determinism

notebook-determinism-enforcerskillsetup L10
davidleconte/hcd-janusgraph
What it does

Enforce notebook reproducibility and eliminate non-determinism

Best for

When enforcing notebook reproducibility and eliminating non-deterministic patterns in data pipelines

Inputs
  • · Notebook cells with datetime, uuid, random calls, query results
Outputs
  • · Cleaned cells, determinism sweep report (errors: 0)
Requires
  • · check_notebook_determinism_contracts.sh
Preconditions
  • · Notebook cells must pass determinism sweep in strict mode
Failure modes
  • · datetime.now() or datetime.utcnow() left in cell
  • · uuid.uuid4() generating random IDs
  • · pandas.sample() without random_state
  • · Query results not ordered before limit (order-by missing)
  • · Weak determinism mode used as workaround
  • · Demo semantics changed while fixing determinism
Trust signals
  • · Hard patterns list (datetime.now, datetime.utcnow, date.today, time.time, uuid.uuid4, pandas.sample)
  • · Strict mode enforcement (no exceptions)
  • · Sweep script with clear error reporting