I'm using daft on Ray to read data via a custom Da...
# daft-dev
t
I'm using daft on Ray to read data via a custom DataSource. I see the number of tasks are generated correctly, but the tasks are not distributed as I expected. My setup is just a local Ray cluster (1 node). What I expected is that each task will be distributed into one process. But looks like all of the tasks are scheduled into one process. My task will read a range of data from a hdf5 file, which blocks reading from multiple threads. So the current distribution is not very useful for my use case. I see that this function is responsible for starting the workers https://github.com/Eventual-Inc/Daft/blob/main/daft/runners/flotilla.py#L146-L175, when I change it to start one worker per one cpu per one node, the tasks are distributed to all the processes (workers) and speeds up my code a lot. So my question is that is there any way for the user to configure the workers pool?
j
The distributed flotilla runner actually schedules one local runner per node! That local runner is then responsible for distributing work itself based on the CPUs available
@Colin Ho @Srinivas Lade might have follow-up questions here on some of the performance that you’re seeing though
t
Thanks @jay, what I've seen so far is that the local runner scheduled all of tasks into just one process
c
Yes this is correct. we can enable users to define the workers for sure. However, this will not affect performance on the native runner, which will still run one process. If instead we enabled the datasources to run on separate processes, that would be beneficial for both the native and ray runner
👍 2
t
If instead we enabled the datasources to run on separate processes, that would be beneficial for both the native and ray runner
👆 This will be great ❤️
j
Hello, I'm interested in concurrent reading of HDF5. I'd like to know how you perform concurrent reading of an HDF5 file. Will the datasource for reading HDF5 be contributed to the community?
s
Hi @junling du , we don’t have plans on implementing a HDF5 reader anytime soon, but we are always looking for community contributions. If you're interested in working on this, I'd recommend looking at the DataSource API we have, as well as some discussion into implementing a Kafka Reader here. Should I create an issue or will you?