Config class

class multimodal_compare.models.config_cls.Config(parser, eval_only=False)

Bases: object

Config manager

_define_params()

Sets up variables from config and retrieves modality-specific info

_get_mods_config(config)

Makes a list of all modality-specific dicts (self.modality_1, …, self.modality_n), loads labels if provided

_load_config(pth)
_parse_args()

Loads the .yml config specified in the –cfg argument. Any additional arguments override the values in the config. :return: dict; config :rtype: dict

_setup_savedir()

Creates the model directory in the results folder and saves the config copy

change_seed(seednum)
dump_config()
find_version()
get_vis_dir()
Returns:

returns path to the model’s visualisation directory

Return type:

str

parse_params(parser)

Get parsed params

Parameters:

parser ((argparse.ArgumentParser, str)) – argument parser or str path to config

Returns:

parsed parameters

Return type:

dict