sbmlsim.simulator.rr_simulator_ray

Parallel simulation using ray.

Module Contents

Classes

SimulatorActor

Ray actor to execute simulations.

SimulatorRayRR

Parallel simulator using multiple cores via ray.

Attributes

logger

sbmlsim.simulator.rr_simulator_ray.logger[source]
class sbmlsim.simulator.rr_simulator_ray.SimulatorActor[source]

Bases: sbmlsim.simulator.rr_worker.SimulationWorkerRR

Ray actor to execute simulations.

An actor is essentially a stateful worker

work(simulations)[source]

Run a bunch of simulations on a single worker.

Parameters

simulations (List[sbmlsim.simulation.TimecourseSim]) –

Return type

List[pandas.DataFrame]

class sbmlsim.simulator.rr_simulator_ray.SimulatorRayRR(actor_count=None)[source]

Bases: sbmlsim.simulator.rr_simulator_abstract.SimulatorAbstractRR

Parallel simulator using multiple cores via ray.

Parameters

actor_count (Optional[int]) –

static from_sbml(sbml_path, **kwargs)[source]

Set model from SBML.

Parameters

sbml_path (pathlib.Path) –

Return type

SimulatorRayRR

set_model(model_state)[source]

Set model from state.

Parameters

model_state (str) –

Return type

None

set_timecourse_selections(selections=None)[source]

Set timecourse selections.

Parameters

selections (Optional[Iterator[str]]) –

Return type

None

set_integrator_settings(**kwargs)[source]

Set integrator settings.

_run_timecourses(simulations)[source]

Execute timecourse simulations.

Parameters

simulations (List[sbmlsim.simulation.TimecourseSim]) –

Return type

List[pandas.DataFrame]

static _create_chunks(item, size)[source]

Yield successive sized chunks from item.

Parameters

size (int) –

static cpu_count()[source]

Get physical CPU count.

Return type

int