uipath 2.1.110__py3-none-any.whl → 2.1.111__py3-none-any.whl
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 uipath might be problematic. Click here for more details.
- uipath/_cli/_evals/_models/_evaluation_set.py +4 -0
- uipath/_cli/_evals/_runtime.py +15 -5
- uipath/_cli/_evals/mocks/input_mocker.py +13 -3
- {uipath-2.1.110.dist-info → uipath-2.1.111.dist-info}/METADATA +1 -1
- {uipath-2.1.110.dist-info → uipath-2.1.111.dist-info}/RECORD +8 -8
- {uipath-2.1.110.dist-info → uipath-2.1.111.dist-info}/WHEEL +0 -0
- {uipath-2.1.110.dist-info → uipath-2.1.111.dist-info}/entry_points.txt +0 -0
- {uipath-2.1.110.dist-info → uipath-2.1.111.dist-info}/licenses/LICENSE +0 -0
|
@@ -142,6 +142,10 @@ class LegacyEvaluationItem(BaseModel):
|
|
|
142
142
|
default=None,
|
|
143
143
|
alias="mockingStrategy",
|
|
144
144
|
)
|
|
145
|
+
input_mocking_strategy: Optional[InputMockingStrategy] = Field(
|
|
146
|
+
default=None,
|
|
147
|
+
alias="inputMockingStrategy",
|
|
148
|
+
)
|
|
145
149
|
|
|
146
150
|
|
|
147
151
|
class EvaluationSet(BaseModel):
|
uipath/_cli/_evals/_runtime.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
import json
|
|
3
3
|
import logging
|
|
4
|
+
import os
|
|
4
5
|
import uuid
|
|
5
6
|
from collections import defaultdict
|
|
6
7
|
from pathlib import Path
|
|
@@ -186,6 +187,13 @@ class UiPathEvalRuntime(UiPathBaseRuntime, Generic[T, C]):
|
|
|
186
187
|
if self.context.eval_set is None:
|
|
187
188
|
raise ValueError("eval_set must be provided for evaluation runs")
|
|
188
189
|
|
|
190
|
+
# Get entrypoint from a temporary runtime
|
|
191
|
+
temp_context = self.factory.new_context(
|
|
192
|
+
entrypoint=self.context.entrypoint, runtime_dir=os.getcwd()
|
|
193
|
+
)
|
|
194
|
+
temp_runtime = self.factory.from_context(temp_context)
|
|
195
|
+
self.entrypoint = await temp_runtime.get_entrypoint()
|
|
196
|
+
|
|
189
197
|
event_bus = self.event_bus
|
|
190
198
|
|
|
191
199
|
# Load eval set (path is already resolved in cli_eval.py)
|
|
@@ -330,6 +338,10 @@ class UiPathEvalRuntime(UiPathBaseRuntime, Generic[T, C]):
|
|
|
330
338
|
evaluators: List[AnyEvaluator],
|
|
331
339
|
event_bus: EventBus,
|
|
332
340
|
) -> EvaluationRunResult:
|
|
341
|
+
# Generate LLM-based input if input_mocking_strategy is defined
|
|
342
|
+
if eval_item.input_mocking_strategy:
|
|
343
|
+
eval_item = await self._generate_input_for_eval(eval_item)
|
|
344
|
+
|
|
333
345
|
execution_id = str(uuid.uuid4())
|
|
334
346
|
|
|
335
347
|
set_execution_context(eval_item, self.span_collector, execution_id)
|
|
@@ -462,12 +474,10 @@ class UiPathEvalRuntime(UiPathBaseRuntime, Generic[T, C]):
|
|
|
462
474
|
return evaluation_run_results
|
|
463
475
|
|
|
464
476
|
async def _generate_input_for_eval(
|
|
465
|
-
self, eval_item:
|
|
466
|
-
) ->
|
|
477
|
+
self, eval_item: AnyEvaluationItem
|
|
478
|
+
) -> AnyEvaluationItem:
|
|
467
479
|
"""Use LLM to generate a mock input for an evaluation item."""
|
|
468
|
-
|
|
469
|
-
input_schema: dict[str, Any] = {}
|
|
470
|
-
generated_input = await generate_llm_input(eval_item, input_schema)
|
|
480
|
+
generated_input = await generate_llm_input(eval_item, self.entrypoint.input)
|
|
471
481
|
updated_eval_item = eval_item.model_copy(update={"inputs": generated_input})
|
|
472
482
|
return updated_eval_item
|
|
473
483
|
|
|
@@ -5,7 +5,7 @@ from datetime import datetime
|
|
|
5
5
|
from typing import Any, Dict
|
|
6
6
|
|
|
7
7
|
from uipath import UiPath
|
|
8
|
-
from uipath._cli._evals._models._evaluation_set import
|
|
8
|
+
from uipath._cli._evals._models._evaluation_set import AnyEvaluationItem
|
|
9
9
|
from uipath.tracing._traced import traced
|
|
10
10
|
|
|
11
11
|
from .mocker import UiPathInputMockingError
|
|
@@ -54,20 +54,30 @@ OUTPUT: ONLY the simulated agent input in the exact format of the INPUT_SCHEMA i
|
|
|
54
54
|
|
|
55
55
|
@traced(name="__mocker__")
|
|
56
56
|
async def generate_llm_input(
|
|
57
|
-
evaluation_item:
|
|
57
|
+
evaluation_item: AnyEvaluationItem,
|
|
58
58
|
input_schema: Dict[str, Any],
|
|
59
59
|
) -> Dict[str, Any]:
|
|
60
60
|
"""Generate synthetic input using an LLM based on the evaluation context."""
|
|
61
61
|
try:
|
|
62
62
|
llm = UiPath().llm
|
|
63
63
|
|
|
64
|
+
# Ensure additionalProperties is set for strict mode compatibility
|
|
65
|
+
if "additionalProperties" not in input_schema:
|
|
66
|
+
input_schema["additionalProperties"] = False
|
|
67
|
+
|
|
68
|
+
expected_output = (
|
|
69
|
+
getattr(evaluation_item, "evaluation_criterias", None)
|
|
70
|
+
or getattr(evaluation_item, "expected_output", None)
|
|
71
|
+
or {}
|
|
72
|
+
)
|
|
73
|
+
|
|
64
74
|
prompt = get_input_mocking_prompt(
|
|
65
75
|
input_schema=json.dumps(input_schema, indent=2),
|
|
66
76
|
input_generation_instructions=evaluation_item.input_mocking_strategy.prompt
|
|
67
77
|
if evaluation_item.input_mocking_strategy
|
|
68
78
|
else "",
|
|
69
79
|
expected_behavior=evaluation_item.expected_agent_behavior or "",
|
|
70
|
-
expected_output=json.dumps(
|
|
80
|
+
expected_output=json.dumps(expected_output, indent=2),
|
|
71
81
|
)
|
|
72
82
|
|
|
73
83
|
response_format = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.111
|
|
4
4
|
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
|
@@ -54,9 +54,9 @@ uipath/_cli/_evals/_evaluate.py,sha256=yRVhZ6uV58EV5Fv5X_K6425ZGsseQslnLe6FpIKy-
|
|
|
54
54
|
uipath/_cli/_evals/_evaluator_factory.py,sha256=gPF9fRMZBOUPnJSM1fzQyXGHMGYQw_0VmHv-JOGbZf4,14348
|
|
55
55
|
uipath/_cli/_evals/_helpers.py,sha256=dYHgkWxy2fOuqqZDtOKWKsZ1Ri4dn8qMnuB6DE-1MUk,6661
|
|
56
56
|
uipath/_cli/_evals/_progress_reporter.py,sha256=CinS0S7vqHDyEp7cU87eARebEvQWwkX7H7fanSqIHxo,27385
|
|
57
|
-
uipath/_cli/_evals/_runtime.py,sha256=
|
|
57
|
+
uipath/_cli/_evals/_runtime.py,sha256=t2owFdxDPUaZsOhy4_zx-BrMfClsdLgaVaplAMatM8Q,23423
|
|
58
58
|
uipath/_cli/_evals/_span_collection.py,sha256=RoKoeDFG2XODdlgI27ionCjU7LLD_C0LJJ3gu0wab10,779
|
|
59
|
-
uipath/_cli/_evals/_models/_evaluation_set.py,sha256=
|
|
59
|
+
uipath/_cli/_evals/_models/_evaluation_set.py,sha256=7P6zIkgerGKHXL6rD1YHXFFWpyxCUpNu7AX71bAaNoE,7270
|
|
60
60
|
uipath/_cli/_evals/_models/_evaluator.py,sha256=UXrN103gHJFw3MtVWlGwViQWAo2cICRR-n357zL6wTA,9369
|
|
61
61
|
uipath/_cli/_evals/_models/_evaluator_base_params.py,sha256=8i7Ir70IjaNOINTHMTXVXsKB4koYf3BCR8Vh2cyrBQI,406
|
|
62
62
|
uipath/_cli/_evals/_models/_exceptions.py,sha256=-oXLTDa4ab9Boa34ZxuUrCezf8ajIGrIEUVwZnmBASE,195
|
|
@@ -64,7 +64,7 @@ uipath/_cli/_evals/_models/_mocks.py,sha256=mlD9qvdZNniuKxzY_ttJtwLVFvKGvvIukYvy
|
|
|
64
64
|
uipath/_cli/_evals/_models/_output.py,sha256=AuqmSoyMuoN79UVR8J8OQ92Pqik0P_l2fegxEV-lSB0,7026
|
|
65
65
|
uipath/_cli/_evals/_models/_sw_reporting.py,sha256=tSBLQFAdOIun8eP0vsqt56K6bmCZz_uMaWI3hskg_24,536
|
|
66
66
|
uipath/_cli/_evals/mocks/__init__.py,sha256=2WXwAy_oZw5bKp6L0HB13QygCJeftOB_Bget0AI6Gik,32
|
|
67
|
-
uipath/_cli/_evals/mocks/input_mocker.py,sha256=
|
|
67
|
+
uipath/_cli/_evals/mocks/input_mocker.py,sha256=DtI5mqLKlg_QAvoPXUUbsLX5ptvPaA8MM8v7CPOWd_M,4450
|
|
68
68
|
uipath/_cli/_evals/mocks/llm_mocker.py,sha256=p9TSl2awjgVorlJcghynFhhHNl-KsLaPPvsKSwFZVt8,7523
|
|
69
69
|
uipath/_cli/_evals/mocks/mocker.py,sha256=VXCxuRAPqUK40kRUXpPmXZRckd7GrOY5ZzIYDe-NNfo,910
|
|
70
70
|
uipath/_cli/_evals/mocks/mocker_factory.py,sha256=A8XzDhJRKddUrGWmtp2FABd6d86VFdzAl0rG4_OD5ss,817
|
|
@@ -224,8 +224,8 @@ uipath/tracing/_utils.py,sha256=zMjiKjNpSN3YQNEU4-u5AAvPtUsi8QuEqNLya89jfAU,1446
|
|
|
224
224
|
uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
|
|
225
225
|
uipath/utils/_endpoints_manager.py,sha256=tnF_FiCx8qI2XaJDQgYkMN_gl9V0VqNR1uX7iawuLp8,8230
|
|
226
226
|
uipath/utils/dynamic_schema.py,sha256=w0u_54MoeIAB-mf3GmwX1A_X8_HDrRy6p998PvX9evY,3839
|
|
227
|
-
uipath-2.1.
|
|
228
|
-
uipath-2.1.
|
|
229
|
-
uipath-2.1.
|
|
230
|
-
uipath-2.1.
|
|
231
|
-
uipath-2.1.
|
|
227
|
+
uipath-2.1.111.dist-info/METADATA,sha256=VJa6HaV9Xw0fWJy4saCYS5viF9gUsYDItjo_5uXmais,6626
|
|
228
|
+
uipath-2.1.111.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
229
|
+
uipath-2.1.111.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
|
|
230
|
+
uipath-2.1.111.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
|
|
231
|
+
uipath-2.1.111.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|