def save_progress(self): executor = Executor(execution_path="summary", execution_timestamp=self.execution_timestamp) for i, game in enumerate(self.data): game_timestamp = self.game_timestamps[i] executor.new_game(game_timestamp) # Save screenshots screenshots = [] concatenated_screenshots = [] for step in game: screenshots.append((step['observation'], step['timestamp'])) #concatenated_screenshots.append((step['concatenated_observation'], step['timestamp'])) executor.add_screenshots(screenshots) #executor.add_screenshots(concatenated_screenshots, 'concat_screenshots') # Write data to CSV executor.write_csv(headers=self.game_data_headers, data=game, game_timestamp=game_timestamp)