From 8a27cf6f69fe95b1cd8ac760f04fc9fe58546e9e Mon Sep 17 00:00:00 2001 From: George Pantazopoulos Date: Mon, 6 Feb 2023 17:50:51 +0000 Subject: [PATCH] fix: negative candidate ids (#696) --- src/emma_policy/datamodules/simbot_action_dataset.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/emma_policy/datamodules/simbot_action_dataset.py b/src/emma_policy/datamodules/simbot_action_dataset.py index b91bced..588420b 100644 --- a/src/emma_policy/datamodules/simbot_action_dataset.py +++ b/src/emma_policy/datamodules/simbot_action_dataset.py @@ -6,6 +6,7 @@ from emma_datasets.constants.simbot.simbot import get_arena_definitions from emma_datasets.datamodels.datasets.utils.simbot_utils.instruction_processing import ( get_object_label_from_object_id, + get_object_readable_name_from_object_id, ) from emma_datasets.datamodels.datasets.utils.simbot_utils.paraphrasers import ( InstructionParaphraser, @@ -197,10 +198,12 @@ def simbot_vision_augmentation( # noqa: WPS210, WPS231 ) source_text = format_instruction(source_text) - object_name = get_object_label_from_object_id( + object_name = get_object_readable_name_from_object_id( object_id=action_object_metadata["id"][object_candidate_idx], object_assets_to_names=self._object_assets_to_names, + special_name_cases=self._special_name_cases, ) + object_token = None # We need to skip the instances that are from annotations aka paraphrasable