|
14 | 14 | from parea.helpers import is_logging_disabled, timezone_aware_now |
15 | 15 | from parea.schemas.models import TraceLog, UpdateLog, UpdateTraceScenario |
16 | 16 | from parea.utils.trace_utils import call_eval_funcs_then_log, execution_order_counters, fill_trace_data, logger_update_record, trace_context, trace_data |
17 | | -from parea.wrapper.utils import safe_format_template_to_prompt, skip_decorator_if_func_in_stack |
| 17 | +from parea.wrapper.utils import safe_format_template_to_prompt, skip_decorator_if_func_in_stack_for_evals |
18 | 18 |
|
19 | 19 | logger = logging.getLogger() |
20 | 20 |
|
@@ -130,6 +130,7 @@ def _init_trace(self, kwargs) -> Tuple[str, datetime, contextvars.Token]: |
130 | 130 |
|
131 | 131 | return trace_id, start_time, token |
132 | 132 |
|
| 133 | + @skip_decorator_if_func_in_stack_for_evals(call_eval_funcs_then_log, _make_evaluations) |
133 | 134 | def async_decorator(self, orig_func: Callable) -> Callable: |
134 | 135 | @functools.wraps(orig_func) |
135 | 136 | async def wrapper(*args, **kwargs): |
@@ -161,6 +162,7 @@ async def wrapper(*args, **kwargs): |
161 | 162 |
|
162 | 163 | return wrapper |
163 | 164 |
|
| 165 | + @skip_decorator_if_func_in_stack_for_evals(call_eval_funcs_then_log, _make_evaluations) |
164 | 166 | def sync_decorator(self, orig_func: Callable) -> Callable: |
165 | 167 | @functools.wraps(orig_func) |
166 | 168 | def wrapper(*args, **kwargs): |
|
0 commit comments