weco 0.2.24__tar.gz → 0.2.25__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.
Files changed (47) hide show
  1. {weco-0.2.24 → weco-0.2.25}/PKG-INFO +1 -1
  2. {weco-0.2.24 → weco-0.2.25}/pyproject.toml +1 -1
  3. {weco-0.2.24 → weco-0.2.25}/weco/api.py +7 -11
  4. {weco-0.2.24 → weco-0.2.25}/weco.egg-info/PKG-INFO +1 -1
  5. {weco-0.2.24 → weco-0.2.25}/.github/workflows/lint.yml +0 -0
  6. {weco-0.2.24 → weco-0.2.25}/.github/workflows/release.yml +0 -0
  7. {weco-0.2.24 → weco-0.2.25}/.gitignore +0 -0
  8. {weco-0.2.24 → weco-0.2.25}/LICENSE +0 -0
  9. {weco-0.2.24 → weco-0.2.25}/README.md +0 -0
  10. {weco-0.2.24 → weco-0.2.25}/assets/example-optimization.gif +0 -0
  11. {weco-0.2.24 → weco-0.2.25}/assets/weco.svg +0 -0
  12. {weco-0.2.24 → weco-0.2.25}/contributing.md +0 -0
  13. {weco-0.2.24 → weco-0.2.25}/examples/cuda/README.md +0 -0
  14. {weco-0.2.24 → weco-0.2.25}/examples/cuda/evaluate.py +0 -0
  15. {weco-0.2.24 → weco-0.2.25}/examples/cuda/guide.md +0 -0
  16. {weco-0.2.24 → weco-0.2.25}/examples/cuda/optimize.py +0 -0
  17. {weco-0.2.24 → weco-0.2.25}/examples/hello-kernel-world/colab_notebook_walkthrough.ipynb +0 -0
  18. {weco-0.2.24 → weco-0.2.25}/examples/hello-kernel-world/evaluate.py +0 -0
  19. {weco-0.2.24 → weco-0.2.25}/examples/hello-kernel-world/optimize.py +0 -0
  20. {weco-0.2.24 → weco-0.2.25}/examples/prompt/README.md +0 -0
  21. {weco-0.2.24 → weco-0.2.25}/examples/prompt/eval.py +0 -0
  22. {weco-0.2.24 → weco-0.2.25}/examples/prompt/optimize.py +0 -0
  23. {weco-0.2.24 → weco-0.2.25}/examples/prompt/prompt_guide.md +0 -0
  24. {weco-0.2.24 → weco-0.2.25}/examples/spaceship-titanic/README.md +0 -0
  25. {weco-0.2.24 → weco-0.2.25}/examples/spaceship-titanic/competition_description.md +0 -0
  26. {weco-0.2.24 → weco-0.2.25}/examples/spaceship-titanic/data/sample_submission.csv +0 -0
  27. {weco-0.2.24 → weco-0.2.25}/examples/spaceship-titanic/data/test.csv +0 -0
  28. {weco-0.2.24 → weco-0.2.25}/examples/spaceship-titanic/data/train.csv +0 -0
  29. {weco-0.2.24 → weco-0.2.25}/examples/spaceship-titanic/evaluate.py +0 -0
  30. {weco-0.2.24 → weco-0.2.25}/examples/spaceship-titanic/train.py +0 -0
  31. {weco-0.2.24 → weco-0.2.25}/examples/triton/README.md +0 -0
  32. {weco-0.2.24 → weco-0.2.25}/examples/triton/evaluate.py +0 -0
  33. {weco-0.2.24 → weco-0.2.25}/examples/triton/optimize.py +0 -0
  34. {weco-0.2.24 → weco-0.2.25}/setup.cfg +0 -0
  35. {weco-0.2.24 → weco-0.2.25}/weco/__init__.py +0 -0
  36. {weco-0.2.24 → weco-0.2.25}/weco/auth.py +0 -0
  37. {weco-0.2.24 → weco-0.2.25}/weco/chatbot.py +0 -0
  38. {weco-0.2.24 → weco-0.2.25}/weco/cli.py +0 -0
  39. {weco-0.2.24 → weco-0.2.25}/weco/constants.py +0 -0
  40. {weco-0.2.24 → weco-0.2.25}/weco/optimizer.py +0 -0
  41. {weco-0.2.24 → weco-0.2.25}/weco/panels.py +0 -0
  42. {weco-0.2.24 → weco-0.2.25}/weco/utils.py +0 -0
  43. {weco-0.2.24 → weco-0.2.25}/weco.egg-info/SOURCES.txt +0 -0
  44. {weco-0.2.24 → weco-0.2.25}/weco.egg-info/dependency_links.txt +0 -0
  45. {weco-0.2.24 → weco-0.2.25}/weco.egg-info/entry_points.txt +0 -0
  46. {weco-0.2.24 → weco-0.2.25}/weco.egg-info/requires.txt +0 -0
  47. {weco-0.2.24 → weco-0.2.25}/weco.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: weco
3
- Version: 0.2.24
3
+ Version: 0.2.25
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
@@ -8,7 +8,7 @@ name = "weco"
8
8
  authors = [{ name = "Weco AI Team", email = "contact@weco.ai" }]
9
9
  description = "Documentation for `weco`, a CLI for using Weco AI's code optimizer."
10
10
  readme = "README.md"
11
- version = "0.2.24"
11
+ version = "0.2.25"
12
12
  license = { text = "MIT" }
13
13
  requires-python = ">=3.8"
14
14
  dependencies = [
@@ -61,12 +61,12 @@ def start_optimization_run(
61
61
  if result.get("code") is None:
62
62
  result["code"] = ""
63
63
  return result
64
- except Exception as e:
64
+ except requests.exceptions.HTTPError as e:
65
65
  handle_api_error(e, console)
66
- sys.exit(1)
66
+ raise
67
67
  except Exception as e:
68
68
  console.print(f"[bold red]Error starting run: {e}[/]")
69
- sys.exit(1)
69
+ raise
70
70
 
71
71
 
72
72
  def evaluate_feedback_then_suggest_next_solution(
@@ -152,7 +152,7 @@ def send_heartbeat(run_id: str, auth_headers: dict = {}, timeout: Union[int, Tup
152
152
  return True
153
153
  except requests.exceptions.HTTPError as e:
154
154
  if e.response.status_code == 409:
155
- print("Polling ignore: Run {run_id} is not running.", file=sys.stderr)
155
+ print(f"Polling ignore: Run {run_id} is not running.", file=sys.stderr)
156
156
  else:
157
157
  print(f"Polling failed for run {run_id}: HTTP {e.response.status_code}", file=sys.stderr)
158
158
  return False
@@ -221,7 +221,6 @@ def get_optimization_suggestions_from_codebase(
221
221
  """Analyze codebase and get optimization suggestions using the model-agnostic backend API."""
222
222
  model, api_key_dict = _determine_model_and_api_key()
223
223
  try:
224
- model, api_key_dict = _determine_model_and_api_key()
225
224
  response = requests.post(
226
225
  f"{__base_url__}/onboard/analyze-codebase",
227
226
  json={
@@ -238,7 +237,7 @@ def get_optimization_suggestions_from_codebase(
238
237
  result = response.json()
239
238
  return [option for option in result.get("options", [])]
240
239
 
241
- except Exception as e:
240
+ except requests.exceptions.HTTPError as e:
242
241
  handle_api_error(e, console)
243
242
  return None
244
243
  except Exception as e:
@@ -257,7 +256,6 @@ def generate_evaluation_script_and_metrics(
257
256
  """Generate evaluation script and determine metrics using the model-agnostic backend API."""
258
257
  model, api_key_dict = _determine_model_and_api_key()
259
258
  try:
260
- model, api_key_dict = _determine_model_and_api_key()
261
259
  response = requests.post(
262
260
  f"{__base_url__}/onboard/generate-script",
263
261
  json={
@@ -294,7 +292,6 @@ def analyze_evaluation_environment(
294
292
  """Analyze existing evaluation scripts and environment using the model-agnostic backend API."""
295
293
  model, api_key_dict = _determine_model_and_api_key()
296
294
  try:
297
- model, api_key_dict = _determine_model_and_api_key()
298
295
  response = requests.post(
299
296
  f"{__base_url__}/onboard/analyze-environment",
300
297
  json={
@@ -312,7 +309,7 @@ def analyze_evaluation_environment(
312
309
  response.raise_for_status()
313
310
  return response.json()
314
311
 
315
- except Exception as e:
312
+ except requests.exceptions.HTTPError as e:
316
313
  handle_api_error(e, console)
317
314
  return None
318
315
  except Exception as e:
@@ -331,7 +328,6 @@ def analyze_script_execution_requirements(
331
328
  """Analyze script to determine proper execution command using the model-agnostic backend API."""
332
329
  model, api_key_dict = _determine_model_and_api_key()
333
330
  try:
334
- model, api_key_dict = _determine_model_and_api_key()
335
331
  response = requests.post(
336
332
  f"{__base_url__}/onboard/analyze-script",
337
333
  json={
@@ -348,7 +344,7 @@ def analyze_script_execution_requirements(
348
344
  result = response.json()
349
345
  return result.get("command", f"python {script_path}")
350
346
 
351
- except Exception as e:
347
+ except requests.exceptions.HTTPError as e:
352
348
  handle_api_error(e, console)
353
349
  return f"python {script_path}"
354
350
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: weco
3
- Version: 0.2.24
3
+ Version: 0.2.25
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
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