SitePool#
- class fedcausal.fedges.SitePool(sites, n_jobs=None)[source]#
Runs a list of sites, either in this process or spread over worker processes.
Each worker owns its sites for the whole run, so their score caches survive between rounds; only DAGs and scores cross between processes. Use it as a context manager so the workers are shut down.
- Parameters:
- siteslist of Site
- n_jobsint or None
Worker processes.
Noneor 1 runs the sites in this process, and -1 uses one worker per site up to the number of CPUs.