fix: DecisionLogger JSONL filename prefix — ml-decisions-sim-* for dataset_builder discovery
The Java DecisionLogger was writing files as ml-decisions-{batchId}.jsonl
but the Python dataset_builder.py scans for ml-decisions-sim-*.jsonl to
categorize them as 'forge' source training data.
This one-line fix adds the 'sim-' prefix so the Forge batch heuristic
path now feeds directly into the ML training pipeline:
BatchRunner → DecisionExtractor → DecisionLogger
→ results/ml-decisions-sim-{batchId}.jsonl
→ dataset_builder.py discovers as 'forge' source
→ encode → train
The full chain was already wired (Issue #83 Phase 1 infrastructure),
this naming mismatch was the only thing preventing it from working.
Refs: Issue #83 Phase 1
This commit is contained in:
1 parent
ea23f97b9c
commit
14ff543135
1 file changed
+5
-2
@@ -14,7 +14,7 @@ import java.util.*;
|
||||
* Each game's decisions are appended as JSON lines to a batch-specific file.
|
||||
* Format: one DecisionSnapshot JSON object per line (JSONL/ndjson).
|
||||
*
|
||||
* Output path: results/ml-decisions-{batchId}.jsonl
|
||||
* Output path: results/ml-decisions-sim-{batchId}.jsonl
|
||||
*
|
||||
* Usage from BatchRunner:
|
||||
* DecisionLogger logger = new DecisionLogger(resultsDir, batchId);
|
||||
@@ -39,7 +39,10 @@ public class DecisionLogger {
|
||||
if (!Files.exists(dir)) {
|
||||
Files.createDirectories(dir);
|
||||
}
|
||||
this.outputPath = dir.resolve("ml-decisions-" + batchId + ".jsonl");
|
||||
// Prefix with "sim-" so the Python dataset_builder.py discovers
|
||||
// these files under the "forge" source category. The builder scans
|
||||
// for ml-decisions-sim-*.jsonl → source = "forge".
|
||||
this.outputPath = dir.resolve("ml-decisions-sim-" + batchId + ".jsonl");
|
||||
this.writer = Files.newBufferedWriter(outputPath, StandardCharsets.UTF_8,
|
||||
StandardOpenOption.CREATE, StandardOpenOption.APPEND);
|
||||
|
||||
|
||||
Reference in new issue
Block a user