Fix wrong target in fix_and_inspect_logs.py (row 7 corrected)
Browse files
scripts/fix_and_inspect_logs.py
CHANGED
|
@@ -32,7 +32,6 @@ def coerce_gates(g):
|
|
| 32 |
elif lv in ("false","0","no"):
|
| 33 |
out[k] = False
|
| 34 |
else:
|
| 35 |
-
# try numeric
|
| 36 |
try:
|
| 37 |
out[k] = bool(int(v))
|
| 38 |
except Exception:
|
|
@@ -58,8 +57,7 @@ if accepted_entry is not None:
|
|
| 58 |
if 'candidate_array' not in accepted_entry:
|
| 59 |
accepted_entry['candidate_array'] = phi.tolist() if phi is not None else None
|
| 60 |
|
| 61 |
-
#
|
| 62 |
-
# If result does not contain the target, you can edit TARGET_GRID below to match your task.
|
| 63 |
TARGET_GRID = [
|
| 64 |
[0,0,0,0,7,7,0,7,7],
|
| 65 |
[0,0,0,7,7,7,7,7,7],
|
|
@@ -68,13 +66,12 @@ TARGET_GRID = [
|
|
| 68 |
[7,7,7,7,7,7,7,7,7],
|
| 69 |
[0,7,7,0,7,7,0,7,7],
|
| 70 |
[0,0,0,0,7,7,0,7,7],
|
| 71 |
-
[0,
|
| 72 |
[0,0,0,0,7,7,0,7,7],
|
| 73 |
]
|
| 74 |
TARGET = np.array(TARGET_GRID, dtype=int)
|
| 75 |
|
| 76 |
def tile_transform(phi, out_shape):
|
| 77 |
-
# minimal tile_transform fallback: tile or crop to out_shape
|
| 78 |
a = np.array(phi)
|
| 79 |
h_out, w_out = out_shape
|
| 80 |
h_in, w_in = a.shape
|
|
|
|
| 32 |
elif lv in ("false","0","no"):
|
| 33 |
out[k] = False
|
| 34 |
else:
|
|
|
|
| 35 |
try:
|
| 36 |
out[k] = bool(int(v))
|
| 37 |
except Exception:
|
|
|
|
| 57 |
if 'candidate_array' not in accepted_entry:
|
| 58 |
accepted_entry['candidate_array'] = phi.tolist() if phi is not None else None
|
| 59 |
|
| 60 |
+
# Corrected target from real ARC task 007bbfb7 (Kronecker self-similar)
|
|
|
|
| 61 |
TARGET_GRID = [
|
| 62 |
[0,0,0,0,7,7,0,7,7],
|
| 63 |
[0,0,0,7,7,7,7,7,7],
|
|
|
|
| 66 |
[7,7,7,7,7,7,7,7,7],
|
| 67 |
[0,7,7,0,7,7,0,7,7],
|
| 68 |
[0,0,0,0,7,7,0,7,7],
|
| 69 |
+
[0,0,0,7,7,7,7,7,7],
|
| 70 |
[0,0,0,0,7,7,0,7,7],
|
| 71 |
]
|
| 72 |
TARGET = np.array(TARGET_GRID, dtype=int)
|
| 73 |
|
| 74 |
def tile_transform(phi, out_shape):
|
|
|
|
| 75 |
a = np.array(phi)
|
| 76 |
h_out, w_out = out_shape
|
| 77 |
h_in, w_in = a.shape
|