File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 5858 - name : Check MiniWob availability
5959 run : curl -I "http://localhost:8080/miniwob/" || echo "MiniWob not reachable"
6060
61+ - name : Pre-download nltk ressources
62+ run : python -c "import nltk; nltk.download('punkt_tab')"
63+
6164 - name : Run AgentLab Unit Tests
6265 env :
6366 MINIWOB_URL : " http://localhost:8080/miniwob/"
Original file line number Diff line number Diff line change @@ -105,13 +105,19 @@ def expand_cross_product(obj: Any | list[Any]):
105105 for obj in obj_list :
106106 cprod_paths = _find_cprod_with_paths (obj )
107107 if not cprod_paths :
108- return [copy .deepcopy (obj )]
108+ result .append (copy .deepcopy (obj ))
109+ continue
109110
110111 paths , cprod_objects = zip (* cprod_paths )
111112 combinations = product (* [cprod_obj .elements for cprod_obj in cprod_objects ])
112113
114+ # create a base object with empty fields to make fast deep copies from
115+ base_obj = copy .deepcopy (obj )
116+ for path in paths :
117+ _set_value (base_obj , path , None )
118+
113119 for combo in combinations :
114- new_obj = copy .deepcopy (obj )
120+ new_obj = copy .deepcopy (base_obj )
115121 for path , value in zip (paths , combo ):
116122 _set_value (new_obj , path , value )
117123 result .append (new_obj )
You can’t perform that action at this time.
0 commit comments