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.
- {py_adtools-0.1.4 → py_adtools-0.1.5}/PKG-INFO +1 -1
- {py_adtools-0.1.4 → py_adtools-0.1.5}/adtools/evaluator.py +4 -3
- {py_adtools-0.1.4 → py_adtools-0.1.5}/py_adtools.egg-info/PKG-INFO +1 -1
- {py_adtools-0.1.4 → py_adtools-0.1.5}/setup.py +1 -1
- {py_adtools-0.1.4 → py_adtools-0.1.5}/LICENSE +0 -0
- {py_adtools-0.1.4 → py_adtools-0.1.5}/README.md +0 -0
- {py_adtools-0.1.4 → py_adtools-0.1.5}/adtools/__init__.py +0 -0
- {py_adtools-0.1.4 → py_adtools-0.1.5}/adtools/evaluator_pool.py +0 -0
- {py_adtools-0.1.4 → py_adtools-0.1.5}/adtools/lm_base.py +0 -0
- {py_adtools-0.1.4 → py_adtools-0.1.5}/adtools/py_code.py +0 -0
- {py_adtools-0.1.4 → py_adtools-0.1.5}/py_adtools.egg-info/SOURCES.txt +0 -0
- {py_adtools-0.1.4 → py_adtools-0.1.5}/py_adtools.egg-info/dependency_links.txt +0 -0
- {py_adtools-0.1.4 → py_adtools-0.1.5}/py_adtools.egg-info/requires.txt +0 -0
- {py_adtools-0.1.4 → py_adtools-0.1.5}/py_adtools.egg-info/top_level.txt +0 -0
- {py_adtools-0.1.4 → py_adtools-0.1.5}/setup.cfg +0 -0
|
@@ -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(
|
|
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{
|
|
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(
|
|
211
|
+
print(traceback.format_exc())
|
|
211
212
|
return None
|
|
@@ -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.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|