threeML.parallel.parallel_client module

exception threeML.parallel.parallel_client.NoParallelEnvironment[source]

Bases: UserWarning

class threeML.parallel.parallel_client.ParallelClient(*args, **kw)[source]

Bases: Client

execute_with_progress_bar(worker, items, chunk_size=None, name='progress')[source]
get_number_of_engines()[source]
threeML.parallel.parallel_client.get_base_prefix_compat() str[source]

Get base/real prefix, or sys.prefix if there is none.

threeML.parallel.parallel_client.in_virtualenv() bool[source]
threeML.parallel.parallel_client.is_parallel_computation_active() bool[source]
threeML.parallel.parallel_client.parallel_computation(profile: str | None = None, start_cluster: bool = True, n_jobs: int | None = None) None[source]

A context manager which turns on parallel execution temporarily

Parameters:
  • profile – the profile to use, if different from the default

  • start_cluster – True or False. Whether to start a new cluster. If False, try to use an existing one for the

same profile :return: