File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -452,6 +452,14 @@ def score(
452452 span .set_attribute ("wallet.id" , hash_span_id (wallet ) if wallet else "unknown" )
453453 result = self ._score_impl (feature_row , labelled_count , caller_id )
454454 span .set_attribute ("model.score" , result .get ("score" , - 1 ))
455+ # Embed a lightweight version stamp so every score output carries
456+ # its provenance (Issue #4).
457+ try :
458+ from utils .version_stamp import get_version as _ll_version
459+
460+ result ["ledgerlens_version" ] = _ll_version ()
461+ except Exception :
462+ pass
455463 return result
456464
457465 def _score_impl (
Original file line number Diff line number Diff line change 1+ """End-to-end detection workflow examples for LedgerLens.
2+
3+ This package contains runnable examples that exercise the full detection
4+ pipeline from raw trade data through to a LedgerLens Risk Score, without
5+ requiring a live Stellar Horizon connection. Each example:
6+
7+ - Generates synthetic trade data that mimics a specific on-chain pattern
8+ - Runs the full detection stack (Benford engine, feature engineering, model
9+ inference, SHAP explainer)
10+ - Prints the resulting risk score and top SHAP attributions
11+
12+ These examples double as integration smoke-tests: ``pytest examples/`` runs
13+ all of them in CI to ensure the pipeline does not regress.
14+
15+ Run any example directly::
16+
17+ python -m examples.e2e_clean_trading
18+ python -m examples.e2e_wash_trading_ring
19+ python -m examples.e2e_benford_anomaly
20+ python -m examples.e2e_cross_venue_coordination
21+ python -m examples.e2e_full_pipeline
22+ """
You can’t perform that action at this time.
0 commit comments