Skip to content

Conversation

fraserprice
Copy link

@fraserprice fraserprice commented Jul 25, 2025

  • Much more readable code
  • Better separation of concerns
  • No magic numbers
  • Proper, modern type hints
  • Structured Pydantic objects (no more passing random untyped dicts around everywhere)
  • No more mutating function arguments in order to get outputs 😅
  • Much more clear/easy to follow logic r.e. "which examples go to train set and which go to test set"
  • Also use multiprocessing for CPU-bound transforms
  • Nicer printing/tqdm
  • Slightly more performant padding (pre-allocate array)
  • Logic should otherwise be identical



@dataclass
class ARCPuzzle:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check this data class

split: RawArcSplit
examples: list[PuzzleExample]

examples: List[Tuple[np.ndarray, np.ndarray]]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List[Tuple[np.ndarray, np.ndarray]]

please check this list function and add tuples in it

model_config = ConfigDict(arbitrary_types_allowed=True)


def arc_grid_to_np(grid: List[List[int]]):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#18 add list into it and gird function as well as

return arr.astype(np.uint8)


def np_grid_to_seq_translational_augment(inp: np.ndarray, out: np.ndarray, do_translation: bool):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and translate into models @liamnorm

with open(filepath) as f:
data = json.load(f)

return hashlib.sha256(b"".join(buffer)).hexdigest()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please chek out this return function and add buffer function to it

hashes = []
for example_type, example in puzzle.items():
for input, label in example.examples:
hashes.append(f"{_grid_hash(input)}|{_grid_hash(label)}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

justify the class name and give inputs to it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants