utils#

Utility functions for models.

Functions#

models.utils.find_file_ignore_underscores(file, basepath=None)[source]#

Returns the file name by ignoring the underscores and dashes.

Parameters:
  • file (str) – the file name

  • basepath – the base path to search the file

Returns:

the name of the file that more closely resembles the original file name

Return type:

str

models.utils.load_model_config(args, buffer_size=None)[source]#

Loads the configuration file for the model.

Parameters:
  • args (Namespace) – the arguments which contains the hyperparameters

  • buffer_size (int | None) – if a method has a buffer, knowing the buffer_size is required to load the best configuration

Returns:

the configuration of the model

Return type:

dict