uipath 2.1.112__py3-none-any.whl → 2.1.113__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.

@@ -8,7 +8,11 @@ from pydantic.alias_generators import to_camel
8
8
  from pydantic_core import core_schema
9
9
 
10
10
  from uipath._cli._runtime._contracts import UiPathRuntimeResult
11
- from uipath.eval.models.models import EvaluationResult, ScoreType
11
+ from uipath.eval.models.models import (
12
+ EvaluationResult,
13
+ ScoreType,
14
+ TrajectoryEvaluationTrace,
15
+ )
12
16
 
13
17
 
14
18
  class UiPathEvalRunExecutionOutput(BaseModel):
@@ -22,6 +26,22 @@ class UiPathEvalRunExecutionOutput(BaseModel):
22
26
  result: UiPathRuntimeResult
23
27
 
24
28
 
29
+ class UiPathSerializableEvalRunExecutionOutput(BaseModel):
30
+ execution_time: float
31
+ trace: TrajectoryEvaluationTrace
32
+ result: UiPathRuntimeResult
33
+
34
+
35
+ def convert_eval_execution_output_to_serializable(
36
+ output: UiPathEvalRunExecutionOutput,
37
+ ) -> UiPathSerializableEvalRunExecutionOutput:
38
+ return UiPathSerializableEvalRunExecutionOutput(
39
+ execution_time=output.execution_time,
40
+ result=output.result,
41
+ trace=TrajectoryEvaluationTrace.from_readable_spans(output.spans),
42
+ )
43
+
44
+
25
45
  class EvaluationResultDto(BaseModel):
26
46
  model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
27
47
 
@@ -67,19 +87,13 @@ class EvaluationRunResultDto(BaseModel):
67
87
  evaluator_id: str
68
88
  result: EvaluationResultDto
69
89
 
70
- @model_serializer(mode="wrap")
71
- def serialize_model(self, serializer, info):
72
- data = serializer(self)
73
- if isinstance(data, dict):
74
- data.pop("evaluatorId", None)
75
- return data
76
-
77
90
 
78
91
  class EvaluationRunResult(BaseModel):
79
92
  model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
80
93
 
81
94
  evaluation_name: str
82
95
  evaluation_run_results: List[EvaluationRunResultDto]
96
+ agent_execution_output: Optional[UiPathSerializableEvalRunExecutionOutput] = None
83
97
 
84
98
  @property
85
99
  def score(self) -> float:
@@ -38,6 +38,7 @@ from .._runtime._contracts import (
38
38
  )
39
39
  from .._runtime._logging import ExecutionLogHandler
40
40
  from .._utils._eval_set import EvalHelpers
41
+ from ..models.runtime_schema import Entrypoint
41
42
  from ._evaluator_factory import EvaluatorFactory
42
43
  from ._models._evaluation_set import (
43
44
  AnyEvaluationItem,
@@ -53,6 +54,7 @@ from ._models._output import (
53
54
  EvaluationRunResultDto,
54
55
  UiPathEvalOutput,
55
56
  UiPathEvalRunExecutionOutput,
57
+ convert_eval_execution_output_to_serializable,
56
58
  )
57
59
  from ._span_collection import ExecutionSpanCollector
58
60
  from .mocks.mocks import (
@@ -147,6 +149,7 @@ class UiPathEvalContext(UiPathRuntimeContext):
147
149
  workers: Optional[int] = 1
148
150
  eval_set: Optional[str] = None
149
151
  eval_ids: Optional[List[str]] = None
152
+ verbose: bool = False
150
153
 
151
154
 
152
155
  class UiPathEvalRuntime(UiPathBaseRuntime, Generic[T, C]):
@@ -173,6 +176,15 @@ class UiPathEvalRuntime(UiPathBaseRuntime, Generic[T, C]):
173
176
 
174
177
  self.logs_exporter: ExecutionLogsExporter = ExecutionLogsExporter()
175
178
  self.execution_id = str(uuid.uuid4())
179
+ self.entrypoint: Optional[Entrypoint] = None
180
+
181
+ async def get_entrypoint(self):
182
+ if not self.entrypoint:
183
+ temp_runtime = self.factory.new_runtime(
184
+ entrypoint=self.context.entrypoint, runtime_dir=os.getcwd()
185
+ )
186
+ self.entrypoint = await temp_runtime.get_entrypoint()
187
+ return self.entrypoint
176
188
 
177
189
  @classmethod
178
190
  def from_eval_context(
@@ -187,13 +199,6 @@ class UiPathEvalRuntime(UiPathBaseRuntime, Generic[T, C]):
187
199
  if self.context.eval_set is None:
188
200
  raise ValueError("eval_set must be provided for evaluation runs")
189
201
 
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
-
197
202
  event_bus = self.event_bus
198
203
 
199
204
  # Load eval set (path is already resolved in cli_eval.py)
@@ -360,6 +365,12 @@ class UiPathEvalRuntime(UiPathBaseRuntime, Generic[T, C]):
360
365
 
361
366
  try:
362
367
  agent_execution_output = await self.execute_runtime(eval_item, execution_id)
368
+ if self.context.verbose:
369
+ evaluation_run_results.agent_execution_output = (
370
+ convert_eval_execution_output_to_serializable(
371
+ agent_execution_output
372
+ )
373
+ )
363
374
  evaluation_item_results: list[EvalItemResult] = []
364
375
 
365
376
  for evaluator in evaluators:
@@ -477,7 +488,9 @@ class UiPathEvalRuntime(UiPathBaseRuntime, Generic[T, C]):
477
488
  self, eval_item: AnyEvaluationItem
478
489
  ) -> AnyEvaluationItem:
479
490
  """Use LLM to generate a mock input for an evaluation item."""
480
- generated_input = await generate_llm_input(eval_item, self.entrypoint.input)
491
+ generated_input = await generate_llm_input(
492
+ eval_item, (await self.get_entrypoint()).input
493
+ )
481
494
  updated_eval_item = eval_item.model_copy(update={"inputs": generated_input})
482
495
  return updated_eval_item
483
496
 
@@ -536,6 +536,7 @@ class UiPathRuntimeError(UiPathBaseRuntimeError):
536
536
  title: str,
537
537
  detail: str,
538
538
  category: UiPathErrorCategory = UiPathErrorCategory.UNKNOWN,
539
+ status: Optional[int] = None,
539
540
  prefix: str = "Python",
540
541
  include_traceback: bool = True,
541
542
  ):
@@ -544,6 +545,7 @@ class UiPathRuntimeError(UiPathBaseRuntimeError):
544
545
  title=title,
545
546
  detail=detail,
546
547
  category=category,
548
+ status=status,
547
549
  prefix=prefix,
548
550
  include_traceback=include_traceback,
549
551
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.1.112
3
+ Version: 2.1.113
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,14 +54,14 @@ 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=t2owFdxDPUaZsOhy4_zx-BrMfClsdLgaVaplAMatM8Q,23423
57
+ uipath/_cli/_evals/_runtime.py,sha256=dU2LXZ-T55-wsqRUCP0Kc4AU1oh1MiF4NRKIyPWJytw,23895
58
58
  uipath/_cli/_evals/_span_collection.py,sha256=RoKoeDFG2XODdlgI27ionCjU7LLD_C0LJJ3gu0wab10,779
59
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
63
63
  uipath/_cli/_evals/_models/_mocks.py,sha256=mlD9qvdZNniuKxzY_ttJtwLVFvKGvvIukYvy0FTa12k,241
64
- uipath/_cli/_evals/_models/_output.py,sha256=AuqmSoyMuoN79UVR8J8OQ92Pqik0P_l2fegxEV-lSB0,7026
64
+ uipath/_cli/_evals/_models/_output.py,sha256=ZQiRCqFZWUsPrJ96E_xQlup6xUlz0lmbJQdsy9WUqoU,7450
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
67
  uipath/_cli/_evals/mocks/input_mocker.py,sha256=DtI5mqLKlg_QAvoPXUUbsLX5ptvPaA8MM8v7CPOWd_M,4450
@@ -72,7 +72,7 @@ uipath/_cli/_evals/mocks/mockito_mocker.py,sha256=opwfELnvuh3krnPAg0MupkHTEmhCpQ
72
72
  uipath/_cli/_evals/mocks/mocks.py,sha256=IrvhtTtIuU5geopvCRglNhxKoOcChnnjQZMoYygx0PU,2225
73
73
  uipath/_cli/_push/models.py,sha256=K3k6QUMkiNIb3M4U0EgDlKz1UELxeMXLNVAj3qyhZ4U,470
74
74
  uipath/_cli/_push/sw_file_handler.py,sha256=ivHj0qzCvEP45M3x-Oi2edO5I-uhyHzgnidDF3JRoTk,36192
75
- uipath/_cli/_runtime/_contracts.py,sha256=NU7cZerrpxYTlP8-pamMBytCTMmvWy7vxPMlzFv8aBA,36231
75
+ uipath/_cli/_runtime/_contracts.py,sha256=d39hBwydFxMlF5VJSa4Fj_ZIWqr2iVUlHLTupBDrNZQ,36296
76
76
  uipath/_cli/_runtime/_escalation.py,sha256=x3vI98qsfRA-fL_tNkRVTFXioM5Gv2w0GFcXJJ5eQtg,7981
77
77
  uipath/_cli/_runtime/_hitl.py,sha256=JAwTUKvxO4HpnZMwE4E0AegAPw_uYOwgt0OYcu6EvTg,11474
78
78
  uipath/_cli/_runtime/_logging.py,sha256=srjAi3Cy6g7b8WNHiYNjaZT4t40F3XRqquuoGd2kh4Y,14019
@@ -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.112.dist-info/METADATA,sha256=n-2HKHyHbL9qb7eTshpzMv_HAh1ZDEo754AeJ6MwXag,6626
228
- uipath-2.1.112.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
229
- uipath-2.1.112.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
230
- uipath-2.1.112.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
231
- uipath-2.1.112.dist-info/RECORD,,
227
+ uipath-2.1.113.dist-info/METADATA,sha256=pKYTMkeNgq_jI893OyAeJWlYH_hKHfnh2kQcF3layKo,6626
228
+ uipath-2.1.113.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
229
+ uipath-2.1.113.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
230
+ uipath-2.1.113.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
231
+ uipath-2.1.113.dist-info/RECORD,,