weco 0.2.9__tar.gz → 0.2.11__tar.gz
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-0.2.9 → weco-0.2.11}/.github/workflows/release.yml +2 -2
- {weco-0.2.9 → weco-0.2.11}/PKG-INFO +1 -1
- {weco-0.2.9 → weco-0.2.11}/pyproject.toml +1 -1
- {weco-0.2.9 → weco-0.2.11}/weco/__init__.py +1 -1
- {weco-0.2.9 → weco-0.2.11}/weco/cli.py +11 -6
- {weco-0.2.9 → weco-0.2.11}/weco.egg-info/PKG-INFO +1 -1
- {weco-0.2.9 → weco-0.2.11}/.github/workflows/lint.yml +0 -0
- {weco-0.2.9 → weco-0.2.11}/.gitignore +0 -0
- {weco-0.2.9 → weco-0.2.11}/LICENSE +0 -0
- {weco-0.2.9 → weco-0.2.11}/README.md +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/cuda/README.md +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/cuda/evaluate.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/cuda/guide.md +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/cuda/optimize.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/hello-kernel-world/evaluate.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/hello-kernel-world/optimize.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/metal/README.md +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/metal/evaluate.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/metal/examples.rst +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/metal/optimize.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/prompt/README.md +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/prompt/eval.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/prompt/optimize.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/prompt/prompt_guide.md +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/spaceship-titanic/README.md +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/spaceship-titanic/baseline.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/spaceship-titanic/evaluate.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/spaceship-titanic/optimize.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/spaceship-titanic/requirements-test.txt +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/spaceship-titanic/utils.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/triton/README.md +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/triton/evaluate.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/examples/triton/optimize.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/setup.cfg +0 -0
- {weco-0.2.9 → weco-0.2.11}/weco/api.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/weco/panels.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/weco/utils.py +0 -0
- {weco-0.2.9 → weco-0.2.11}/weco.egg-info/SOURCES.txt +0 -0
- {weco-0.2.9 → weco-0.2.11}/weco.egg-info/dependency_links.txt +0 -0
- {weco-0.2.9 → weco-0.2.11}/weco.egg-info/entry_points.txt +0 -0
- {weco-0.2.9 → weco-0.2.11}/weco.egg-info/requires.txt +0 -0
- {weco-0.2.9 → weco-0.2.11}/weco.egg-info/top_level.txt +0 -0
|
@@ -90,7 +90,7 @@ jobs:
|
|
|
90
90
|
GITHUB_TOKEN: ${{ github.token }}
|
|
91
91
|
run: >-
|
|
92
92
|
gh release create
|
|
93
|
-
'v0.2.
|
|
93
|
+
'v0.2.11'
|
|
94
94
|
--repo '${{ github.repository }}'
|
|
95
95
|
--notes ""
|
|
96
96
|
|
|
@@ -102,5 +102,5 @@ jobs:
|
|
|
102
102
|
# sigstore-produced signatures and certificates.
|
|
103
103
|
run: >-
|
|
104
104
|
gh release upload
|
|
105
|
-
'v0.2.
|
|
105
|
+
'v0.2.11' dist/**
|
|
106
106
|
--repo '${{ github.repository }}'
|
|
@@ -10,7 +10,7 @@ authors = [
|
|
|
10
10
|
]
|
|
11
11
|
description = "Documentation for `weco`, a CLI for using Weco AI's code optimizer."
|
|
12
12
|
readme = "README.md"
|
|
13
|
-
version = "0.2.
|
|
13
|
+
version = "0.2.11"
|
|
14
14
|
license = {text = "MIT"}
|
|
15
15
|
requires-python = ">=3.8"
|
|
16
16
|
dependencies = ["requests", "rich"]
|
|
@@ -125,7 +125,7 @@ def main() -> None:
|
|
|
125
125
|
runs_dir.mkdir(parents=True, exist_ok=True)
|
|
126
126
|
|
|
127
127
|
# Save the original code (.runs/<session-id>/original.<extension>)
|
|
128
|
-
runs_copy_source_fp = runs_dir / f"original
|
|
128
|
+
runs_copy_source_fp = runs_dir / f"original{source_fp.suffix}"
|
|
129
129
|
write_to_path(fp=runs_copy_source_fp, content=source_code)
|
|
130
130
|
|
|
131
131
|
# Write the code string to the source file path
|
|
@@ -342,8 +342,8 @@ def main() -> None:
|
|
|
342
342
|
# Update the end optimization layout
|
|
343
343
|
final_message = (
|
|
344
344
|
f"{summary_panel.metric_name.capitalize()} {'maximized' if summary_panel.maximize else 'minimized'}! Best solution {summary_panel.metric_name.lower()} = [green]{status_response['best_result']['metric_value']}[/] 🏆"
|
|
345
|
-
if best_solution_node is not None
|
|
346
|
-
else "[red] No solution found.[/]"
|
|
345
|
+
if best_solution_node is not None and best_solution_node.metric is not None
|
|
346
|
+
else "[red] No valid solution found.[/]"
|
|
347
347
|
)
|
|
348
348
|
end_optimization_layout["summary"].update(summary_panel.get_display(final_message=final_message))
|
|
349
349
|
end_optimization_layout["tree"].update(tree_panel.get_display())
|
|
@@ -352,8 +352,13 @@ def main() -> None:
|
|
|
352
352
|
# Save optimization results
|
|
353
353
|
# If the best solution does not exist or is has not been measured at the end of the optimization
|
|
354
354
|
# save the original solution as the best solution
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
if best_solution_node is not None:
|
|
356
|
+
best_solution_code = best_solution_node.code
|
|
357
|
+
best_solution_score = best_solution_node.metric
|
|
358
|
+
else:
|
|
359
|
+
best_solution_code = None
|
|
360
|
+
best_solution_score = None
|
|
361
|
+
|
|
357
362
|
if best_solution_code is None or best_solution_score is None:
|
|
358
363
|
best_solution_content = (
|
|
359
364
|
f"# Weco could not find a better solution\n\n{read_from_path(fp=runs_copy_source_fp, is_json=False)}"
|
|
@@ -368,7 +373,7 @@ def main() -> None:
|
|
|
368
373
|
best_solution_content = f"# Best solution from Weco with a score of {best_score_str}\n\n{best_solution_code}"
|
|
369
374
|
|
|
370
375
|
# Save best solution to .runs/<session-id>/best.<extension>
|
|
371
|
-
write_to_path(fp=runs_dir / f"best
|
|
376
|
+
write_to_path(fp=runs_dir / f"best{source_fp.suffix}", content=best_solution_content)
|
|
372
377
|
|
|
373
378
|
# write the best solution to the source file
|
|
374
379
|
if not args.preserve_source:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|