Synchronizing NetworkX and Joblib configurations in nx-parallel #76
Labels
Infrastructure
Related to the general infrastructure and organisation of code in the repo
type: Enhancement
New feature or request
Background:
PR #75 adds implementation to make nx-parallel compatible with the networkx's configuration system, offered for networkx backends, and documents how to configure nx-parallel using joblib’s
parallel_config
.PR #68 was an attempt to create a unified configuration system in
nx-parallel
by wrapping thejoblib.Parallel()
(inside nx-parallel algorithms) within awith joblib.parallel_config(configs)
context, hereconfigs
are extracted fromnx.config.backends.parallel
. This approach made NetworkX’s config closely mirror joblib’s, giving the appearance of synchronization between the two systems. However, in the last meeting, Dan mentioned that this approach complicates things.Requirement:
We need a robust layer in
nx-parallel
which updates NetworkX’s config as soon as any of joblib’s config parameters are updated, and vice versa. The goal is to ensure that when a user updates a configuration in either of the systems, the other system is instantaneously updated by this layer/interface in nx-parallel to maintain consistency.Challenges:
Order of Updates:
nx-parallel
developer, how can I determine which config system (NetworkX or joblib) the user has updated and in what order?parallel_config
. So, in both cases, we will extractn_jobs = 8
from NetworkX andn_jobs = 5
from joblib. However, the expected behavior is different: in the first case,n_jobs
should be 8 at the end, and in the second case, it should be 5. How can I detect the order of updates to apply the correct configuration?Keeping Context Managers in Sync:
Updating Configurations Without Modifying External Libraries?:
Thank you :)
The text was updated successfully, but these errors were encountered: