class foxes.engines.RayEngine(foxes.engines.PoolEngine)[source]

The ray engine for foxes calculations.

Public members

submit(f, *args, **kwargs)[source]

Submits a job to worker, obtaining a future

future_is_done(future)[source]

Checks if a future is done

await_result(future)[source]

Waits for result from a future

RayEngine(*args, share_cstore=False, pool_args={}, **kwargs)[source]

Constructor.

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

Runs a function on a list of files

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

Runs the model calculation

__repr__()[source]

Return repr(self).

property name

The engine’s name

property n_procs

The number of processes

property n_workers

The number of worker processes

property has_progress_bar

Flag for active progress bar

property prints_progress

Flag for active progress printing

property entered

Flag that this model has been entered.

property running_chunk_calc

Flag that a chunk calculation is running.

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

get_start_calc_message(n_chunks_states, n_chunks_targets)[source]

Helper function for start calculation message

new_chunk_results_manager(algo, **kwargs)[source]

Creates a new ChunkResultsManager

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

Run-time engine factory.

Classes

class ChunkResultsManager[source]

Helper class for results management during chunk calculations