@classmethod<EOL><INDENT>def from_file(cls, filename: str, run_number: int, continue_training: bool = False, seed: int = None,<EOL>device: str = '<STR_LIT>', params=None):<DEDENT>
with open(filename, '<STR_LIT:r>') as fp:<EOL><INDENT>model_config_contents = Parser.parse(fp)<EOL><DEDENT>project_config_path = ModelConfig.find_project_directory(os.path.dirname(os.path.abspath(filename)))<EOL>with open(os.path.join(project_config_path, cls.PROJECT_FILE_NAME), '<STR_LIT:r>') as fp:<EOL><INDENT>project_config_contents = Parser.parse(fp)<EOL><DEDENT>aggregate_dictionary = {<EOL>**project_config_contents,<EOL>**model_config_contents<EOL>}<EOL>return ModelConfig(<EOL>filename=filename,<EOL>configuration=aggregate_dictionary,<EOL>run_number=run_number,<EOL>project_dir=project_config_path,<EOL>continue_training=continue_training,<EOL>seed=seed,<EOL>device=device,<EOL>parameters=params<EOL>)<EOL>
Create model config from file