Skip to content
Snippets Groups Projects
Commit 5de931f0 authored by spmohanty's avatar spmohanty
Browse files

Add a check to ensure that visualizations are generated only if screenshots exist

parent ad9d154c
No related branches found
No related tags found
No related merge requests found
...@@ -146,7 +146,6 @@ class FlatlandRemoteEvaluationService: ...@@ -146,7 +146,6 @@ class FlatlandRemoteEvaluationService:
os.path.join(root, file) os.path.join(root, file)
) )
env_paths = sorted(env_paths) env_paths = sorted(env_paths)
print(self.video_generation_envs)
for _idx, env_path in enumerate(env_paths): for _idx, env_path in enumerate(env_paths):
""" """
Here we collect the indices of the environments for which Here we collect the indices of the environments for which
...@@ -157,7 +156,6 @@ class FlatlandRemoteEvaluationService: ...@@ -157,7 +156,6 @@ class FlatlandRemoteEvaluationService:
env_step env_step
""" """
for vg_env in self.video_generation_envs: for vg_env in self.video_generation_envs:
print(vg_env, env_path)
if vg_env in env_path: if vg_env in env_path:
self.video_generation_indices.append(_idx+1) self.video_generation_indices.append(_idx+1)
return sorted(env_paths) return sorted(env_paths)
...@@ -431,7 +429,7 @@ class FlatlandRemoteEvaluationService: ...@@ -431,7 +429,7 @@ class FlatlandRemoteEvaluationService:
mean_reward = np.mean(self.simulation_rewards) mean_reward = np.mean(self.simulation_rewards)
mean_percentage_complete = np.mean(self.simulation_percentage_complete) mean_percentage_complete = np.mean(self.simulation_percentage_complete)
if self.visualize: if self.visualize and len(os.listdir(self.vizualization_folder_name)) > 0:
# Generate the video # Generate the video
# #
# Note, if you had depdency issues due to ffmpeg, you can # Note, if you had depdency issues due to ffmpeg, you can
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment