From d057192f671396c6796c805f5b85d5364f931d70 Mon Sep 17 00:00:00 2001 From: junchen14 Date: Thu, 2 Nov 2023 02:07:07 +0300 Subject: [PATCH] update config files --- minigpt4/common/config.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/minigpt4/common/config.py b/minigpt4/common/config.py index 5fe7239b..a1d3278b 100644 --- a/minigpt4/common/config.py +++ b/minigpt4/common/config.py @@ -116,21 +116,22 @@ def build_dataset_config(config): @staticmethod def build_evaluation_dataset_config(config): datasets = config.get("evaluation_datasets", None) - if datasets is None: - raise KeyError( - "Expecting 'datasets' as the root key for dataset configuration." - ) + # if datasets is None: + # raise KeyError( + # "Expecting 'datasets' as the root key for dataset configuration." + # ) dataset_config = OmegaConf.create() - for dataset_name in datasets: - builder_cls = registry.get_builder_class(dataset_name) + if datasets is not None: + for dataset_name in datasets: + builder_cls = registry.get_builder_class(dataset_name) - # hierarchy override, customized config > default config - dataset_config = OmegaConf.merge( - dataset_config, - {"evaluation_datasets": {dataset_name: config["evaluation_datasets"][dataset_name]}}, - ) + # hierarchy override, customized config > default config + dataset_config = OmegaConf.merge( + dataset_config, + {"evaluation_datasets": {dataset_name: config["evaluation_datasets"][dataset_name]}}, + ) return dataset_config