Skip to content

Commit 0a3f71e

Browse files
recursixgasse
authored andcommitted
fix tests
1 parent e04fa19 commit 0a3f71e

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/agentlab/agents/dynamic_prompting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def _prompt(self) -> str:
385385
URL: {page_url}
386386
"""
387387
prompt_pieces.append(prompt_piece)
388-
return "\n".join(prompt_pieces)
388+
return "\n".join(prompt_pieces)
389389

390390

391391
class Observation(Shrinkable):

src/agentlab/experiments/study.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def get_report(self, ignore_cache=False, ignore_stale=False):
254254
return inspect_results.get_study_summary(
255255
self.dir, ignore_cache=ignore_cache, ignore_stale=ignore_stale
256256
)
257-
257+
258258
def override_max_steps(self, max_steps):
259259
for exp_args in self.exp_args_list:
260260
exp_args.env_args.max_steps = max_steps

tests/agents/test_generic_prompt.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,18 @@
3232
}
3333

3434
OBS_HISTORY = [
35-
base_obs | {
35+
base_obs
36+
| {
3637
"pruned_html": html_template.format(1),
3738
"last_action_error": "",
3839
},
39-
base_obs | {
40+
base_obs
41+
| {
4042
"pruned_html": html_template.format(2),
4143
"last_action_error": "Hey, this is an error in the past",
4244
},
43-
base_obs | {
45+
base_obs
46+
| {
4447
"pruned_html": html_template.format(3),
4548
"last_action_error": "Hey, there is an error now",
4649
},
@@ -102,7 +105,7 @@
102105
),
103106
(
104107
"obs.use_tabs",
105-
("Currently open tabs:","(active tab)"),
108+
("Currently open tabs:", "(active tab)"),
106109
),
107110
(
108111
"obs.use_focused_element",
@@ -165,7 +168,7 @@ def test_shrinking_observation():
165168
flags.obs.use_html = True
166169

167170
prompt_maker = MainPrompt(
168-
action_set=dp.HighLevelActionSet(),
171+
action_set=bgym.HighLevelActionSet(),
169172
obs_history=OBS_HISTORY,
170173
actions=ACTIONS,
171174
memories=MEMORIES,
@@ -231,7 +234,7 @@ def test_main_prompt_elements_present():
231234
# Initialize MainPrompt
232235
prompt = str(
233236
MainPrompt(
234-
action_set=dp.HighLevelActionSet(),
237+
action_set=bgym.HighLevelActionSet(),
235238
obs_history=OBS_HISTORY,
236239
actions=ACTIONS,
237240
memories=MEMORIES,
@@ -253,4 +256,3 @@ def test_main_prompt_elements_present():
253256
test_main_prompt_elements_present()
254257
# for flag, expected_prompts in FLAG_EXPECTED_PROMPT:
255258
# test_main_prompt_elements_gone_one_at_a_time(flag, expected_prompts)
256-

0 commit comments

Comments
 (0)