weco 0.2.14__py3-none-any.whl → 0.2.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- weco/__init__.py +1 -1
- weco/cli.py +7 -9
- {weco-0.2.14.dist-info → weco-0.2.15.dist-info}/METADATA +1 -1
- weco-0.2.15.dist-info/RECORD +12 -0
- {weco-0.2.14.dist-info → weco-0.2.15.dist-info}/WHEEL +1 -1
- weco-0.2.14.dist-info/RECORD +0 -12
- {weco-0.2.14.dist-info → weco-0.2.15.dist-info}/entry_points.txt +0 -0
- {weco-0.2.14.dist-info → weco-0.2.15.dist-info}/licenses/LICENSE +0 -0
- {weco-0.2.14.dist-info → weco-0.2.15.dist-info}/top_level.txt +0 -0
weco/__init__.py
CHANGED
weco/cli.py
CHANGED
|
@@ -265,14 +265,14 @@ def main() -> None:
|
|
|
265
265
|
"debug_prob": 0.5,
|
|
266
266
|
"max_debug_depth": max(1, math.ceil(0.1 * steps)),
|
|
267
267
|
}
|
|
268
|
+
# API request timeout
|
|
269
|
+
timeout = 800
|
|
268
270
|
# Read additional instructions
|
|
269
271
|
additional_instructions = read_additional_instructions(additional_instructions=args.additional_instructions)
|
|
270
272
|
# Read source code path
|
|
271
273
|
source_fp = pathlib.Path(args.source)
|
|
272
274
|
# Read source code content
|
|
273
275
|
source_code = read_from_path(fp=source_fp, is_json=False)
|
|
274
|
-
# API request timeout
|
|
275
|
-
timeout = 800
|
|
276
276
|
|
|
277
277
|
# --- Panel Initialization ---
|
|
278
278
|
summary_panel = SummaryPanel(
|
|
@@ -310,9 +310,8 @@ def main() -> None:
|
|
|
310
310
|
runs_dir = pathlib.Path(args.log_dir) / session_id
|
|
311
311
|
runs_dir.mkdir(parents=True, exist_ok=True)
|
|
312
312
|
|
|
313
|
-
#
|
|
314
|
-
|
|
315
|
-
write_to_path(fp=runs_copy_source_fp, content=source_code)
|
|
313
|
+
# Write the initial code string to the logs
|
|
314
|
+
write_to_path(fp=runs_dir / f"step_0{source_fp.suffix}", content=session_response["code"])
|
|
316
315
|
|
|
317
316
|
# Write the initial code string to the source file path (if not preserving)
|
|
318
317
|
if not args.preserve_source:
|
|
@@ -380,7 +379,8 @@ def main() -> None:
|
|
|
380
379
|
transition_delay=0.1,
|
|
381
380
|
)
|
|
382
381
|
|
|
383
|
-
|
|
382
|
+
# Starting from step 1 to steps (inclusive) because the baseline solution is step 0, so we want to optimize for steps worth of steps
|
|
383
|
+
for step in range(1, steps + 1):
|
|
384
384
|
# Re-read instructions from the original source (file path or string) BEFORE each suggest call
|
|
385
385
|
current_additional_instructions = read_additional_instructions(
|
|
386
386
|
additional_instructions=args.additional_instructions
|
|
@@ -553,9 +553,7 @@ def main() -> None:
|
|
|
553
553
|
best_solution_score = None
|
|
554
554
|
|
|
555
555
|
if best_solution_code is None or best_solution_score is None:
|
|
556
|
-
best_solution_content = (
|
|
557
|
-
f"# Weco could not find a better solution\n\n{read_from_path(fp=runs_copy_source_fp, is_json=False)}"
|
|
558
|
-
)
|
|
556
|
+
best_solution_content = f"# Weco could not find a better solution\n\n{read_from_path(fp=runs_dir / f'step_0{source_fp.suffix}', is_json=False)}"
|
|
559
557
|
else:
|
|
560
558
|
# Format score for the comment
|
|
561
559
|
best_score_str = (
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
weco/__init__.py,sha256=2P-Z80aRiNeL8hyXD4ExZxizUgLb_Tj_NOydwoqTZ_k,426
|
|
2
|
+
weco/api.py,sha256=z2DCe0kQJaaBHo-Vml52GRc9nwQBnrKATXoY3UfPojw,3842
|
|
3
|
+
weco/auth.py,sha256=IPfiLthcNRkPyM8pWHTyDLvikw83sigacpY1PmeA03Y,2343
|
|
4
|
+
weco/cli.py,sha256=rcntl-hFQorCNSBX1yaNoL-4eBJFSkN5Vo35b6-W4UU,28993
|
|
5
|
+
weco/panels.py,sha256=gB4rZbCvqzewUCBcILvyyU4fnOQLwFgHCGmtn-ZlgSo,13385
|
|
6
|
+
weco/utils.py,sha256=hhIebUPnetFMfNSFfcsKVw1TSpeu_Zw3rBPPnxDie0U,3911
|
|
7
|
+
weco-0.2.15.dist-info/licenses/LICENSE,sha256=p_GQqJBvuZgkLNboYKyH-5dhpTDlKs2wq2TVM55WrWE,1065
|
|
8
|
+
weco-0.2.15.dist-info/METADATA,sha256=B97o-KOP1o2sUVHqSz1maZGy-iysBKBbvq16QIyVE68,10851
|
|
9
|
+
weco-0.2.15.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
10
|
+
weco-0.2.15.dist-info/entry_points.txt,sha256=ixJ2uClALbCpBvnIR6BXMNck8SHAab8eVkM9pIUowcs,39
|
|
11
|
+
weco-0.2.15.dist-info/top_level.txt,sha256=F0N7v6e2zBSlsorFv-arAq2yDxQbzX3KVO8GxYhPUeE,5
|
|
12
|
+
weco-0.2.15.dist-info/RECORD,,
|
weco-0.2.14.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
weco/__init__.py,sha256=q4zeQ8CJq8NJyRcBMmST6zCzmK_HjNSFChrNBzJ9oks,426
|
|
2
|
-
weco/api.py,sha256=z2DCe0kQJaaBHo-Vml52GRc9nwQBnrKATXoY3UfPojw,3842
|
|
3
|
-
weco/auth.py,sha256=IPfiLthcNRkPyM8pWHTyDLvikw83sigacpY1PmeA03Y,2343
|
|
4
|
-
weco/cli.py,sha256=7pGJiyoBO7n6Xocwusx9iVqsaPj8OuPaJ1A2ks83Ekw,28961
|
|
5
|
-
weco/panels.py,sha256=gB4rZbCvqzewUCBcILvyyU4fnOQLwFgHCGmtn-ZlgSo,13385
|
|
6
|
-
weco/utils.py,sha256=hhIebUPnetFMfNSFfcsKVw1TSpeu_Zw3rBPPnxDie0U,3911
|
|
7
|
-
weco-0.2.14.dist-info/licenses/LICENSE,sha256=p_GQqJBvuZgkLNboYKyH-5dhpTDlKs2wq2TVM55WrWE,1065
|
|
8
|
-
weco-0.2.14.dist-info/METADATA,sha256=855avaVBC-wUyFDWIvITw0t4o_v4s90Us-t_3lQnPGw,10851
|
|
9
|
-
weco-0.2.14.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
|
10
|
-
weco-0.2.14.dist-info/entry_points.txt,sha256=ixJ2uClALbCpBvnIR6BXMNck8SHAab8eVkM9pIUowcs,39
|
|
11
|
-
weco-0.2.14.dist-info/top_level.txt,sha256=F0N7v6e2zBSlsorFv-arAq2yDxQbzX3KVO8GxYhPUeE,5
|
|
12
|
-
weco-0.2.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|