MCPcopy Create free account
hub / github.com/OpenBMB/AgentCPM-GUI / _split_to_steps_

Method _split_to_steps_

eval/run_eval_agent.py:73–86  ·  view source on GitHub ↗
(self, episode_data)

Source from the content-addressed store, hash-verified

71 return ep_data
72
73 def _split_to_steps_(self, episode_data):
74 data = []
75 for edx, episode in enumerate(episode_data):
76 for idx, step in enumerate(episode):
77 try:
78 if step.get('subset') is None:
79 step['subset'] = step['image_path'].split('/')[0]
80 step['image_full_path'] = os.path.join(self.data_dir, step['image_path'])
81 data.append(step)
82 except KeyError as e:
83 logging.error(f"Missing key {e}, at episode {edx}, step {idx}")
84 except Exception as e:
85 logging.error(f"Error processing episode {edx}, step {idx}: {e}")
86 return data
87
88 def __len__(self):
89 return len(self.data)

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected