Zoltan Eisler
02/12/2025, 8:48 AMHamiltonTracker up to 20% of my DAG tuns can be spent calculating dataframe stats for display in the UI. I have short-circuited the calculations by overriding hamilton_sdk.tracking.polars_stats._compute_stats_ by an empty function, but any less hacky suggestions are welcome.
Second, and more crucially, I hit a very steep serialization penalty when moving data between nodes. If I understood correctly, we can eliminate serialization (at the cost of parallelism, possibly) by putting all the nodes in the same group, but I can’t seem to pull this off. Here’s my code:
class MyGS(grouping.GroupingStrategy):
def group_nodes(self, nodes: List[Node] -> List[NodeGroup]:
group = NodeGroup(base_id=“whatever”, spawning_task_base_id=None, nodes=nodes, purpose=NodeGroupPurpose.EXECUTE_BLOCK)
return [group]
Then I just attach this to my driver by calling
driver.Builder().with_grouping_strategy(MyGS())
However, this doesn’t seem to have the desired effect, stuff still gets serialized. Any suggestion what I am doing wrong? Or another possible workaround?Elijah Ben Izzy
02/12/2025, 6:35 PMElijah Ben Izzy
02/12/2025, 6:35 PMZoltan Eisler
02/12/2025, 6:38 PMRayGraphAdapter and then execute the DAG as usual. Not sure the code will be informative, but can provide it if useful. I don’t insist on grouping, just want to avoid serialization. If possible.Elijah Ben Izzy
02/12/2025, 6:42 PMElijah Ben Izzy
02/12/2025, 6:43 PMZoltan Eisler
02/12/2025, 6:54 PMZoltan Eisler
02/12/2025, 6:55 PMStefan Krawczyk
02/12/2025, 7:11 PMStefan Krawczyk
02/12/2025, 7:12 PMZoltan Eisler
02/12/2025, 7:13 PM