py-adtools 0.1.4__tar.gz → 0.1.5__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.

Potentially problematic release.


This version of py-adtools might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-adtools
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Useful tools for parsing and evaluating Python programs for LLM-based algorithm design.
5
5
  Home-page: https://github.com/RayZhhh/py-adtools
6
6
  Author: Rui Zhang
@@ -12,6 +12,7 @@ from abc import ABC, abstractmethod
12
12
  from queue import Empty
13
13
  from typing import Any, Literal, Dict, Callable, List
14
14
  import psutil
15
+ import traceback
15
16
 
16
17
  from .py_code import PyProgram
17
18
 
@@ -124,7 +125,7 @@ class PyEvaluator(ABC):
124
125
  return res
125
126
  except Exception as e:
126
127
  if self.debug_mode:
127
- print(e)
128
+ print(traceback.format_exc())
128
129
  return None
129
130
 
130
131
  def _evaluate_in_safe_process(
@@ -195,7 +196,7 @@ class PyEvaluator(ABC):
195
196
  result = None
196
197
  except Exception as e:
197
198
  if self.debug_mode:
198
- print(f'DEBUG: evaluation failed with exception:\n{e}')
199
+ print(f'DEBUG: evaluation failed with exception:\n{traceback.format_exc()}')
199
200
  # Terminate/kill all processes if meet exceptions
200
201
  self._kill_process_and_its_children(process)
201
202
  result = None
@@ -207,5 +208,5 @@ class PyEvaluator(ABC):
207
208
  return result
208
209
  except Exception as e:
209
210
  if self.debug_mode:
210
- print(e)
211
+ print(traceback.format_exc())
211
212
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-adtools
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Useful tools for parsing and evaluating Python programs for LLM-based algorithm design.
5
5
  Home-page: https://github.com/RayZhhh/py-adtools
6
6
  Author: Rui Zhang
@@ -5,7 +5,7 @@ with open('README.md', 'r', encoding='utf-8') as fh:
5
5
 
6
6
  setup(
7
7
  name='py-adtools',
8
- version='0.1.4',
8
+ version='0.1.5',
9
9
  author='Rui Zhang',
10
10
  author_email='rzhang.cs@gmail.com',
11
11
  description='Useful tools for parsing and evaluating Python programs for LLM-based algorithm design.',
File without changes
File without changes
File without changes