From fcf492525c6e015b0ec17afb4f40b74ab8bcad30 Mon Sep 17 00:00:00 2001 From: Aurelien Date: Thu, 19 May 2022 16:42:18 +0200 Subject: [PATCH 1/2] Added a getter and a setter for __metadata of DatasetItemEntity. Updated the tests as well. --- ote_sdk/ote_sdk/entities/dataset_item.py | 15 +++++++++++---- .../elements/test_primitive_parameters.py | 10 +++++----- .../tests/configuration/helper/test_create.py | 4 ++-- .../ote_sdk/tests/entities/test_dataset_item.py | 16 ++++++++-------- .../tests/entities/test_task_environment.py | 14 +++++++------- ote_sdk/ote_sdk/utils/dataset_utils.py | 4 ++-- 6 files changed, 35 insertions(+), 28 deletions(-) diff --git a/ote_sdk/ote_sdk/entities/dataset_item.py b/ote_sdk/ote_sdk/entities/dataset_item.py index a37b48c9dfe..97117d2e9b4 100644 --- a/ote_sdk/ote_sdk/entities/dataset_item.py +++ b/ote_sdk/ote_sdk/entities/dataset_item.py @@ -118,9 +118,16 @@ def __init__( set() if ignored_labels is None else set(ignored_labels) ) - @property - def metadata(self) -> Sequence[MetadataItemEntity]: - """Provides access to metadata.""" + def set_metadata(self, metadata: List[MetadataItemEntity]): + """ + Sets the metadata + """ + self.__metadata = metadata + + def get_metadata(self) -> List[MetadataItemEntity]: + """ + Returns the metadata + """ return self.__metadata @property @@ -486,6 +493,6 @@ def get_metadata_by_name_and_model( """ return [ meta - for meta in self.metadata + for meta in self.get_metadata() if meta.data.name == name and meta.model == model ] diff --git a/ote_sdk/ote_sdk/tests/configuration/elements/test_primitive_parameters.py b/ote_sdk/ote_sdk/tests/configuration/elements/test_primitive_parameters.py index 40990376dc7..825ff8b3daf 100644 --- a/ote_sdk/ote_sdk/tests/configuration/elements/test_primitive_parameters.py +++ b/ote_sdk/ote_sdk/tests/configuration/elements/test_primitive_parameters.py @@ -140,7 +140,7 @@ def check_configurable_integer( assert integer_instance._default == 100 assert integer_instance.type == int assert len(integer_instance._validator._validators) == 2 - assert integer_instance.metadata == expected_metadata + assert integer_instance.get_metadata() == expected_metadata # Checking _CountingAttr object returned by "configurable_integer" for default values of optional parameters default_value = 100 @@ -243,7 +243,7 @@ def check_configurable_float( assert isinstance(float_instance, _make._CountingAttr) assert float_instance._default == 100.1 assert float_instance.type == float - assert float_instance.metadata == expected_metadata + assert float_instance.get_metadata() == expected_metadata # Checking _CountingAttr object returned by "configurable_float" for default values of optional parameters default_value = 100.1 @@ -343,7 +343,7 @@ def check_configurable_boolean( boolean_instance._validator, validators._InstanceOfValidator # type: ignore ) assert boolean_instance._validator.type == bool - assert boolean_instance.metadata == expected_metadata + assert boolean_instance.get_metadata() == expected_metadata # Checking _CountingAttr object returned by "configurable_boolean" for default values of optional parameters default_value = True @@ -435,7 +435,7 @@ def check_float_selectable( assert isinstance(float_selectable_instance, _make._CountingAttr) assert float_selectable_instance._default assert float_selectable_instance.type == float - assert float_selectable_instance.metadata == expected_metadata + assert float_selectable_instance.get_metadata() == expected_metadata # Checking _CountingAttr object returned by "float_selectable" for default values of optional parameters default_value = 0.1 @@ -534,7 +534,7 @@ def check_selectable( assert isinstance(selectable_instance, _make._CountingAttr) assert selectable_instance._default == SomeEnumSelectable.OPTION_C assert selectable_instance.type == ConfigurableEnum - assert selectable_instance.metadata == expected_metadata + assert selectable_instance.get_metadata() == expected_metadata # Checking _CountingAttr object returned by "selectable" for default values of optional parameters default_value = SomeEnumSelectable.OPTION_C diff --git a/ote_sdk/ote_sdk/tests/configuration/helper/test_create.py b/ote_sdk/ote_sdk/tests/configuration/helper/test_create.py index 7ed4d99415c..791b2a9fca7 100644 --- a/ote_sdk/ote_sdk/tests/configuration/helper/test_create.py +++ b/ote_sdk/ote_sdk/tests/configuration/helper/test_create.py @@ -479,7 +479,7 @@ def test_gather_parameter_arguments_and_values_from_dict(self): ) assert isinstance(argument, _make._CountingAttr) assert argument.type == int - metadata = argument.metadata + metadata = argument.get_metadata() assert metadata.get("default_value") == 70 assert metadata.get("description") == "Default integer description" assert metadata.get("header") == "non selectable parameter header" @@ -492,7 +492,7 @@ def test_gather_parameter_arguments_and_values_from_dict(self): argument = arguments_and_values_dict.get("make_arguments").get("selectable") assert isinstance(argument, _make._CountingAttr) assert argument.type == ConfigurableEnum - metadata = argument.metadata + metadata = argument.get_metadata() assert type(metadata.get("default_value")).__name__ == "test enum" assert metadata.get("default_value").name == "test_2" assert metadata.get("default_value").value == 2 diff --git a/ote_sdk/ote_sdk/tests/entities/test_dataset_item.py b/ote_sdk/ote_sdk/tests/entities/test_dataset_item.py index 71fd3ed1053..ea5fc69ffd7 100644 --- a/ote_sdk/ote_sdk/tests/entities/test_dataset_item.py +++ b/ote_sdk/ote_sdk/tests/entities/test_dataset_item.py @@ -254,12 +254,12 @@ def test_dataset_item_initialization(self): default_values_dataset_item = DatasetItemEntity(media, annotations_scene) assert default_values_dataset_item.media == media assert default_values_dataset_item.annotation_scene == annotations_scene - assert not default_values_dataset_item.metadata + assert not default_values_dataset_item.get_metadata() assert default_values_dataset_item.subset == Subset.NONE assert default_values_dataset_item.ignored_labels == set() # Checking attributes of DatasetItemEntity object initialized with specified optional parameters roi = DatasetItemParameters().roi() - metadata = DatasetItemParameters.metadata() + metadata = DatasetItemParameters.get_metadata() subset = Subset.TESTING ignored_labels = set(DatasetItemParameters().labels()) specified_values_dataset_item = DatasetItemEntity( @@ -268,7 +268,7 @@ def test_dataset_item_initialization(self): assert specified_values_dataset_item.media == media assert specified_values_dataset_item.annotation_scene == annotations_scene assert specified_values_dataset_item.roi == roi - assert specified_values_dataset_item.metadata == metadata + assert specified_values_dataset_item.get_metadata() == metadata assert specified_values_dataset_item.subset == subset assert specified_values_dataset_item.ignored_labels == ignored_labels @@ -923,7 +923,7 @@ def test_dataset_item_deepcopy(self): dataset_item.annotation_scene.shapes == copy_dataset.annotation_scene.shapes ) assert dataset_item.roi == copy_dataset.roi - assert dataset_item.metadata == copy_dataset.metadata + assert dataset_item.get_metadata() == copy_dataset.get_metadata() assert dataset_item.subset == copy_dataset.subset @pytest.mark.priority_medium @@ -946,7 +946,7 @@ def test_dataset_item_append_metadata_item(self): 2. Check "metadata" attribute after "append_metadata_item" method with specified "model" parameter """ dataset_item = DatasetItemParameters().dataset_item() - expected_metadata = list(dataset_item.metadata) + expected_metadata = list(dataset_item.get_metadata()) # Checking metadata attribute returned after "append_metadata_item" method with non-specified "model" parameter data_to_append = TensorEntity( name="appended_metadata", @@ -954,7 +954,7 @@ def test_dataset_item_append_metadata_item(self): ) expected_metadata.append(MetadataItemEntity(data=data_to_append)) dataset_item.append_metadata_item(data=data_to_append) - assert list(dataset_item.metadata) == expected_metadata + assert list(dataset_item.get_metadata()) == expected_metadata # Checking metadata attribute returned after "append_metadata_item" method with specified "model" parameter metadata_item_with_model = self.metadata_item_with_model() data_to_append = metadata_item_with_model.data @@ -964,7 +964,7 @@ def test_dataset_item_append_metadata_item(self): ) expected_metadata.append(new_metadata_item_with_model) dataset_item.append_metadata_item(data_to_append, model_to_append) - assert list(dataset_item.metadata) == expected_metadata + assert list(dataset_item.get_metadata()) == expected_metadata @pytest.mark.priority_medium @pytest.mark.unit @@ -992,7 +992,7 @@ def test_dataset_item_get_metadata_by_name_and_model(self): metadata_item_with_model = self.metadata_item_with_model() dataset_model = metadata_item_with_model.model dataset_item.append_metadata_item(metadata_item_with_model.data, dataset_model) - dataset_metadata = list(dataset_item.metadata) + dataset_metadata = list(dataset_item.get_metadata()) # Checking "get_metadata_by_name_and_model" method for "model" parameter is "None" assert dataset_item.get_metadata_by_name_and_model("test_metadata", None) == [ dataset_metadata[0] diff --git a/ote_sdk/ote_sdk/tests/entities/test_task_environment.py b/ote_sdk/ote_sdk/tests/entities/test_task_environment.py index 27a1b69d76e..a42c7564587 100644 --- a/ote_sdk/ote_sdk/tests/entities/test_task_environment.py +++ b/ote_sdk/ote_sdk/tests/entities/test_task_environment.py @@ -165,7 +165,7 @@ def test_compare_learning_parameters_num_workers(self): env.get_hyper_parameters().learning_parameters.num_workers ) # "default_value" config_example_learning_parameters_num_workers = ( - config_example.learning_parameters._default.factory.num_workers.metadata[ + config_example.learning_parameters._default.factory.num_workers.get_metadata()[ "default_value" ] ) @@ -199,7 +199,7 @@ def test_compare_learning_parameters_batch_size(self): env.get_hyper_parameters().learning_parameters.batch_size ) # "default_value" config_example_learning_parameters_batch_size = ( - config_example.learning_parameters._default.factory.batch_size.metadata[ + config_example.learning_parameters._default.factory.batch_size.get_metadata()[ "default_value" ] ) @@ -234,7 +234,7 @@ def test_compare_learning_parameters_num_iters(self): env.get_hyper_parameters().learning_parameters.num_iters ) # "default_value" config_example_learning_parameters_num_iters = ( - config_example.learning_parameters._default.factory.num_iters.metadata[ + config_example.learning_parameters._default.factory.num_iters.get_metadata()[ "default_value" ] ) @@ -269,7 +269,7 @@ def test_compare_learning_parameters_learning_rate(self): env.get_hyper_parameters().learning_parameters.learning_rate ) # "default_value" config_example_learning_parameters_learning_rate = ( - config_example.learning_parameters._default.factory.learning_rate.metadata[ + config_example.learning_parameters._default.factory.learning_rate.get_metadata()[ "default_value" ] ) @@ -313,7 +313,7 @@ def test_compare_learning_parameters_num_checkpoints(self): # Attempt to access the missing parameter in ConfigExample with pytest.raises(AttributeError): # AttributeError: type object '__LearningParameters' has no attribute 'num_checkpoints' - config_example.learning_parameters._default.factory.num_checkpoints.metadata[ + config_example.learning_parameters._default.factory.num_checkpoints.get_metadata()[ "default_value" ] @@ -368,7 +368,7 @@ def test_compare_postprocessing_confidence_threshold(self): ) cep = config_example.postprocessing config_example_postprocessing_confidence_threshold = ( - cep._default.factory.confidence_threshold.metadata["default_value"] + cep._default.factory.confidence_threshold.get_metadata()["default_value"] ) # From dummy_config.yaml because it is missing in dummy_template.yaml "parameter_overrides" @@ -404,7 +404,7 @@ def test_compare_postprocessing_result_based_confidence_threshold(self): cep = config_example.postprocessing def_factory = cep._default.factory rbct = def_factory.result_based_confidence_threshold - config_example_postprocessing_result_based_confidence_threshold = rbct.metadata[ + config_example_postprocessing_result_based_confidence_threshold = rbct.get_metadata()[ "default_value" ] diff --git a/ote_sdk/ote_sdk/utils/dataset_utils.py b/ote_sdk/ote_sdk/utils/dataset_utils.py index ae46412c061..02c5e09a86b 100644 --- a/ote_sdk/ote_sdk/utils/dataset_utils.py +++ b/ote_sdk/ote_sdk/utils/dataset_utils.py @@ -91,7 +91,7 @@ def get_local_subset( local_annotations, kind=item.annotation_scene.kind, ), - metadata=item.metadata, + metadata=item.get_metadata(), subset=item.subset, roi=item.roi, ignored_labels=item.ignored_labels, @@ -120,7 +120,7 @@ def get_global_subset(dataset: DatasetEntity) -> DatasetEntity: annotation_scene=AnnotationSceneEntity( global_annotations, kind=item.annotation_scene.kind ), - metadata=item.metadata, + metadata=item.get_metadata(), subset=item.subset, roi=item.roi, ignored_labels=item.ignored_labels, From cf33dcb01cf0721c52fa3443cf0514e399d3b783 Mon Sep 17 00:00:00 2001 From: Aurelien Date: Mon, 23 May 2022 10:20:33 +0200 Subject: [PATCH 2/2] Corrected the usage of .metadata or .get_metadata() in certain tests. In test_metadata.py I have updated the assertion to "typing.Optional[str]". --- ote_sdk/ote_sdk/entities/dataset_item.py | 8 ++++---- .../elements/test_primitive_parameters.py | 10 +++++----- .../tests/configuration/helper/test_create.py | 4 ++-- .../ote_sdk/tests/entities/test_dataset_item.py | 10 +++++----- ote_sdk/ote_sdk/tests/entities/test_metadata.py | 2 +- .../tests/entities/test_task_environment.py | 14 +++++++------- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ote_sdk/ote_sdk/entities/dataset_item.py b/ote_sdk/ote_sdk/entities/dataset_item.py index 97117d2e9b4..d467b67454c 100644 --- a/ote_sdk/ote_sdk/entities/dataset_item.py +++ b/ote_sdk/ote_sdk/entities/dataset_item.py @@ -110,21 +110,21 @@ def __init__( break self.__roi = roi - self.__metadata: List[MetadataItemEntity] = [] + self.__metadata: Sequence[MetadataItemEntity] = [] if metadata is not None: - self.__metadata = list(metadata) + self.__metadata = metadata self.__ignored_labels: Set[LabelEntity] = ( set() if ignored_labels is None else set(ignored_labels) ) - def set_metadata(self, metadata: List[MetadataItemEntity]): + def set_metadata(self, metadata: Sequence[MetadataItemEntity]): """ Sets the metadata """ self.__metadata = metadata - def get_metadata(self) -> List[MetadataItemEntity]: + def get_metadata(self) -> Sequence[MetadataItemEntity]: """ Returns the metadata """ diff --git a/ote_sdk/ote_sdk/tests/configuration/elements/test_primitive_parameters.py b/ote_sdk/ote_sdk/tests/configuration/elements/test_primitive_parameters.py index 825ff8b3daf..40990376dc7 100644 --- a/ote_sdk/ote_sdk/tests/configuration/elements/test_primitive_parameters.py +++ b/ote_sdk/ote_sdk/tests/configuration/elements/test_primitive_parameters.py @@ -140,7 +140,7 @@ def check_configurable_integer( assert integer_instance._default == 100 assert integer_instance.type == int assert len(integer_instance._validator._validators) == 2 - assert integer_instance.get_metadata() == expected_metadata + assert integer_instance.metadata == expected_metadata # Checking _CountingAttr object returned by "configurable_integer" for default values of optional parameters default_value = 100 @@ -243,7 +243,7 @@ def check_configurable_float( assert isinstance(float_instance, _make._CountingAttr) assert float_instance._default == 100.1 assert float_instance.type == float - assert float_instance.get_metadata() == expected_metadata + assert float_instance.metadata == expected_metadata # Checking _CountingAttr object returned by "configurable_float" for default values of optional parameters default_value = 100.1 @@ -343,7 +343,7 @@ def check_configurable_boolean( boolean_instance._validator, validators._InstanceOfValidator # type: ignore ) assert boolean_instance._validator.type == bool - assert boolean_instance.get_metadata() == expected_metadata + assert boolean_instance.metadata == expected_metadata # Checking _CountingAttr object returned by "configurable_boolean" for default values of optional parameters default_value = True @@ -435,7 +435,7 @@ def check_float_selectable( assert isinstance(float_selectable_instance, _make._CountingAttr) assert float_selectable_instance._default assert float_selectable_instance.type == float - assert float_selectable_instance.get_metadata() == expected_metadata + assert float_selectable_instance.metadata == expected_metadata # Checking _CountingAttr object returned by "float_selectable" for default values of optional parameters default_value = 0.1 @@ -534,7 +534,7 @@ def check_selectable( assert isinstance(selectable_instance, _make._CountingAttr) assert selectable_instance._default == SomeEnumSelectable.OPTION_C assert selectable_instance.type == ConfigurableEnum - assert selectable_instance.get_metadata() == expected_metadata + assert selectable_instance.metadata == expected_metadata # Checking _CountingAttr object returned by "selectable" for default values of optional parameters default_value = SomeEnumSelectable.OPTION_C diff --git a/ote_sdk/ote_sdk/tests/configuration/helper/test_create.py b/ote_sdk/ote_sdk/tests/configuration/helper/test_create.py index 791b2a9fca7..7ed4d99415c 100644 --- a/ote_sdk/ote_sdk/tests/configuration/helper/test_create.py +++ b/ote_sdk/ote_sdk/tests/configuration/helper/test_create.py @@ -479,7 +479,7 @@ def test_gather_parameter_arguments_and_values_from_dict(self): ) assert isinstance(argument, _make._CountingAttr) assert argument.type == int - metadata = argument.get_metadata() + metadata = argument.metadata assert metadata.get("default_value") == 70 assert metadata.get("description") == "Default integer description" assert metadata.get("header") == "non selectable parameter header" @@ -492,7 +492,7 @@ def test_gather_parameter_arguments_and_values_from_dict(self): argument = arguments_and_values_dict.get("make_arguments").get("selectable") assert isinstance(argument, _make._CountingAttr) assert argument.type == ConfigurableEnum - metadata = argument.get_metadata() + metadata = argument.metadata assert type(metadata.get("default_value")).__name__ == "test enum" assert metadata.get("default_value").name == "test_2" assert metadata.get("default_value").value == 2 diff --git a/ote_sdk/ote_sdk/tests/entities/test_dataset_item.py b/ote_sdk/ote_sdk/tests/entities/test_dataset_item.py index ea5fc69ffd7..3cda1537dc9 100644 --- a/ote_sdk/ote_sdk/tests/entities/test_dataset_item.py +++ b/ote_sdk/ote_sdk/tests/entities/test_dataset_item.py @@ -259,7 +259,7 @@ def test_dataset_item_initialization(self): assert default_values_dataset_item.ignored_labels == set() # Checking attributes of DatasetItemEntity object initialized with specified optional parameters roi = DatasetItemParameters().roi() - metadata = DatasetItemParameters.get_metadata() + metadata = DatasetItemParameters.metadata subset = Subset.TESTING ignored_labels = set(DatasetItemParameters().labels()) specified_values_dataset_item = DatasetItemEntity( @@ -946,7 +946,7 @@ def test_dataset_item_append_metadata_item(self): 2. Check "metadata" attribute after "append_metadata_item" method with specified "model" parameter """ dataset_item = DatasetItemParameters().dataset_item() - expected_metadata = list(dataset_item.get_metadata()) + expected_metadata = dataset_item.get_metadata() # Checking metadata attribute returned after "append_metadata_item" method with non-specified "model" parameter data_to_append = TensorEntity( name="appended_metadata", @@ -954,7 +954,7 @@ def test_dataset_item_append_metadata_item(self): ) expected_metadata.append(MetadataItemEntity(data=data_to_append)) dataset_item.append_metadata_item(data=data_to_append) - assert list(dataset_item.get_metadata()) == expected_metadata + assert dataset_item.get_metadata() == expected_metadata # Checking metadata attribute returned after "append_metadata_item" method with specified "model" parameter metadata_item_with_model = self.metadata_item_with_model() data_to_append = metadata_item_with_model.data @@ -964,7 +964,7 @@ def test_dataset_item_append_metadata_item(self): ) expected_metadata.append(new_metadata_item_with_model) dataset_item.append_metadata_item(data_to_append, model_to_append) - assert list(dataset_item.get_metadata()) == expected_metadata + assert dataset_item.get_metadata() == expected_metadata @pytest.mark.priority_medium @pytest.mark.unit @@ -992,7 +992,7 @@ def test_dataset_item_get_metadata_by_name_and_model(self): metadata_item_with_model = self.metadata_item_with_model() dataset_model = metadata_item_with_model.model dataset_item.append_metadata_item(metadata_item_with_model.data, dataset_model) - dataset_metadata = list(dataset_item.get_metadata()) + dataset_metadata = dataset_item.get_metadata() # Checking "get_metadata_by_name_and_model" method for "model" parameter is "None" assert dataset_item.get_metadata_by_name_and_model("test_metadata", None) == [ dataset_metadata[0] diff --git a/ote_sdk/ote_sdk/tests/entities/test_metadata.py b/ote_sdk/ote_sdk/tests/entities/test_metadata.py index eab01832ac9..9411b5f1a85 100644 --- a/ote_sdk/ote_sdk/tests/entities/test_metadata.py +++ b/ote_sdk/ote_sdk/tests/entities/test_metadata.py @@ -56,7 +56,7 @@ def test_imetadata(self): test_instance = IMetadata() assert isinstance(test_instance, IMetadata) - assert str(test_instance.name) == "typing.Union[str, NoneType]" + assert str(test_instance.name) == "typing.Optional[str]" test_instance.name = "String" assert test_instance.name == "String" diff --git a/ote_sdk/ote_sdk/tests/entities/test_task_environment.py b/ote_sdk/ote_sdk/tests/entities/test_task_environment.py index a42c7564587..27a1b69d76e 100644 --- a/ote_sdk/ote_sdk/tests/entities/test_task_environment.py +++ b/ote_sdk/ote_sdk/tests/entities/test_task_environment.py @@ -165,7 +165,7 @@ def test_compare_learning_parameters_num_workers(self): env.get_hyper_parameters().learning_parameters.num_workers ) # "default_value" config_example_learning_parameters_num_workers = ( - config_example.learning_parameters._default.factory.num_workers.get_metadata()[ + config_example.learning_parameters._default.factory.num_workers.metadata[ "default_value" ] ) @@ -199,7 +199,7 @@ def test_compare_learning_parameters_batch_size(self): env.get_hyper_parameters().learning_parameters.batch_size ) # "default_value" config_example_learning_parameters_batch_size = ( - config_example.learning_parameters._default.factory.batch_size.get_metadata()[ + config_example.learning_parameters._default.factory.batch_size.metadata[ "default_value" ] ) @@ -234,7 +234,7 @@ def test_compare_learning_parameters_num_iters(self): env.get_hyper_parameters().learning_parameters.num_iters ) # "default_value" config_example_learning_parameters_num_iters = ( - config_example.learning_parameters._default.factory.num_iters.get_metadata()[ + config_example.learning_parameters._default.factory.num_iters.metadata[ "default_value" ] ) @@ -269,7 +269,7 @@ def test_compare_learning_parameters_learning_rate(self): env.get_hyper_parameters().learning_parameters.learning_rate ) # "default_value" config_example_learning_parameters_learning_rate = ( - config_example.learning_parameters._default.factory.learning_rate.get_metadata()[ + config_example.learning_parameters._default.factory.learning_rate.metadata[ "default_value" ] ) @@ -313,7 +313,7 @@ def test_compare_learning_parameters_num_checkpoints(self): # Attempt to access the missing parameter in ConfigExample with pytest.raises(AttributeError): # AttributeError: type object '__LearningParameters' has no attribute 'num_checkpoints' - config_example.learning_parameters._default.factory.num_checkpoints.get_metadata()[ + config_example.learning_parameters._default.factory.num_checkpoints.metadata[ "default_value" ] @@ -368,7 +368,7 @@ def test_compare_postprocessing_confidence_threshold(self): ) cep = config_example.postprocessing config_example_postprocessing_confidence_threshold = ( - cep._default.factory.confidence_threshold.get_metadata()["default_value"] + cep._default.factory.confidence_threshold.metadata["default_value"] ) # From dummy_config.yaml because it is missing in dummy_template.yaml "parameter_overrides" @@ -404,7 +404,7 @@ def test_compare_postprocessing_result_based_confidence_threshold(self): cep = config_example.postprocessing def_factory = cep._default.factory rbct = def_factory.result_based_confidence_threshold - config_example_postprocessing_result_based_confidence_threshold = rbct.get_metadata()[ + config_example_postprocessing_result_based_confidence_threshold = rbct.metadata[ "default_value" ]