We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f000d62 commit b5b8254Copy full SHA for b5b8254
src/agentlab/analyze/agent_xray.py
@@ -103,7 +103,16 @@ def update_exp_result(self, episode_id: EpisodeId):
103
104
# find unique row using idx
105
result_df = self.agent_df.reset_index(inplace=False)
106
- exp_dir = result_df.iloc[episode_id.row_index]["exp_dir"]
+ sub_df = result_df[result_df["_row_index"] == episode_id.row_index]
107
+ if len(sub_df) == 0:
108
+ self.exp_result = None
109
+ raise ValueError(f"Could not find _row_index: {episode_id.row_index}")
110
+
111
+ if len(sub_df) > 1:
112
+ warning(
113
+ f"Found multiple rows with same row_index {episode_id.row_index} Using the first one."
114
+ )
115
+ exp_dir = sub_df.iloc[0]["exp_dir"]
116
print(exp_dir)
117
self.exp_result = ExpResult(exp_dir)
118
self.step = 0
0 commit comments