-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_analyze_task255.py
More file actions
39 lines (36 loc) · 1.29 KB
/
Copy path_analyze_task255.py
File metadata and controls
39 lines (36 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import json
import numpy as np
data = json.load(open("data/neurogolf-2026/raw/task255.json"))
print("train examples:", len(data["train"]))
print("test examples:", len(data.get("test", [])))
print("arc-gen examples:", len(data.get("arc-gen", [])))
for i, ex in enumerate(data["train"]):
inp = ex["input"]
out = ex["output"]
in_arr = np.array(inp)
out_arr = np.array(out)
print(f"\n=== Train {i} ===")
print(f"Input shape: {in_arr.shape}, colors: {sorted(np.unique(in_arr).tolist())}")
print(f"Output shape: {out_arr.shape}, colors: {sorted(np.unique(out_arr).tolist())}")
print("Input:")
for row in inp:
print(row)
print("Output:")
for row in out:
print(row)
# Also print test/arc-gen
for split in ["test", "arc-gen"]:
for i, ex in enumerate(data.get(split, [])):
inp = ex["input"]
out = ex["output"]
in_arr = np.array(inp)
out_arr = np.array(out)
print(f"\n=== {split} {i} ===")
print(f"Input shape: {in_arr.shape}, colors: {sorted(np.unique(in_arr).tolist())}")
print(f"Output shape: {out_arr.shape}, colors: {sorted(np.unique(out_arr).tolist())}")
print("Input:")
for row in inp:
print(row)
print("Output:")
for row in out:
print(row)