codes.benchmark.bench_utils#
Functions
|
Check whether there are any configuration issues with the benchmark. |
|
Check whether the required models for the benchmark are present in the expected directories. |
|
Clean the metrics dictionary to remove problematic entries. |
|
Convert all numerical values in a dictionary to scientific notation. |
Recursively convert data to standard types that can be serialized to YAML. |
|
|
Count the number of trainable parameters in the model. |
Recursively remove dictionary entries that contain NumPy arrays. |
|
|
Flatten a nested dictionary. |
|
Format a duration given in seconds as hh:mm:ss. |
|
Format mean and std time consistently in ns, µs, ms, or s. |
|
Get the model configuration for a specific surrogate model from the dataset folder. |
|
Generate a list of required models based on the configuration settings. |
|
Check if the surrogate model exists. |
|
Load a trained surrogate model. |
|
Generate a CSV file comparing metrics for different surrogate models. |
|
Measure the memory footprint of the model during the forward and backward pass. |
|
Read the YAML configuration file. |
|
Write the benchmark metrics to a YAML file. |