class foxes.engines.LocalClusterEngine(foxes.engines.DaskBaseEngine)[source]

The dask engine for foxes calculations on a local cluster.

Attributes

cluster_pars: dict

Parameters for the cluster

client_pars: dict

Parameters for the client of the cluster

Public members

LocalClusterEngine(*args, cluster_pars={}, client_pars={}, **kwargs)[source]

Constructor.

run_calculation(algo, model, model_data=None, farm_data=None, ...)[source]

Runs the model calculation

initialize()[source]

Initializes the engine.

map(func, inputs, *args, **kwargs)[source]

Runs a function on a list of files

chunk_data(data)[source]

Applies the selected chunking

finalize(*exit_args, **exit_kwargs)[source]

Finalizes the engine.

__repr__()[source]

Return repr(self).

property entered

Flag that this model has been entered.

property initialized

Initialization flag.

print(*args, level=1, **kwargs)[source]

Prints based on verbosity

property loop_dims

Gets the loop dimensions (possibly chunked)

select_subsets(*datasets, sel=None, isel=None)[source]

Takes subsets of datasets

calc_chunk_sizes(n_states, n_targets=1)[source]

Computes the sizes of states and points chunks

get_chunk_input_data(algo, model_data, farm_data, point_data, ...)[source]

Extracts the data for a single chunk calculation

combine_results(algo, results, model_data, out_vars, ...)[source]

Combines chunk results into final Dataset

classmethod new(engine_type, *args, **kwargs)[source]

Run-time engine factory.