NIPS26Repo commited on
Commit
48cf238
·
verified ·
1 Parent(s): 6a79197

Fix Croissant FileObject checksums for validation

Browse files
Files changed (1) hide show
  1. tools/write_release_metadata.py +78 -16
tools/write_release_metadata.py CHANGED
@@ -8,6 +8,7 @@ shell tools.
8
  from __future__ import annotations
9
 
10
  import json
 
11
  import os
12
  import shutil
13
  from pathlib import Path
@@ -74,7 +75,7 @@ release_data/
74
  ├── README.md # This file
75
  ├── LICENSE.md # Multi-source license + redistribution notes
76
  ├── CHANGELOG.md # Version history
77
- ├── croissant.json # Croissant 1.0 metadata (core + RAI)
78
  ├── manifest.json # Top-level run inventory (machine-readable)
79
 
80
  ├── runs/ # 28 individual backtest runs
@@ -284,7 +285,7 @@ Track double-blind submission.
284
  - Two flattened derived tables (`derived/all_metrics.csv`,
285
  `derived/all_trades.csv`) for easy querying.
286
  - Reproducibility manifest mirrored from the paper's `latex/audit/`.
287
- - Croissant 1.0 metadata with core and RAI fields.
288
  """
289
 
290
 
@@ -305,7 +306,21 @@ def copy_build_script() -> None:
305
 
306
 
307
  def write_croissant() -> None:
308
- """Croissant 1.0 metadata with core + RAI fields."""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  croissant = {
310
  "@context": {
311
  "@language": "en",
@@ -315,8 +330,10 @@ def write_croissant() -> None:
315
  "conformsTo": "dct:conformsTo",
316
  "cr": "http://mlcommons.org/croissant/",
317
  "rai": "http://mlcommons.org/croissant/RAI/",
 
318
  "dataType": {"@id": "cr:dataType", "@type": "@vocab"},
319
  "dct": "http://purl.org/dc/terms/",
 
320
  "examples": {"@id": "cr:examples", "@type": "@json"},
321
  "extract": "cr:extract",
322
  "field": "cr:field",
@@ -331,19 +348,22 @@ def write_croissant() -> None:
331
  "md5": "cr:md5",
332
  "parentField": "cr:parentField",
333
  "path": "cr:path",
 
334
  "recordSet": "cr:recordSet",
335
  "references": "cr:references",
336
  "regex": "cr:regex",
337
  "repeated": "cr:repeated",
338
  "replace": "cr:replace",
339
  "sc": "https://schema.org/",
 
340
  "separator": "cr:separator",
 
341
  "source": "cr:source",
342
  "subField": "cr:subField",
343
  "transform": "cr:transform"
344
  },
345
  "@type": "sc:Dataset",
346
- "conformsTo": "http://mlcommons.org/croissant/1.0",
347
  "name": "QuantArena Artifact Bundle",
348
  "description": (
349
  "Reproducibility artifacts for QuantArena, a controlled live-market "
@@ -382,7 +402,9 @@ def write_croissant() -> None:
382
  "name": "manifest.json",
383
  "description": "Top-level run inventory (machine-readable)",
384
  "encodingFormat": "application/json",
385
- "contentUrl": "manifest.json"
 
 
386
  },
387
  {
388
  "@type": "cr:FileObject",
@@ -390,7 +412,9 @@ def write_croissant() -> None:
390
  "name": "all_metrics.csv",
391
  "description": "Long-format flat table of summary metrics across all 28 runs",
392
  "encodingFormat": "text/csv",
393
- "contentUrl": "derived/all_metrics.csv"
 
 
394
  },
395
  {
396
  "@type": "cr:FileObject",
@@ -398,7 +422,9 @@ def write_croissant() -> None:
398
  "name": "all_trades.csv",
399
  "description": "Concatenated per-trade log across all 28 runs",
400
  "encodingFormat": "text/csv",
401
- "contentUrl": "derived/all_trades.csv"
 
 
402
  },
403
  {
404
  "@type": "cr:FileObject",
@@ -406,7 +432,9 @@ def write_croissant() -> None:
406
  "name": "sector_style_universe.csv",
407
  "description": "5x4 sector/style universe (20 US + 20 CN tickers)",
408
  "encodingFormat": "text/csv",
409
- "contentUrl": "universe/sector_style_universe.csv"
 
 
410
  },
411
  {
412
  "@type": "cr:FileSet",
@@ -551,13 +579,14 @@ def write_croissant() -> None:
551
  ),
552
  "rai:dataLimitations": (
553
  "Trading frictions (transaction costs, market impact, short-selling, "
554
- "borrowing constraints) are not modeled. The 6M live-market window is "
555
- "much shorter than typical institutional evaluation horizons. The "
556
- "GPT-5.4 backend identifier reflects the API gateway label exposed at "
557
- "run time and not a vendor build hash; exact backend reproducibility "
558
- "depends on the gateway's routing decisions at run time. The bundle "
559
- "redistributes only the derived decision-level data, not the raw "
560
- "third-party feeds."
 
561
  ),
562
  "rai:dataReleaseMaintenancePlan": (
563
  "v1.0 corresponds to the NeurIPS 2026 E&D Track submission. Future "
@@ -573,7 +602,40 @@ def write_croissant() -> None:
573
  "of herd behavior. The bundle is explicitly scoped for research and "
574
  "evaluation; it is not financial advice and should not be interpreted "
575
  "as evidence of safe or profitable real-world deployment."
576
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
577
  }
578
  out = RELEASE / "croissant.json"
579
  out.write_text(json.dumps(croissant, indent=2, ensure_ascii=False))
 
8
  from __future__ import annotations
9
 
10
  import json
11
+ import hashlib
12
  import os
13
  import shutil
14
  from pathlib import Path
 
75
  ├── README.md # This file
76
  ├── LICENSE.md # Multi-source license + redistribution notes
77
  ├── CHANGELOG.md # Version history
78
+ ├── croissant.json # Croissant 1.1 metadata (core + RAI)
79
  ├── manifest.json # Top-level run inventory (machine-readable)
80
 
81
  ├── runs/ # 28 individual backtest runs
 
285
  - Two flattened derived tables (`derived/all_metrics.csv`,
286
  `derived/all_trades.csv`) for easy querying.
287
  - Reproducibility manifest mirrored from the paper's `latex/audit/`.
288
+ - Croissant 1.1 metadata with core and RAI fields.
289
  """
290
 
291
 
 
306
 
307
 
308
  def write_croissant() -> None:
309
+ """Croissant 1.1 metadata with core + RAI fields."""
310
+ def md5(path: str) -> str:
311
+ digest = hashlib.md5()
312
+ with (RELEASE / path).open("rb") as f:
313
+ for chunk in iter(lambda: f.read(1024 * 1024), b""):
314
+ digest.update(chunk)
315
+ return digest.hexdigest()
316
+
317
+ def sha256(path: str) -> str:
318
+ digest = hashlib.sha256()
319
+ with (RELEASE / path).open("rb") as f:
320
+ for chunk in iter(lambda: f.read(1024 * 1024), b""):
321
+ digest.update(chunk)
322
+ return digest.hexdigest()
323
+
324
  croissant = {
325
  "@context": {
326
  "@language": "en",
 
330
  "conformsTo": "dct:conformsTo",
331
  "cr": "http://mlcommons.org/croissant/",
332
  "rai": "http://mlcommons.org/croissant/RAI/",
333
+ "data": "cr:data",
334
  "dataType": {"@id": "cr:dataType", "@type": "@vocab"},
335
  "dct": "http://purl.org/dc/terms/",
336
+ "equivalentProperty": "cr:equivalentProperty",
337
  "examples": {"@id": "cr:examples", "@type": "@json"},
338
  "extract": "cr:extract",
339
  "field": "cr:field",
 
348
  "md5": "cr:md5",
349
  "parentField": "cr:parentField",
350
  "path": "cr:path",
351
+ "prov": "http://www.w3.org/ns/prov#",
352
  "recordSet": "cr:recordSet",
353
  "references": "cr:references",
354
  "regex": "cr:regex",
355
  "repeated": "cr:repeated",
356
  "replace": "cr:replace",
357
  "sc": "https://schema.org/",
358
+ "samplingRate": "cr:samplingRate",
359
  "separator": "cr:separator",
360
+ "sha256": "sc:sha256",
361
  "source": "cr:source",
362
  "subField": "cr:subField",
363
  "transform": "cr:transform"
364
  },
365
  "@type": "sc:Dataset",
366
+ "conformsTo": "http://mlcommons.org/croissant/1.1",
367
  "name": "QuantArena Artifact Bundle",
368
  "description": (
369
  "Reproducibility artifacts for QuantArena, a controlled live-market "
 
402
  "name": "manifest.json",
403
  "description": "Top-level run inventory (machine-readable)",
404
  "encodingFormat": "application/json",
405
+ "contentUrl": "manifest.json",
406
+ "md5": md5("manifest.json"),
407
+ "sha256": sha256("manifest.json")
408
  },
409
  {
410
  "@type": "cr:FileObject",
 
412
  "name": "all_metrics.csv",
413
  "description": "Long-format flat table of summary metrics across all 28 runs",
414
  "encodingFormat": "text/csv",
415
+ "contentUrl": "derived/all_metrics.csv",
416
+ "md5": md5("derived/all_metrics.csv"),
417
+ "sha256": sha256("derived/all_metrics.csv")
418
  },
419
  {
420
  "@type": "cr:FileObject",
 
422
  "name": "all_trades.csv",
423
  "description": "Concatenated per-trade log across all 28 runs",
424
  "encodingFormat": "text/csv",
425
+ "contentUrl": "derived/all_trades.csv",
426
+ "md5": md5("derived/all_trades.csv"),
427
+ "sha256": sha256("derived/all_trades.csv")
428
  },
429
  {
430
  "@type": "cr:FileObject",
 
432
  "name": "sector_style_universe.csv",
433
  "description": "5x4 sector/style universe (20 US + 20 CN tickers)",
434
  "encodingFormat": "text/csv",
435
+ "contentUrl": "universe/sector_style_universe.csv",
436
+ "md5": md5("universe/sector_style_universe.csv"),
437
+ "sha256": sha256("universe/sector_style_universe.csv")
438
  },
439
  {
440
  "@type": "cr:FileSet",
 
579
  ),
580
  "rai:dataLimitations": (
581
  "Trading frictions (transaction costs, market impact, short-selling, "
582
+ "borrowing constraints) are not modeled in the primary runs; the paper "
583
+ "reports a deterministic post-hoc transaction-cost sensitivity sweep "
584
+ "over the released trade logs. The 6M live-market window is much "
585
+ "shorter than typical institutional evaluation horizons. The GPT-5.4 "
586
+ "backend identifier reflects the API gateway label exposed at run time "
587
+ "and not a vendor build hash; exact backend reproducibility depends on "
588
+ "the gateway's routing decisions at run time. The bundle redistributes "
589
+ "only the derived decision-level data, not the raw third-party feeds."
590
  ),
591
  "rai:dataReleaseMaintenancePlan": (
592
  "v1.0 corresponds to the NeurIPS 2026 E&D Track submission. Future "
 
602
  "of herd behavior. The bundle is explicitly scoped for research and "
603
  "evaluation; it is not financial advice and should not be interpreted "
604
  "as evidence of safe or profitable real-world deployment."
605
+ ),
606
+ "rai:hasSyntheticData": False,
607
+ "prov:wasDerivedFrom": [
608
+ "Yahoo Finance / yfinance US equity price and corporate-action data",
609
+ "Tushare China A-share price, fundamental, and news data",
610
+ "Financial Modeling Prep US fundamentals and news data",
611
+ "AKShare China macro and policy indicators",
612
+ "Tavily search-API news retrieval metadata",
613
+ "LLM backend decision outputs from the controlled QuantArena execution harness"
614
+ ],
615
+ "prov:wasGeneratedBy": [
616
+ {
617
+ "@type": "prov:Activity",
618
+ "name": "Controlled backtest execution",
619
+ "description": (
620
+ "The QuantArena harness executed daily decisions from 2025-09-01 "
621
+ "to 2026-02-28 for matched US and CN 20-ticker universes, fixing "
622
+ "backend, analyst workflow, initial capital, portfolio accounting, "
623
+ "and execution rules while varying only the mandate module."
624
+ )
625
+ },
626
+ {
627
+ "@type": "prov:Activity",
628
+ "name": "Artifact derivation and anonymized release packaging",
629
+ "description": (
630
+ "Raw run directories were filtered into decision-level artifacts: "
631
+ "per-run metrics.json, trades.csv, equity_curve.csv, comparison "
632
+ "aggregates, universe definitions, audit manifests, and flattened "
633
+ "all_metrics/all_trades tables. Raw third-party OHLCV/news bodies, "
634
+ "private credentials, author-identifying repository metadata, and "
635
+ "live LLM response logs are excluded."
636
+ )
637
+ }
638
+ ]
639
  }
640
  out = RELEASE / "croissant.json"
641
  out.write_text(json.dumps(croissant, indent=2, ensure_ascii=False))