Skip to content

Commit f9c7368

Browse files
improve efficiency
1 parent 4b8c941 commit f9c7368

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/agentlab/utils/hinting.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,5 @@ def get_current_task_hints(self, task_name):
217217
return hints_df["hint"].tolist()
218218

219219
def get_current_goal_hints(self, goal_str: str):
220-
hints_df = self.hint_db[
221-
self.hint_db.apply(lambda x: goal_str in x.source_trace_goals, axis=1)
222-
]
223-
return hints_df["hint"].tolist()
220+
mask = self.hint_db["source_trace_goals"].apply(lambda goals: goal_str in goals)
221+
return self.hint_db.loc[mask, "hint"].tolist()

0 commit comments

Comments
 (0)