uipath 2.1.52__tar.gz → 2.1.54__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.
- {uipath-2.1.52 → uipath-2.1.54}/PKG-INFO +1 -1
- {uipath-2.1.52 → uipath-2.1.54}/pyproject.toml +1 -1
- {uipath-2.1.52/src/uipath/_cli/_evals/_evaluators → uipath-2.1.54/src/uipath/_cli/_evals}/_evaluator_factory.py +24 -23
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_evals/_models/_evaluation_set.py +23 -18
- uipath-2.1.54/src/uipath/_cli/_evals/_models/_evaluator_base_params.py +16 -0
- uipath-2.1.54/src/uipath/_cli/_evals/_models/_output.py +85 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_evals/_runtime.py +102 -10
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_runtime/_contracts.py +11 -2
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_eval_set.py +1 -1
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_studio_project.py +30 -29
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_eval.py +46 -61
- uipath-2.1.54/src/uipath/eval/evaluators/__init__.py +15 -0
- uipath-2.1.54/src/uipath/eval/evaluators/base_evaluator.py +88 -0
- uipath-2.1.54/src/uipath/eval/evaluators/deterministic_evaluator_base.py +53 -0
- uipath-2.1.54/src/uipath/eval/evaluators/exact_match_evaluator.py +37 -0
- uipath-2.1.52/src/uipath/_cli/_evals/_evaluators/_json_similarity_evaluator.py → uipath-2.1.54/src/uipath/eval/evaluators/json_similarity_evaluator.py +23 -40
- uipath-2.1.54/src/uipath/eval/evaluators/llm_as_judge_evaluator.py +137 -0
- uipath-2.1.54/src/uipath/eval/evaluators/trajectory_evaluator.py +36 -0
- uipath-2.1.54/src/uipath/eval/models/__init__.py +19 -0
- uipath-2.1.52/src/uipath/_cli/_evals/_models/_evaluators.py → uipath-2.1.54/src/uipath/eval/models/models.py +67 -43
- uipath-2.1.54/tests/cli/evaluators/test_json_similarity_evaluator.py +233 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_auth.py +148 -148
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_input_args.py +114 -114
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_portal_service_ensure_valid_token.py +334 -334
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_portal_service_refresh_token.py +466 -466
- {uipath-2.1.52 → uipath-2.1.54}/tests/tracing/test_otel_exporters.py +190 -190
- {uipath-2.1.52 → uipath-2.1.54}/tests/tracing/test_span_utils.py +205 -205
- {uipath-2.1.52 → uipath-2.1.54}/tests/tracing/test_traced.py +574 -574
- {uipath-2.1.52 → uipath-2.1.54}/tests/tracing/test_tracing_manager.py +219 -219
- {uipath-2.1.52 → uipath-2.1.54}/uv.lock +1 -1
- uipath-2.1.52/src/uipath/_cli/_evals/_evaluators/__init__.py +0 -22
- uipath-2.1.52/src/uipath/_cli/_evals/_evaluators/_deterministic_evaluator_base.py +0 -46
- uipath-2.1.52/src/uipath/_cli/_evals/_evaluators/_evaluator_base.py +0 -124
- uipath-2.1.52/src/uipath/_cli/_evals/_evaluators/_exact_match_evaluator.py +0 -40
- uipath-2.1.52/src/uipath/_cli/_evals/_evaluators/_llm_as_judge_evaluator.py +0 -183
- uipath-2.1.52/src/uipath/_cli/_evals/_evaluators/_trajectory_evaluator.py +0 -48
- uipath-2.1.52/src/uipath/_cli/_evals/_models/__init__.py +0 -18
- uipath-2.1.52/src/uipath/_cli/_evals/_models/_agent_execution_output.py +0 -14
- uipath-2.1.52/src/uipath/_cli/_evals/progress_reporter.py +0 -304
- uipath-2.1.52/tests/cli/evaluators/test_json_similarity_evaluator.py +0 -237
- {uipath-2.1.52 → uipath-2.1.54}/.cursorrules +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.editorconfig +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.gitattributes +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.github/workflows/cd.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.github/workflows/ci.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.github/workflows/commitlint.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.github/workflows/lint.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.github/workflows/publish-dev.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.github/workflows/publish-docs.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.github/workflows/slack.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.github/workflows/test.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.gitignore +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.pre-commit-config.yaml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.python-version +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.vscode/extensions.json +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.vscode/launch.json +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/.vscode/settings.json +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/CONTRIBUTING.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/LICENSE +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/README.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/CONTRIBUTING.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/FAQ.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/assets/env-preparation-failed-dark.png +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/assets/env-preparation-failed-light.png +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/assets/favicon.png +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/assets/logo-dark.svg +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/assets/logo-light.svg +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/cli/index.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/actions.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/assets/cloud_env_var_dark.gif +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/assets/cloud_env_var_light.gif +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/assets/cloud_env_var_secret_dark.png +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/assets/cloud_env_var_secret_light.png +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/assets/copy_path_dark.png +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/assets/copy_path_light.png +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/assets.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/attachments.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/buckets.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/connections.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/context_grounding.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/environment_variables.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/getting_started.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/jobs.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/llm_gateway.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/processes.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/queues.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/core/traced.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/hooks.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/index.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/javascripts/extra.js +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/overrides/main.html +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/overrides/partials/actions.html +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/overrides/partials/logo.html +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/release_policy.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/sample_images/google-ADK-agent/agent-output.png +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/docs/stylesheets/extra.css +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/justfile +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/mkdocs.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/py.typed +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/calculator/README.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/calculator/main.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/calculator/pyproject.toml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/event-trigger/.python-version +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/event-trigger/README.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/event-trigger/main.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/event-trigger/pyproject.toml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/google-ADK-agent/.env.example +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/google-ADK-agent/README.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/google-ADK-agent/input.json +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/google-ADK-agent/multi_tool_agent/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/google-ADK-agent/multi_tool_agent/agent.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/google-ADK-agent/pyproject.toml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/samples/google-ADK-agent/uv.lock +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/scripts/debug_test.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/scripts/lint_httpx_client.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/README.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/_auth_server.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/_auth_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/_client_credentials.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/_models.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/_portal_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/_url_utils.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/_utils.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/auth_config.json +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/index.html +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/localhost.crt +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_auth/localhost.key +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/_components/_chat.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/_components/_details.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/_components/_history.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/_components/_json_input.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/_components/_new.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/_models/_execution.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/_models/_messages.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/_styles/terminal.tcss +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/_utils/_chat.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/_utils/_exporter.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_dev/_terminal/_utils/_logger.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_push/sw_file_handler.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_runtime/_escalation.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_runtime/_hitl.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_runtime/_logging.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_runtime/_runtime.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_runtime/_script_executor.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_templates/.rels.template +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_templates/main.py.template +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_common.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_console.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_constants.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_debug.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_folders.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_input_args.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_processes.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_project_files.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_tracing.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/_utils/_uv_helpers.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_auth.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_deploy.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_dev.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_init.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_invoke.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_new.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_pack.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_publish.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_pull.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_push.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/cli_run.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/middlewares.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_cli/spinner.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_config.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_execution_context.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_folder_context.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_resources/AGENTS.md +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/_base_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/actions_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/api_client.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/assets_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/attachments_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/buckets_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/connections_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/context_grounding_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/entities_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/folder_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/jobs_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/llm_gateway_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/processes_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_services/queues_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_uipath.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_utils/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_utils/_endpoint.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_utils/_infer_bindings.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_utils/_logs.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_utils/_read_overwrites.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_utils/_request_override.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_utils/_request_spec.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_utils/_ssl_context.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_utils/_url.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_utils/_user_agent.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/_utils/constants.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/agent/conversation/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/agent/conversation/async_stream.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/agent/conversation/citation.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/agent/conversation/content.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/agent/conversation/conversation.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/agent/conversation/event.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/agent/conversation/exchange.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/agent/conversation/message.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/agent/conversation/meta.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/agent/conversation/tool.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/eval/_helpers/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/eval/_helpers/helpers.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/action_schema.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/actions.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/assets.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/attachment.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/buckets.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/connections.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/context_grounding.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/context_grounding_index.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/entities.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/errors.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/exceptions.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/interrupt_models.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/job.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/llm_gateway.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/processes.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/models/queues.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/py.typed +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/telemetry/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/telemetry/_constants.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/telemetry/_track.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/tracing/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/tracing/_otel_exporters.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/tracing/_traced.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/tracing/_utils.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/utils/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/src/uipath/utils/_endpoints_manager.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/conftest.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/mocks/bindings_script.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/mocks/pyproject.toml +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/mocks/simple_script.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/mocks/uipath-mock.json +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/mocks/uipath-simple-script-mock.json +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_hitl.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_init.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_init_agents_md.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_invoke.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_new.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_pack.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_publish.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_pull.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_push.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_run.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/test_utils.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/utils/common.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/utils/project_details.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/cli/utils/uipath_json.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/conftest.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/conftest.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_actions_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_api_client.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_assets_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_attachments_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_base_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_buckets_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_connections_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_context_grounding_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_entities_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_folder_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_jobs_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_llm_integration.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_llm_schema_cleanup.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_llm_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_processes_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_queues_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/test_bindings_inference.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/test_config.py +0 -0
- {uipath-2.1.52 → uipath-2.1.54}/tests/sdk/test_overwrites.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: uipath
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.54
|
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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "uipath"
|
3
|
-
version = "2.1.
|
3
|
+
version = "2.1.54"
|
4
4
|
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
|
5
5
|
readme = { file = "README.md", content-type = "text/markdown" }
|
6
6
|
requires-python = ">=3.10"
|
@@ -1,18 +1,21 @@
|
|
1
1
|
from typing import Any, Dict
|
2
2
|
|
3
|
-
from
|
4
|
-
from .
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
from uipath._cli._evals._models._evaluator_base_params import EvaluatorBaseParams
|
4
|
+
from uipath.eval.evaluators import (
|
5
|
+
BaseEvaluator,
|
6
|
+
ExactMatchEvaluator,
|
7
|
+
JsonSimilarityEvaluator,
|
8
|
+
LlmAsAJudgeEvaluator,
|
9
|
+
TrajectoryEvaluator,
|
10
|
+
)
|
11
|
+
from uipath.eval.models.models import EvaluatorCategory, EvaluatorType
|
9
12
|
|
10
13
|
|
11
14
|
class EvaluatorFactory:
|
12
15
|
"""Factory class for creating evaluator instances based on configuration."""
|
13
16
|
|
14
|
-
@
|
15
|
-
def create_evaluator(data: Dict[str, Any]) ->
|
17
|
+
@classmethod
|
18
|
+
def create_evaluator(cls, data: Dict[str, Any]) -> BaseEvaluator[Any]:
|
16
19
|
"""Create an evaluator instance from configuration data.
|
17
20
|
|
18
21
|
Args:
|
@@ -25,13 +28,15 @@ class EvaluatorFactory:
|
|
25
28
|
ValueError: If category is unknown or required fields are missing
|
26
29
|
"""
|
27
30
|
# Extract common fields
|
28
|
-
|
29
|
-
if not
|
31
|
+
name = data.get("name", "")
|
32
|
+
if not name:
|
33
|
+
raise ValueError("Evaluator configuration must include 'name' field")
|
34
|
+
id = data.get("id", "")
|
35
|
+
if not id:
|
30
36
|
raise ValueError("Evaluator configuration must include 'id' field")
|
31
37
|
|
32
38
|
category = EvaluatorCategory.from_int(data.get("category"))
|
33
39
|
evaluator_type = EvaluatorType.from_int(data.get("type", EvaluatorType.Unknown))
|
34
|
-
name = data.get("name", "")
|
35
40
|
description = data.get("description", "")
|
36
41
|
created_at = data.get("createdAt", "")
|
37
42
|
updated_at = data.get("updatedAt", "")
|
@@ -39,7 +44,7 @@ class EvaluatorFactory:
|
|
39
44
|
|
40
45
|
# Create base parameters
|
41
46
|
base_params = EvaluatorBaseParams(
|
42
|
-
|
47
|
+
id=id,
|
43
48
|
category=category,
|
44
49
|
evaluator_type=evaluator_type,
|
45
50
|
name=name,
|
@@ -49,7 +54,6 @@ class EvaluatorFactory:
|
|
49
54
|
target_output_key=target_output_key,
|
50
55
|
)
|
51
56
|
|
52
|
-
# Create evaluator based on category
|
53
57
|
match category:
|
54
58
|
case EvaluatorCategory.Deterministic:
|
55
59
|
if evaluator_type == evaluator_type.Equals:
|
@@ -80,9 +84,8 @@ class EvaluatorFactory:
|
|
80
84
|
base_params: EvaluatorBaseParams, data: Dict[str, Any]
|
81
85
|
) -> ExactMatchEvaluator:
|
82
86
|
"""Create a deterministic evaluator."""
|
83
|
-
return ExactMatchEvaluator
|
84
|
-
base_params,
|
85
|
-
target_output_key=data.get("targetOutputKey", "*"),
|
87
|
+
return ExactMatchEvaluator(
|
88
|
+
**base_params.model_dump(),
|
86
89
|
)
|
87
90
|
|
88
91
|
@staticmethod
|
@@ -90,9 +93,8 @@ class EvaluatorFactory:
|
|
90
93
|
base_params: EvaluatorBaseParams, data: Dict[str, Any]
|
91
94
|
) -> JsonSimilarityEvaluator:
|
92
95
|
"""Create a deterministic evaluator."""
|
93
|
-
return JsonSimilarityEvaluator
|
94
|
-
base_params,
|
95
|
-
target_output_key=data.get("targetOutputKey", "*"),
|
96
|
+
return JsonSimilarityEvaluator(
|
97
|
+
**base_params.model_dump(),
|
96
98
|
)
|
97
99
|
|
98
100
|
@staticmethod
|
@@ -112,16 +114,15 @@ class EvaluatorFactory:
|
|
112
114
|
"'same-as-agent' model option is not supported by coded agents evaluations. Please select a specific model for the evaluator."
|
113
115
|
)
|
114
116
|
|
115
|
-
return LlmAsAJudgeEvaluator
|
116
|
-
base_params,
|
117
|
+
return LlmAsAJudgeEvaluator(
|
118
|
+
**base_params.model_dump(),
|
117
119
|
prompt=prompt,
|
118
120
|
model=model,
|
119
|
-
target_output_key=data.get("targetOutputKey", "*"),
|
120
121
|
)
|
121
122
|
|
122
123
|
@staticmethod
|
123
124
|
def _create_trajectory_evaluator(
|
124
125
|
base_params: EvaluatorBaseParams, data: Dict[str, Any]
|
125
|
-
) -> TrajectoryEvaluator:
|
126
|
+
) -> TrajectoryEvaluator[Any]:
|
126
127
|
"""Create a trajectory evaluator."""
|
127
128
|
raise NotImplementedError()
|
@@ -1,40 +1,45 @@
|
|
1
1
|
from enum import IntEnum
|
2
2
|
from typing import Any, Dict, List
|
3
3
|
|
4
|
-
from pydantic import BaseModel, Field
|
4
|
+
from pydantic import BaseModel, ConfigDict, Field
|
5
|
+
from pydantic.alias_generators import to_camel
|
5
6
|
|
6
7
|
|
7
8
|
class EvaluationItem(BaseModel):
|
8
9
|
"""Individual evaluation item within an evaluation set."""
|
9
10
|
|
11
|
+
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
12
|
+
|
10
13
|
id: str
|
11
14
|
name: str
|
12
15
|
inputs: Dict[str, Any]
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
expected_output: Dict[str, Any]
|
17
|
+
expected_agent_behavior: str = ""
|
18
|
+
simulation_instructions: str = ""
|
19
|
+
simulate_input: bool = False
|
20
|
+
input_generation_instructions: str = ""
|
21
|
+
simulate_tools: bool = False
|
22
|
+
tools_to_simulate: List[str] = Field(default_factory=list)
|
23
|
+
eval_set_id: str
|
24
|
+
created_at: str
|
25
|
+
updated_at: str
|
23
26
|
|
24
27
|
|
25
28
|
class EvaluationSet(BaseModel):
|
26
29
|
"""Complete evaluation set model."""
|
27
30
|
|
31
|
+
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
32
|
+
|
28
33
|
id: str
|
29
|
-
|
30
|
-
|
34
|
+
file_name: str
|
35
|
+
evaluator_refs: List[str] = Field(default_factory=list)
|
31
36
|
evaluations: List[EvaluationItem] = Field(default_factory=list)
|
32
37
|
name: str
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
+
batch_size: int = 10
|
39
|
+
timeout_minutes: int = 20
|
40
|
+
model_settings: List[Dict[str, Any]] = Field(default_factory=list)
|
41
|
+
created_at: str
|
42
|
+
updated_at: str
|
38
43
|
|
39
44
|
def extract_selected_evals(self, eval_ids) -> None:
|
40
45
|
selected_evals: list[EvaluationItem] = []
|
@@ -0,0 +1,16 @@
|
|
1
|
+
from pydantic import BaseModel
|
2
|
+
|
3
|
+
from uipath.eval.models.models import EvaluatorCategory, EvaluatorType
|
4
|
+
|
5
|
+
|
6
|
+
class EvaluatorBaseParams(BaseModel):
|
7
|
+
"""Parameters for initializing the base evaluator."""
|
8
|
+
|
9
|
+
id: str
|
10
|
+
category: EvaluatorCategory
|
11
|
+
evaluator_type: EvaluatorType
|
12
|
+
name: str
|
13
|
+
description: str
|
14
|
+
created_at: str
|
15
|
+
updated_at: str
|
16
|
+
target_output_key: str
|
@@ -0,0 +1,85 @@
|
|
1
|
+
from typing import List, Optional
|
2
|
+
|
3
|
+
from opentelemetry.sdk.trace import ReadableSpan
|
4
|
+
from pydantic import BaseModel, ConfigDict, model_serializer
|
5
|
+
from pydantic.alias_generators import to_camel
|
6
|
+
|
7
|
+
from uipath._cli._runtime._contracts import UiPathRuntimeResult
|
8
|
+
from uipath.eval.models.models import EvaluationResult, ScoreType
|
9
|
+
|
10
|
+
|
11
|
+
class UiPathEvalRunExecutionOutput(BaseModel):
|
12
|
+
"""Result of a single agent response."""
|
13
|
+
|
14
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
15
|
+
|
16
|
+
execution_time: float
|
17
|
+
spans: list[ReadableSpan]
|
18
|
+
result: UiPathRuntimeResult
|
19
|
+
|
20
|
+
|
21
|
+
class EvaluationResultDto(BaseModel):
|
22
|
+
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
23
|
+
|
24
|
+
score: float
|
25
|
+
details: Optional[str] = None
|
26
|
+
evaluation_time: Optional[float] = None
|
27
|
+
|
28
|
+
@model_serializer(mode="wrap")
|
29
|
+
def serialize_model(self, serializer, info):
|
30
|
+
data = serializer(self)
|
31
|
+
if self.details is None and isinstance(data, dict):
|
32
|
+
data.pop("details", None)
|
33
|
+
return data
|
34
|
+
|
35
|
+
@classmethod
|
36
|
+
def from_evaluation_result(
|
37
|
+
cls, evaluation_result: EvaluationResult
|
38
|
+
) -> "EvaluationResultDto":
|
39
|
+
score_type = evaluation_result.score_type
|
40
|
+
score: float
|
41
|
+
if score_type == ScoreType.BOOLEAN:
|
42
|
+
score = 100 if evaluation_result.score else 0
|
43
|
+
elif score_type == ScoreType.ERROR:
|
44
|
+
score = 0
|
45
|
+
else:
|
46
|
+
score = evaluation_result.score
|
47
|
+
|
48
|
+
return cls(
|
49
|
+
score=score,
|
50
|
+
details=evaluation_result.details,
|
51
|
+
evaluation_time=evaluation_result.evaluation_time,
|
52
|
+
)
|
53
|
+
|
54
|
+
|
55
|
+
class EvaluationRunResultDto(BaseModel):
|
56
|
+
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
57
|
+
|
58
|
+
evaluator_name: str
|
59
|
+
result: EvaluationResultDto
|
60
|
+
|
61
|
+
|
62
|
+
class EvaluationRunResult(BaseModel):
|
63
|
+
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
64
|
+
|
65
|
+
evaluation_name: str
|
66
|
+
evaluation_run_results: List[EvaluationRunResultDto]
|
67
|
+
|
68
|
+
|
69
|
+
class UiPathEvalOutput(BaseModel):
|
70
|
+
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
71
|
+
|
72
|
+
evaluation_set_name: str
|
73
|
+
score: float
|
74
|
+
evaluation_set_results: List[EvaluationRunResult]
|
75
|
+
|
76
|
+
def compute_average_score(self) -> None:
|
77
|
+
total_score = 0.0
|
78
|
+
total_count = 0
|
79
|
+
|
80
|
+
for evaluation_set_result in self.evaluation_set_results:
|
81
|
+
for evaluation_run_result in evaluation_set_result.evaluation_run_results:
|
82
|
+
total_score += evaluation_run_result.result.score
|
83
|
+
total_count += 1
|
84
|
+
|
85
|
+
self.score = total_score / total_count if total_count > 0 else 0.0
|
@@ -1,10 +1,15 @@
|
|
1
|
+
import json
|
1
2
|
from collections import defaultdict
|
3
|
+
from pathlib import Path
|
2
4
|
from time import time
|
3
|
-
from typing import Dict, Generic, List, Optional, Sequence, TypeVar
|
5
|
+
from typing import Any, Dict, Generic, List, Optional, Sequence, TypeVar
|
4
6
|
|
5
7
|
from opentelemetry.sdk.trace import ReadableSpan
|
6
8
|
from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult
|
7
9
|
|
10
|
+
from ...eval.evaluators import BaseEvaluator
|
11
|
+
from ...eval.models import EvaluationResult
|
12
|
+
from ...eval.models.models import AgentExecution
|
8
13
|
from .._runtime._contracts import (
|
9
14
|
UiPathBaseRuntime,
|
10
15
|
UiPathRuntimeContext,
|
@@ -13,8 +18,15 @@ from .._runtime._contracts import (
|
|
13
18
|
UiPathRuntimeStatus,
|
14
19
|
)
|
15
20
|
from .._utils._eval_set import EvalHelpers
|
16
|
-
from .
|
17
|
-
from ._models.
|
21
|
+
from ._evaluator_factory import EvaluatorFactory
|
22
|
+
from ._models._evaluation_set import EvaluationItem, EvaluationSet
|
23
|
+
from ._models._output import (
|
24
|
+
EvaluationResultDto,
|
25
|
+
EvaluationRunResult,
|
26
|
+
EvaluationRunResultDto,
|
27
|
+
UiPathEvalOutput,
|
28
|
+
UiPathEvalRunExecutionOutput,
|
29
|
+
)
|
18
30
|
|
19
31
|
T = TypeVar("T", bound=UiPathBaseRuntime)
|
20
32
|
C = TypeVar("C", bound=UiPathRuntimeContext)
|
@@ -86,15 +98,36 @@ class UiPathEvalRuntime(UiPathBaseRuntime, Generic[T, C]):
|
|
86
98
|
evaluation_set = EvalHelpers.load_eval_set(
|
87
99
|
self.context.eval_set, self.context.eval_ids
|
88
100
|
)
|
89
|
-
|
101
|
+
evaluators = self._load_evaluators(evaluation_set)
|
102
|
+
results = UiPathEvalOutput(
|
103
|
+
evaluation_set_name=evaluation_set.name, score=0, evaluation_set_results=[]
|
104
|
+
)
|
90
105
|
for eval_item in evaluation_set.evaluations:
|
91
|
-
|
92
|
-
|
93
|
-
|
106
|
+
evaluation_run_results = EvaluationRunResult(
|
107
|
+
evaluation_name=eval_item.name, evaluation_run_results=[]
|
108
|
+
)
|
109
|
+
|
110
|
+
results.evaluation_set_results.append(evaluation_run_results)
|
111
|
+
agent_execution_output = await self.execute_runtime(eval_item)
|
112
|
+
# we run each evaluator on the agent_output
|
113
|
+
for evaluator in evaluators:
|
114
|
+
evaluation_result = await self.run_evaluator(
|
115
|
+
evaluator=evaluator,
|
116
|
+
execution_output=agent_execution_output,
|
117
|
+
eval_item=eval_item,
|
118
|
+
)
|
119
|
+
evaluation_run_results.evaluation_run_results.append(
|
120
|
+
EvaluationRunResultDto(
|
121
|
+
evaluator_name=evaluator.name,
|
122
|
+
result=EvaluationResultDto.from_evaluation_result(
|
123
|
+
evaluation_result
|
124
|
+
),
|
125
|
+
)
|
126
|
+
)
|
127
|
+
|
128
|
+
results.compute_average_score()
|
94
129
|
self.context.result = UiPathRuntimeResult(
|
95
|
-
output={
|
96
|
-
"results": execution_output_list,
|
97
|
-
},
|
130
|
+
output={**results.model_dump(by_alias=True)},
|
98
131
|
status=UiPathRuntimeStatus.SUCCESSFUL,
|
99
132
|
)
|
100
133
|
|
@@ -128,6 +161,65 @@ class UiPathEvalRuntime(UiPathBaseRuntime, Generic[T, C]):
|
|
128
161
|
result=result,
|
129
162
|
)
|
130
163
|
|
164
|
+
async def run_evaluator(
|
165
|
+
self,
|
166
|
+
evaluator: BaseEvaluator[Any],
|
167
|
+
execution_output: UiPathEvalRunExecutionOutput,
|
168
|
+
eval_item: EvaluationItem,
|
169
|
+
) -> EvaluationResult:
|
170
|
+
agent_execution = AgentExecution(
|
171
|
+
agent_input=eval_item.inputs,
|
172
|
+
agent_output=execution_output.result.output or {},
|
173
|
+
agent_trace=execution_output.spans,
|
174
|
+
)
|
175
|
+
|
176
|
+
result = await evaluator.evaluate(
|
177
|
+
agent_execution=agent_execution,
|
178
|
+
# at the moment evaluation_criteria is always the expected output
|
179
|
+
evaluation_criteria=eval_item.expected_output,
|
180
|
+
)
|
181
|
+
|
182
|
+
return result
|
183
|
+
|
184
|
+
def _load_evaluators(
|
185
|
+
self, evaluation_set: EvaluationSet
|
186
|
+
) -> List[BaseEvaluator[Any]]:
|
187
|
+
"""Load evaluators referenced by the evaluation set."""
|
188
|
+
evaluators = []
|
189
|
+
evaluators_dir = Path(self.context.eval_set).parent.parent / "evaluators" # type: ignore
|
190
|
+
evaluator_refs = set(evaluation_set.evaluator_refs)
|
191
|
+
found_evaluator_ids = set()
|
192
|
+
|
193
|
+
for file in evaluators_dir.glob("*.json"):
|
194
|
+
try:
|
195
|
+
with open(file, "r", encoding="utf-8") as f:
|
196
|
+
data = json.load(f)
|
197
|
+
except json.JSONDecodeError as e:
|
198
|
+
raise ValueError(
|
199
|
+
f"Invalid JSON in evaluator file '{file}': {str(e)}. "
|
200
|
+
f"Please check the file for syntax errors."
|
201
|
+
) from e
|
202
|
+
|
203
|
+
try:
|
204
|
+
evaluator_id = data.get("id")
|
205
|
+
if evaluator_id in evaluator_refs:
|
206
|
+
evaluator = EvaluatorFactory.create_evaluator(data)
|
207
|
+
evaluators.append(evaluator)
|
208
|
+
found_evaluator_ids.add(evaluator_id)
|
209
|
+
except Exception as e:
|
210
|
+
raise ValueError(
|
211
|
+
f"Failed to create evaluator from file '{file}': {str(e)}. "
|
212
|
+
f"Please verify the evaluator configuration."
|
213
|
+
) from e
|
214
|
+
|
215
|
+
missing_evaluators = evaluator_refs - found_evaluator_ids
|
216
|
+
if missing_evaluators:
|
217
|
+
raise ValueError(
|
218
|
+
f"Could not find the following evaluators: {missing_evaluators}"
|
219
|
+
)
|
220
|
+
|
221
|
+
return evaluators
|
222
|
+
|
131
223
|
async def cleanup(self) -> None:
|
132
224
|
"""Cleanup runtime resources."""
|
133
225
|
pass
|
@@ -125,8 +125,12 @@ class UiPathRuntimeResult(BaseModel):
|
|
125
125
|
|
126
126
|
def to_dict(self) -> Dict[str, Any]:
|
127
127
|
"""Convert to dictionary format for output."""
|
128
|
+
output_data = self.output or {}
|
129
|
+
if isinstance(self.output, BaseModel):
|
130
|
+
output_data = self.output.model_dump()
|
131
|
+
|
128
132
|
result = {
|
129
|
-
"output":
|
133
|
+
"output": output_data,
|
130
134
|
"status": self.status,
|
131
135
|
}
|
132
136
|
|
@@ -595,7 +599,12 @@ class UiPathBaseRuntime(ABC):
|
|
595
599
|
# Write the execution output to file if requested
|
596
600
|
if self.context.execution_output_file:
|
597
601
|
with open(self.context.execution_output_file, "w") as f:
|
598
|
-
|
602
|
+
if isinstance(execution_result.output, BaseModel):
|
603
|
+
f.write(execution_result.output.model_dump())
|
604
|
+
else:
|
605
|
+
json.dump(
|
606
|
+
execution_result.output or {}, f, indent=2, default=str
|
607
|
+
)
|
599
608
|
|
600
609
|
# Don't suppress exceptions
|
601
610
|
return False
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import json
|
2
2
|
import os
|
3
3
|
from functools import wraps
|
4
|
+
from pathlib import PurePath
|
4
5
|
from typing import Any, Callable, List, Optional, Union
|
5
6
|
|
6
7
|
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
@@ -103,7 +104,7 @@ class ProjectFolder(BaseModel):
|
|
103
104
|
return v
|
104
105
|
|
105
106
|
|
106
|
-
class ProjectStructure(
|
107
|
+
class ProjectStructure(ProjectFolder):
|
107
108
|
"""Model representing the complete file structure of a UiPath project.
|
108
109
|
|
109
110
|
Attributes:
|
@@ -114,34 +115,7 @@ class ProjectStructure(BaseModel):
|
|
114
115
|
folder_type: The type of the root folder (optional)
|
115
116
|
"""
|
116
117
|
|
117
|
-
|
118
|
-
validate_by_name=True,
|
119
|
-
validate_by_alias=True,
|
120
|
-
use_enum_values=True,
|
121
|
-
arbitrary_types_allowed=True,
|
122
|
-
extra="allow",
|
123
|
-
)
|
124
|
-
|
125
|
-
id: Optional[str] = Field(default=None, alias="id")
|
126
|
-
name: Optional[str] = Field(default=None, alias="name")
|
127
|
-
folders: List[ProjectFolder] = Field(default_factory=list)
|
128
|
-
files: List[ProjectFile] = Field(default_factory=list)
|
129
|
-
folder_type: Optional[str] = Field(default=None, alias="folderType")
|
130
|
-
|
131
|
-
@field_validator("folder_type", mode="before")
|
132
|
-
@classmethod
|
133
|
-
def convert_folder_type(cls, v: Union[str, int, None]) -> Optional[str]:
|
134
|
-
"""Convert numeric folder type to string.
|
135
|
-
|
136
|
-
Args:
|
137
|
-
v: The value to convert
|
138
|
-
|
139
|
-
Returns:
|
140
|
-
Optional[str]: The converted value or None
|
141
|
-
"""
|
142
|
-
if isinstance(v, int):
|
143
|
-
return str(v)
|
144
|
-
return v
|
118
|
+
pass
|
145
119
|
|
146
120
|
|
147
121
|
class LockInfo(BaseModel):
|
@@ -174,6 +148,33 @@ def get_folder_by_name(
|
|
174
148
|
return None
|
175
149
|
|
176
150
|
|
151
|
+
def resolve_path(
|
152
|
+
folder: ProjectFolder,
|
153
|
+
path: PurePath,
|
154
|
+
) -> ProjectFile | ProjectFolder:
|
155
|
+
"""Resolve a path relative to the folder.
|
156
|
+
|
157
|
+
Args:
|
158
|
+
folder: Project folder
|
159
|
+
path: Path relative to the folder
|
160
|
+
|
161
|
+
Returns: The resolved folder or file. If resolution fails, an assertion is raised.
|
162
|
+
"""
|
163
|
+
root = path.parts
|
164
|
+
while len(root) > 1:
|
165
|
+
child = next(
|
166
|
+
(folder for folder in folder.folders if folder.name == root[0]), None
|
167
|
+
)
|
168
|
+
assert child, "Path not found."
|
169
|
+
folder = child
|
170
|
+
root = root[1:]
|
171
|
+
file = next((f for f in folder.files if f.name == root[0]), None)
|
172
|
+
child = next((folder for folder in folder.folders if folder.name == root[0]), None)
|
173
|
+
resolved = file or child
|
174
|
+
assert resolved, "Path not found."
|
175
|
+
return resolved
|
176
|
+
|
177
|
+
|
177
178
|
class AddedResource(BaseModel):
|
178
179
|
"""Represents a new file to be added during a structural migration."""
|
179
180
|
|