API Reference¶
assess_optimal_chunk_size(n_simulations=1000, chunk_step_size=100, plot_outfile=None)
¶
This runs the same set of doublet simulations using different chunk sizes and prints the results to the terminal to show find which chunk size is optimal. It runs each chunk size 3 times and takes the average of their times to find the time taken for that chunk size. The chunks which are tested go from 1 -> n_simulations with steps of chunk_step_size.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_simulations
|
int
|
The number of simulations which are run in parralel |
1000
|
chunk_step_size
|
int
|
The step size of chunks to test; going from 1 to n_simulations |
100
|
plot_outfile
|
str | Path
|
If provided a plot is made showing the time taken per-chunk size and saved to this path |
None
|
Source code in src/pythermogis/dask_utils/assess_optimal_chunk_size.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |