Skip to content

Conversation

@vepadulano
Copy link
Owner

@vepadulano vepadulano commented Nov 11, 2020

This PR introduces the Dask module to support PyRDF analysis execution through a dask.distributed scheduler. The connection to the scheduler is either started remotely or locally depending on whether the user provides a scheduler address in the configuration of the Dask instance
The execution of the graph is done through the dask.delayed mechanism that wraps both the mapper and reducer functions. Data ranges are mapped and the results are recursively reduced until there is only one list of merged action results. A call to dask.distributed.Future.compute returns the final result to the user.
A new entry has been added to the options of PyRDF.use accordingly.

TODO:

  • add support to distribute files to the workers

This PR introduces the Dask module to support PyRDF analysis execution through a dask.distributed scheduler. The connection to the scheduler is either started remotely or locally depending on whether the user provides a scheduler address in the configuration of the Dask instance
The execution of the graph is done through the dask.delayed mechanism that wraps both the mapper and reducer functions. Data ranges are mapped and the results are recursively reduced until there is only one list of merged action results. A call to `dask.distributed.Future.compute` returns the final result to the user.
A new entry has been added to the options of PyRDF.use accordingly.
@vepadulano vepadulano self-assigned this Nov 11, 2020
Copy link

@eguiraud eguiraud left a comment

Choose a reason for hiding this comment

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

wow, looks good to me!

needs waaay more testing, but apart from that looks great


MIN_NPARTITIONS = 2

def __init__(self, config={}):

Choose a reason for hiding this comment

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

needs docs for what parameters can be passed as configuration

Copy link
Owner Author

Choose a reason for hiding this comment

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

Sure! I'll make more tests and finalize the PR with docs in the end 👍

@vepadulano
Copy link
Owner Author

Thank you! Yeah it's a very basic first implementation, I wanted to push it to also let others try it for now. I'll make sure to add more tests and docs before merging

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.

3 participants