-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Title of the talk
Understanding API Dispatching in NetworkX
Description
Hi! Have you ever wished your Python libraries were faster? Or wanted to fundamentally improve a Python library by rewriting everything in a faster language like C or Rust? Well, wish no more... NetworkX's API dispatching mechanism redirects your plain old NetworkX function calls to a FASTER implementation present in a separate backend package by leveraging the Python's entry_point specification!
NetworkX is a popular, pure Python library used for graph(aka network) analysis. But when the graph size increases (like a network of everyone in the world), then NetworkX algorithms could take days to solve a simple graph analysis problem. So, to address these performance issues, a backend dispatching mechanism was recently developed. In this talk, we will unveil this dispatching mechanism and its implementation details, and how we can use it just by specifying a backend kwarg like this:
>>> nx.betweenness_centrality(G, backend=“parallel”)
or by passing the backend graph object(type-based dispatching):
>>> H = nxp.ParallelGraph(G)
>>> nx.betweenness_centrality(H)
We'll also go over the limitations of this dispatch mechanism. Then we’ll use the example of nx-parallel backend as a guide to understand various NetworkX backend and backend configuration features.
Finally, I'll conclude with a brief overview of how this API dispatch mechanism could be integrated in an non-graph-related Python libraries, such as an array-based or data-centric libraries, along with the potential challenges that may arise during integration. This will be followed by an interactive Q&A session.
Slides from the previous versions of this talk - https://github.com/Schefflera-Arboricola/blogs/tree/main/archive . But, this one will be different!
Thank you :)
Table of contents
- Graphs and what is NetworkX?
- Dispatching in General
- Dispatching in NetworkX
- Other Dispatching related things
- Dispatching in other projects
Duration (including Q&A)
30 min
Prerequisites
- Some basic Python... should know what classes and objects are
- Curiosity
Speaker bio
Hi, I'm Aditi!
GitHub - https://github.com/Schefflera-Arboricola
Slides - https://github.com/Schefflera-Arboricola/blogs/blob/main/archive/PythonPune_December2024_Meetup.pdf
The talk/workshop speaker agrees to
-
Share the slides, code snippets and other material used during the talk
-
If the talk is recorded, you grant the permission to release
the video on PythonPune's YouTube
channel
under CC-BY-4.0
license -
Not do any hiring pitches during the talk and follow the Code
of
Conduct