Neil Wadhvana
11/05/2024, 5:25 PMColin Ho
11/06/2024, 5:07 PMiter_partitions, which will yield an iterator of partitions in the form of Ray ObjectRefs.
Regarding the streaming engine, it is on our roadmap to integrate it with Ray, but our priority is to release it for local mode first.jay
11/06/2024, 7:10 PMiter_partitions performs for you? It should be very simple (and cheap) to convert these objectrefs into the blocks that Ray Dataset expects.
Here’s the code in Daft that does it: https://github.com/Eventual-Inc/Daft/blob/main/daft/runners/ray_runner.py#L138-L172
If you figure it out, we should maybe upstream your changes to change how Daft creates Ray datasets: https://github.com/Eventual-Inc/Daft/blob/main/daft/runners/ray_runner.py#L279-L290 (or we can maybe upstream a contribution into Ray Data to have a Daft Datasource)Geronimo Gil
11/07/2024, 8:58 PMNeil Wadhvana
11/21/2024, 12:19 AMNeil Wadhvana
11/21/2024, 12:24 AMiter_partitions, but this requires an executed dataframe.Tabrez Mohammed
12/05/2024, 3:51 AMto_ray_dataset(). Fortunately, write_parquet() -> read_parquet() worked for us. Looking forward to a better fix for this because we'll have some 500M row datasets to process soon. 🙏jay
12/05/2024, 3:59 AMdf.explain(True))
2. What machines are you running
3. What parquet files are you reading (types of columns, size of files, where the files are stored)Tabrez Mohammed
12/05/2024, 4:25 AMinto_partitions() on the 2 original DFs to something like 100-200 otherwise the join itself takes 10-20m before running OOM (before reaching the call to generate a Ray dataset). Column count is ~20, nothing complex so far like dense vectors (all text or number data, some lists). Iceberg table is stored in S3 buckets.
Another thing I noticed is that using the native runner on my M2 Pro MBP is 2x faster than trying to use the Ray runner on a 32 core 96GB single node ray cluster. Furthermore, I didn't need do the repartitioning workaround with the native runner; it materialized the outer join in ~3 minutes.Tabrez Mohammed
12/05/2024, 4:27 AMGeronimo Gil
12/05/2024, 12:16 PMTabrez Mohammed
12/05/2024, 3:20 PMGeronimo Gil
12/05/2024, 4:09 PMjay
12/05/2024, 5:08 PMGeronimo Gil
12/05/2024, 5:10 PMjay
12/05/2024, 5:10 PMTabrez Mohammed
12/05/2024, 11:22 PMDaft does a pretty good job of “coalescing reads”.Yes Daft seems to handle this OK, especially in native mode. It's when using the Ray runner and generating the Ray data set that we see the OOMs.
Tabrez Mohammed
12/05/2024, 11:25 PMwrite.distribution-mode to hash, did another table update, and it looks like the new snapshot's num partitions on the Daft DF is much closer to the num partitions of the Spark DF during the write.
I’m guessing that your join (without into_partitions) is OOMing the head node?Yes we run OOM on just the Daft DF outer join, but there's a separate issue which I think is what @Neil Wadhvana called out originally, that the
to_ray_dataset() runs OOM. In that case, it's all nodes and not just the head.jay
12/06/2024, 1:11 AMto_ray_dataset() OOM is likely because of the large materialization into Ray. We should chat more about enabling a better workflow here, would love to chat over a call to hash it out.