Skip to content

Commit

Permalink
MCS-1983 Minor updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasSchellenbergNextCentury committed Dec 14, 2023
1 parent c41191b commit 26432f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webenabled/mcs_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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):
Expand Down

0 comments on commit 26432f0

Please sign in to comment.