weco 0.2.16__py3-none-any.whl → 0.2.17__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 CHANGED
@@ -1,7 +1,7 @@
1
1
  import os
2
2
 
3
3
  # DO NOT EDIT
4
- __pkg_version__ = "0.2.16"
4
+ __pkg_version__ = "0.2.17"
5
5
  __api_version__ = "v1"
6
6
 
7
7
  __base_url__ = f"https://api.weco.ai/{__api_version__}"
weco/cli.py CHANGED
@@ -194,11 +194,6 @@ def main() -> None:
194
194
  type=str,
195
195
  help="Description of additional instruction or path to a file containing additional instructions",
196
196
  )
197
- run_parser.add_argument(
198
- "--preserve-source",
199
- action="store_true",
200
- help="If set, do not overwrite the original source file; only save modified versions in the runs directory",
201
- )
202
197
 
203
198
  # --- Logout Command ---
204
199
  _ = subparsers.add_parser("logout", help="Log out from Weco and clear saved API key.")
@@ -310,9 +305,8 @@ def main() -> None:
310
305
  # Write the initial code string to the logs
311
306
  write_to_path(fp=runs_dir / f"step_0{source_fp.suffix}", content=session_response["code"])
312
307
 
313
- # Write the initial code string to the source file path (if not preserving)
314
- if not args.preserve_source:
315
- write_to_path(fp=source_fp, content=session_response["code"])
308
+ # Write the initial code string to the source file path
309
+ write_to_path(fp=source_fp, content=session_response["code"])
316
310
 
317
311
  # Update the panels with the initial solution
318
312
  summary_panel.set_session_id(session_id=session_id) # Add session id now that we have it
@@ -398,8 +392,7 @@ def main() -> None:
398
392
  )
399
393
 
400
394
  # Write the next solution to the source file
401
- if not args.preserve_source:
402
- write_to_path(fp=source_fp, content=eval_and_next_solution_response["code"])
395
+ write_to_path(fp=source_fp, content=eval_and_next_solution_response["code"])
403
396
 
404
397
  # Get the optimization session status for
405
398
  # the best solution, its score, and the history to plot the tree
@@ -560,8 +553,7 @@ def main() -> None:
560
553
  write_to_path(fp=runs_dir / f"best{source_fp.suffix}", content=best_solution_content)
561
554
 
562
555
  # write the best solution to the source file
563
- if not args.preserve_source:
564
- write_to_path(fp=source_fp, content=best_solution_content)
556
+ write_to_path(fp=source_fp, content=best_solution_content)
565
557
 
566
558
  console.print(end_optimization_layout)
567
559
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: weco
3
- Version: 0.2.16
3
+ Version: 0.2.17
4
4
  Summary: Documentation for `weco`, a CLI for using Weco AI's code optimizer.
5
5
  Author-email: Weco AI Team <contact@weco.ai>
6
6
  License: MIT
@@ -20,12 +20,21 @@ Requires-Dist: build; extra == "dev"
20
20
  Requires-Dist: setuptools_scm; extra == "dev"
21
21
  Dynamic: license-file
22
22
 
23
- # Weco: The AI Research Engineer
23
+ <div align="center">
24
24
 
25
- [![Python](https://img.shields.io/badge/Python-3.12.0-blue)](https://www.python.org)
25
+ # Weco: The AI Code Optimizer
26
+
27
+ [![Python](https://img.shields.io/badge/Python-3.8.0+-blue)](https://www.python.org)
28
+ [![docs](https://img.shields.io/website?url=https://docs.weco.ai/&label=docs)](https://docs.weco.ai/)
26
29
  [![PyPI version](https://badge.fury.io/py/weco.svg)](https://badge.fury.io/py/weco)
27
30
  [![AIDE](https://img.shields.io/badge/AI--Driven_Exploration-arXiv-orange?style=flat-square&logo=arxiv)](https://arxiv.org/abs/2502.13138)
28
31
 
32
+ <code>pip install weco</code>
33
+
34
+ </div>
35
+
36
+ ---
37
+
29
38
  Weco systematically optimizes your code, guided directly by your evaluation metrics.
30
39
 
31
40
  Example applications include:
@@ -101,7 +110,7 @@ This command starts the optimization process.
101
110
 
102
111
  This basic example shows how to optimize a simple PyTorch function for speedup.
103
112
 
104
- For more advanced examples, including [Triton](/examples/triton/README.md), [CUDA kernel optimization](/examples/cuda/README.md)**, and **[ML model optimization](/examples/spaceship-titanic/README.md)**, please see the `README.md` files within the corresponding subdirectories under the [`examples/`](./examples/) folder.
113
+ For more advanced examples, including [Triton](/examples/triton/README.md), [CUDA kernel optimization](/examples/cuda/README.md), [ML model optimization](/examples/spaceship-titanic/README.md), and [prompt engineering for math problems](https://github.com/WecoAI/weco-cli/tree/main/examples/prompt), please see the `README.md` files within the corresponding subdirectories under the [`examples/`](./examples/) folder.
105
114
 
106
115
  ```bash
107
116
  # Navigate to the example directory
@@ -136,7 +145,6 @@ weco run --source optimize.py \
136
145
  | `--model` | Model identifier for the LLM to use (e.g., `gpt-4o`, `claude-3.5-sonnet`). Recommended models to try include `o3-mini`, `claude-3-haiku`, and `gemini-2.5-pro-exp-03-25`. | Yes |
137
146
  | `--additional-instructions` | (Optional) Natural language description of specific instructions OR path to a file containing detailed instructions to guide the LLM. | No |
138
147
  | `--log-dir` | (Optional) Path to the directory to log intermediate steps and final optimization result. Defaults to `.runs/`. | No |
139
- | `--preserve-source` | (Optional) If set, do not overwrite the original `--source` file. Modifications and the best solution will still be saved in the `--log-dir`. | No |
140
148
 
141
149
  ---
142
150
 
@@ -0,0 +1,12 @@
1
+ weco/__init__.py,sha256=aMh5ZK_EMG8kGfy59ah_5gRVfWeEXgBhcfReKNsqNmQ,426
2
+ weco/api.py,sha256=0OU1hEhN7sbIZ1zj8TeeB0tMaxXk6n6qw82FmcdK0ec,3111
3
+ weco/auth.py,sha256=IPfiLthcNRkPyM8pWHTyDLvikw83sigacpY1PmeA03Y,2343
4
+ weco/cli.py,sha256=j8EyHVIIl2zNAjfVUoOFtJBZbDV69LrfnFA2WlDgbao,28488
5
+ weco/panels.py,sha256=8DoTQC-epGpGjn-xDBcqelC5BKaX7JXnrJ97LInEbRU,13561
6
+ weco/utils.py,sha256=hhIebUPnetFMfNSFfcsKVw1TSpeu_Zw3rBPPnxDie0U,3911
7
+ weco-0.2.17.dist-info/licenses/LICENSE,sha256=p_GQqJBvuZgkLNboYKyH-5dhpTDlKs2wq2TVM55WrWE,1065
8
+ weco-0.2.17.dist-info/METADATA,sha256=G2unWMKcPFan2r5a1kGlcizCQr1nVayJBVVLb-e-9fE,10795
9
+ weco-0.2.17.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
10
+ weco-0.2.17.dist-info/entry_points.txt,sha256=ixJ2uClALbCpBvnIR6BXMNck8SHAab8eVkM9pIUowcs,39
11
+ weco-0.2.17.dist-info/top_level.txt,sha256=F0N7v6e2zBSlsorFv-arAq2yDxQbzX3KVO8GxYhPUeE,5
12
+ weco-0.2.17.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.0.0)
2
+ Generator: setuptools (80.3.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,12 +0,0 @@
1
- weco/__init__.py,sha256=HyOG-766A8if3MM5YvAM6CMJobEib3oM54UAJMk9GFA,426
2
- weco/api.py,sha256=0OU1hEhN7sbIZ1zj8TeeB0tMaxXk6n6qw82FmcdK0ec,3111
3
- weco/auth.py,sha256=IPfiLthcNRkPyM8pWHTyDLvikw83sigacpY1PmeA03Y,2343
4
- weco/cli.py,sha256=DPObmIes3tRAVswBGYOx5G_8zIjeIJFufOGnFt__XwE,28869
5
- weco/panels.py,sha256=8DoTQC-epGpGjn-xDBcqelC5BKaX7JXnrJ97LInEbRU,13561
6
- weco/utils.py,sha256=hhIebUPnetFMfNSFfcsKVw1TSpeu_Zw3rBPPnxDie0U,3911
7
- weco-0.2.16.dist-info/licenses/LICENSE,sha256=p_GQqJBvuZgkLNboYKyH-5dhpTDlKs2wq2TVM55WrWE,1065
8
- weco-0.2.16.dist-info/METADATA,sha256=CFe6w8pRnMh-zDuyebtqIOFfIuf6JEJFqgVdUPSTO6s,10749
9
- weco-0.2.16.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
10
- weco-0.2.16.dist-info/entry_points.txt,sha256=ixJ2uClALbCpBvnIR6BXMNck8SHAab8eVkM9pIUowcs,39
11
- weco-0.2.16.dist-info/top_level.txt,sha256=F0N7v6e2zBSlsorFv-arAq2yDxQbzX3KVO8GxYhPUeE,5
12
- weco-0.2.16.dist-info/RECORD,,