File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1414from IPython .display import display
1515from tqdm import tqdm
1616
17- from agentlab .experiments .exp_utils import RESULTS_DIR
18-
1917# TODO find a more portable way to code set_task_category_as_index at least
2018# handle dynamic imports. We don't want to always import workarena
2119# from browsergym.workarena import TASK_CATEGORY_MAP
Original file line number Diff line number Diff line change 66from pathlib import Path
77from time import sleep , time
88
9- from browsergym .experiments .loop import ExpArgs , _move_old_exp , yield_all_exp_results
9+ from browsergym .experiments .loop import ExpArgs , yield_all_exp_results
1010from tqdm import tqdm
1111
1212logger = logging .getLogger (__name__ ) # Get logger based on module name
Original file line number Diff line number Diff line change @@ -126,9 +126,13 @@ def retry_multiple(
126126 """
127127 tries = 0
128128 while tries < n_retry :
129- answer_list = chat (messages , num_samples = num_samples )
129+ answer_list = chat (messages , n_samples = num_samples )
130130 # TODO: could we change this to not use inplace modifications ?
131- messages .append (answer )
131+ if not isinstance (answer_list , list ):
132+ answer_list = [answer_list ]
133+
134+ # TODO taking the 1st hides the other generated answers in AgentXRay
135+ messages .append (answer_list [0 ])
132136 parsed_answers = []
133137 errors = []
134138 for answer in answer_list :
You can’t perform that action at this time.
0 commit comments