From 26432f01c0ff0544225b37f62badef71803195a3 Mon Sep 17 00:00:00 2001 From: Thomas Schellenberg Date: Thu, 14 Dec 2023 09:26:54 -0500 Subject: [PATCH] MCS-1983 Minor updates. --- webenabled/mcs_interface.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webenabled/mcs_interface.py b/webenabled/mcs_interface.py index ed2e2f76..e8840564 100644 --- a/webenabled/mcs_interface.py +++ b/webenabled/mcs_interface.py @@ -372,8 +372,10 @@ def get_task_desc(self, scene_filename): f"Attempt to get task description based" f"on scene_filename: {scene_filename}") scene_type = scene_filename.split('/')[-1].split('0')[0][:-1].upper() + # Remove "eval_7_" from the scene name if it's present. + scene_type = scene_type.replace('eval_7_', '') # Rename passive_agents to passive_agent for simplicity, because I'm - # apparently inconsistent with our naming conventions (sorry) + # apparently inconsistent with our naming conventions (sorry). scene_type = scene_type.replace('passive_agents_', 'passive_agent_') for description in TaskDescription: @@ -382,7 +384,7 @@ def get_task_desc(self, scene_filename): f"Scene type identified: {description.name}") return description.value - self.logger.warn("Scene type not found, returning 'N/A'") + self.logger.warn(f"Scene type {scene_type} not found, returning 'N/A'") return "N/A" def get_controller_pid(self):