uipath 2.1.52__tar.gz → 2.1.53__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.53}/PKG-INFO +1 -1
- {uipath-2.1.52 → uipath-2.1.53}/pyproject.toml +1 -1
- {uipath-2.1.52/src/uipath/_cli/_evals/_evaluators → uipath-2.1.53/src/uipath/_cli/_evals}/_evaluator_factory.py +24 -23
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_evals/_models/_evaluation_set.py +23 -18
- uipath-2.1.53/src/uipath/_cli/_evals/_models/_evaluator_base_params.py +16 -0
- uipath-2.1.53/src/uipath/_cli/_evals/_models/_output.py +85 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_evals/_runtime.py +102 -10
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_runtime/_contracts.py +12 -3
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_eval_set.py +1 -1
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_eval.py +46 -61
- uipath-2.1.53/src/uipath/eval/evaluators/__init__.py +15 -0
- uipath-2.1.53/src/uipath/eval/evaluators/base_evaluator.py +88 -0
- uipath-2.1.53/src/uipath/eval/evaluators/deterministic_evaluator_base.py +53 -0
- uipath-2.1.53/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.53/src/uipath/eval/evaluators/json_similarity_evaluator.py +23 -40
- uipath-2.1.53/src/uipath/eval/evaluators/llm_as_judge_evaluator.py +137 -0
- uipath-2.1.53/src/uipath/eval/evaluators/trajectory_evaluator.py +36 -0
- uipath-2.1.53/src/uipath/eval/models/__init__.py +19 -0
- uipath-2.1.52/src/uipath/_cli/_evals/_models/_evaluators.py → uipath-2.1.53/src/uipath/eval/models/models.py +67 -43
- uipath-2.1.53/tests/cli/evaluators/test_json_similarity_evaluator.py +233 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_auth.py +148 -148
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_input_args.py +114 -114
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_portal_service_ensure_valid_token.py +334 -334
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_portal_service_refresh_token.py +466 -466
- {uipath-2.1.52 → uipath-2.1.53}/tests/tracing/test_otel_exporters.py +190 -190
- {uipath-2.1.52 → uipath-2.1.53}/tests/tracing/test_span_utils.py +205 -205
- {uipath-2.1.52 → uipath-2.1.53}/tests/tracing/test_traced.py +574 -574
- {uipath-2.1.52 → uipath-2.1.53}/tests/tracing/test_tracing_manager.py +219 -219
- {uipath-2.1.52 → uipath-2.1.53}/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.53}/.cursorrules +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.editorconfig +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.gitattributes +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.github/workflows/cd.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.github/workflows/ci.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.github/workflows/commitlint.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.github/workflows/lint.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.github/workflows/publish-dev.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.github/workflows/publish-docs.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.github/workflows/slack.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.github/workflows/test.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.gitignore +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.pre-commit-config.yaml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.python-version +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.vscode/extensions.json +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.vscode/launch.json +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/.vscode/settings.json +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/CONTRIBUTING.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/LICENSE +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/README.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/CONTRIBUTING.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/FAQ.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/assets/env-preparation-failed-dark.png +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/assets/env-preparation-failed-light.png +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/assets/favicon.png +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/assets/logo-dark.svg +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/assets/logo-light.svg +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/cli/index.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/actions.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/assets/cloud_env_var_dark.gif +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/assets/cloud_env_var_light.gif +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/assets/cloud_env_var_secret_dark.png +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/assets/cloud_env_var_secret_light.png +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/assets/copy_path_dark.png +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/assets/copy_path_light.png +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/assets.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/attachments.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/buckets.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/connections.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/context_grounding.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/environment_variables.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/getting_started.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/jobs.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/llm_gateway.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/processes.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/queues.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/core/traced.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/hooks.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/index.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/javascripts/extra.js +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/overrides/main.html +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/overrides/partials/actions.html +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/overrides/partials/logo.html +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/release_policy.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/sample_images/google-ADK-agent/agent-output.png +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/docs/stylesheets/extra.css +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/justfile +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/mkdocs.yml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/py.typed +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/calculator/README.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/calculator/main.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/calculator/pyproject.toml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/event-trigger/.python-version +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/event-trigger/README.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/event-trigger/main.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/event-trigger/pyproject.toml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/google-ADK-agent/.env.example +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/google-ADK-agent/README.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/google-ADK-agent/input.json +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/google-ADK-agent/multi_tool_agent/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/google-ADK-agent/multi_tool_agent/agent.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/google-ADK-agent/pyproject.toml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/samples/google-ADK-agent/uv.lock +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/scripts/debug_test.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/scripts/lint_httpx_client.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/README.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/_auth_server.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/_auth_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/_client_credentials.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/_models.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/_portal_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/_url_utils.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/_utils.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/auth_config.json +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/index.html +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/localhost.crt +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_auth/localhost.key +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/_components/_chat.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/_components/_details.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/_components/_history.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/_components/_json_input.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/_components/_new.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/_models/_execution.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/_models/_messages.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/_styles/terminal.tcss +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/_utils/_chat.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/_utils/_exporter.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_dev/_terminal/_utils/_logger.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_push/sw_file_handler.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_runtime/_escalation.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_runtime/_hitl.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_runtime/_logging.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_runtime/_runtime.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_runtime/_script_executor.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_templates/.rels.template +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_templates/main.py.template +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_common.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_console.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_constants.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_debug.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_folders.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_input_args.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_processes.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_project_files.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_studio_project.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_tracing.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/_utils/_uv_helpers.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_auth.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_deploy.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_dev.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_init.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_invoke.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_new.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_pack.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_publish.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_pull.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_push.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/cli_run.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/middlewares.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_cli/spinner.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_config.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_execution_context.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_folder_context.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_resources/AGENTS.md +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/_base_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/actions_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/api_client.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/assets_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/attachments_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/buckets_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/connections_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/context_grounding_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/entities_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/folder_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/jobs_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/llm_gateway_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/processes_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_services/queues_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_uipath.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_utils/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_utils/_endpoint.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_utils/_infer_bindings.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_utils/_logs.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_utils/_read_overwrites.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_utils/_request_override.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_utils/_request_spec.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_utils/_ssl_context.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_utils/_url.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_utils/_user_agent.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/_utils/constants.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/agent/conversation/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/agent/conversation/async_stream.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/agent/conversation/citation.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/agent/conversation/content.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/agent/conversation/conversation.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/agent/conversation/event.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/agent/conversation/exchange.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/agent/conversation/message.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/agent/conversation/meta.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/agent/conversation/tool.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/eval/_helpers/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/eval/_helpers/helpers.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/action_schema.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/actions.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/assets.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/attachment.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/buckets.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/connections.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/context_grounding.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/context_grounding_index.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/entities.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/errors.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/exceptions.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/interrupt_models.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/job.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/llm_gateway.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/processes.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/models/queues.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/py.typed +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/telemetry/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/telemetry/_constants.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/telemetry/_track.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/tracing/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/tracing/_otel_exporters.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/tracing/_traced.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/tracing/_utils.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/utils/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/src/uipath/utils/_endpoints_manager.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/__init__.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/conftest.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/mocks/bindings_script.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/mocks/pyproject.toml +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/mocks/simple_script.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/mocks/uipath-mock.json +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/mocks/uipath-simple-script-mock.json +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_hitl.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_init.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_init_agents_md.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_invoke.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_new.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_pack.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_publish.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_pull.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_push.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_run.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/test_utils.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/utils/common.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/utils/project_details.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/cli/utils/uipath_json.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/conftest.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/conftest.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_actions_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_api_client.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_assets_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_attachments_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_base_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_buckets_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_connections_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_context_grounding_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_entities_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_folder_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_jobs_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_llm_integration.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_llm_schema_cleanup.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_llm_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_processes_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_queues_service.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/test_bindings_inference.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/tests/sdk/test_config.py +0 -0
- {uipath-2.1.52 → uipath-2.1.53}/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.53
|
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.53"
|
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
|
|
@@ -315,7 +319,7 @@ class UiPathRuntimeContext(BaseModel):
|
|
315
319
|
chat_handler: Optional[UiPathConversationHandler] = None
|
316
320
|
is_conversational: Optional[bool] = None
|
317
321
|
|
318
|
-
model_config = {"arbitrary_types_allowed": True
|
322
|
+
model_config = {"arbitrary_types_allowed": True}
|
319
323
|
|
320
324
|
@classmethod
|
321
325
|
def with_defaults(cls: type[C], config_path: Optional[str] = None, **kwargs) -> C:
|
@@ -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
|
@@ -2,7 +2,6 @@
|
|
2
2
|
import ast
|
3
3
|
import asyncio
|
4
4
|
import os
|
5
|
-
from datetime import datetime, timezone
|
6
5
|
from typing import List, Optional
|
7
6
|
|
8
7
|
import click
|
@@ -13,7 +12,7 @@ from uipath._cli._runtime._contracts import (
|
|
13
12
|
UiPathRuntimeFactory,
|
14
13
|
)
|
15
14
|
from uipath._cli._runtime._runtime import UiPathScriptRuntime
|
16
|
-
from uipath._cli.middlewares import
|
15
|
+
from uipath._cli.middlewares import Middlewares
|
17
16
|
from uipath.eval._helpers import auto_discover_entrypoint
|
18
17
|
|
19
18
|
from .._utils.constants import ENV_JOB_ID
|
@@ -32,55 +31,6 @@ class LiteralOption(click.Option):
|
|
32
31
|
raise click.BadParameter(value) from e
|
33
32
|
|
34
33
|
|
35
|
-
def eval_agent_middleware(
|
36
|
-
entrypoint: Optional[str] = None,
|
37
|
-
eval_set: Optional[str] = None,
|
38
|
-
eval_ids: Optional[List[str]] = None,
|
39
|
-
workers: int = 8,
|
40
|
-
no_report: bool = False,
|
41
|
-
**kwargs,
|
42
|
-
) -> MiddlewareResult:
|
43
|
-
"""Middleware to run an evaluation set against the agent."""
|
44
|
-
timestamp = datetime.now(timezone.utc).strftime("%M-%H-%d-%m-%Y")
|
45
|
-
|
46
|
-
eval_context = UiPathEvalContext.with_defaults()
|
47
|
-
eval_context.no_report = no_report
|
48
|
-
eval_context.workers = workers
|
49
|
-
eval_context.eval_set = eval_set or EvalHelpers.auto_discover_eval_set()
|
50
|
-
eval_context.eval_ids = eval_ids
|
51
|
-
eval_context.execution_output_file = (
|
52
|
-
f"evals/results/{timestamp}.json" if not os.getenv("UIPATH_JOB_KEY") else None
|
53
|
-
)
|
54
|
-
|
55
|
-
runtime_entrypoint = entrypoint or auto_discover_entrypoint()
|
56
|
-
|
57
|
-
def generate_runtime_context(**context_kwargs) -> UiPathRuntimeContext:
|
58
|
-
runtime_context = UiPathRuntimeContext.with_defaults(**context_kwargs)
|
59
|
-
runtime_context.entrypoint = runtime_entrypoint
|
60
|
-
return runtime_context
|
61
|
-
|
62
|
-
try:
|
63
|
-
runtime_factory = UiPathRuntimeFactory(
|
64
|
-
UiPathScriptRuntime,
|
65
|
-
UiPathRuntimeContext,
|
66
|
-
context_generator=generate_runtime_context,
|
67
|
-
)
|
68
|
-
|
69
|
-
async def execute():
|
70
|
-
async with UiPathEvalRuntime.from_eval_context(
|
71
|
-
factory=runtime_factory, context=eval_context
|
72
|
-
) as eval_runtime:
|
73
|
-
await eval_runtime.execute()
|
74
|
-
|
75
|
-
asyncio.run(execute())
|
76
|
-
return MiddlewareResult(should_continue=False)
|
77
|
-
|
78
|
-
except Exception as e:
|
79
|
-
return MiddlewareResult(
|
80
|
-
should_continue=False, error_message=f"Error running evaluation: {str(e)}"
|
81
|
-
)
|
82
|
-
|
83
|
-
|
84
34
|
@click.command()
|
85
35
|
@click.argument("entrypoint", required=False)
|
86
36
|
@click.argument("eval_set", required=False)
|
@@ -97,6 +47,12 @@ def eval_agent_middleware(
|
|
97
47
|
default=8,
|
98
48
|
help="Number of parallel workers for running evaluations (default: 8)",
|
99
49
|
)
|
50
|
+
@click.option(
|
51
|
+
"--output-file",
|
52
|
+
required=False,
|
53
|
+
type=click.Path(exists=False),
|
54
|
+
help="File path where the output will be written",
|
55
|
+
)
|
100
56
|
@track(when=lambda *_a, **_kw: os.getenv(ENV_JOB_ID) is None)
|
101
57
|
def eval(
|
102
58
|
entrypoint: Optional[str],
|
@@ -104,6 +60,7 @@ def eval(
|
|
104
60
|
eval_ids: List[str],
|
105
61
|
no_report: bool,
|
106
62
|
workers: int,
|
63
|
+
output_file: Optional[str],
|
107
64
|
) -> None:
|
108
65
|
"""Run an evaluation set against the agent.
|
109
66
|
|
@@ -121,21 +78,49 @@ def eval(
|
|
121
78
|
eval_ids,
|
122
79
|
no_report=no_report,
|
123
80
|
workers=workers,
|
81
|
+
execution_output_file=output_file,
|
124
82
|
)
|
125
83
|
|
126
|
-
if result.should_continue:
|
127
|
-
result = eval_agent_middleware(
|
128
|
-
entrypoint=entrypoint,
|
129
|
-
eval_set=eval_set,
|
130
|
-
eval_ids=eval_ids,
|
131
|
-
workers=workers,
|
132
|
-
no_report=no_report,
|
133
|
-
)
|
134
|
-
if result.should_continue:
|
135
|
-
console.error("Could not process the request with any available handler.")
|
136
84
|
if result.error_message:
|
137
85
|
console.error(result.error_message)
|
138
86
|
|
87
|
+
if result.should_continue:
|
88
|
+
|
89
|
+
def generate_runtime_context(**context_kwargs) -> UiPathRuntimeContext:
|
90
|
+
runtime_context = UiPathRuntimeContext.with_defaults(**context_kwargs)
|
91
|
+
runtime_context.entrypoint = runtime_entrypoint
|
92
|
+
return runtime_context
|
93
|
+
|
94
|
+
eval_context = UiPathEvalContext.with_defaults(
|
95
|
+
execution_output_file=output_file
|
96
|
+
)
|
97
|
+
|
98
|
+
eval_context.no_report = no_report
|
99
|
+
eval_context.workers = workers
|
100
|
+
eval_context.eval_set = eval_set or EvalHelpers.auto_discover_eval_set()
|
101
|
+
eval_context.eval_ids = eval_ids
|
102
|
+
|
103
|
+
runtime_entrypoint = entrypoint or auto_discover_entrypoint()
|
104
|
+
|
105
|
+
try:
|
106
|
+
runtime_factory = UiPathRuntimeFactory(
|
107
|
+
UiPathScriptRuntime,
|
108
|
+
UiPathRuntimeContext,
|
109
|
+
context_generator=generate_runtime_context,
|
110
|
+
)
|
111
|
+
|
112
|
+
async def execute():
|
113
|
+
async with UiPathEvalRuntime.from_eval_context(
|
114
|
+
factory=runtime_factory, context=eval_context
|
115
|
+
) as eval_runtime:
|
116
|
+
await eval_runtime.execute()
|
117
|
+
|
118
|
+
asyncio.run(execute())
|
119
|
+
except Exception as e:
|
120
|
+
console.error(
|
121
|
+
f"Error: Unexpected error occurred - {str(e)}", include_traceback=True
|
122
|
+
)
|
123
|
+
|
139
124
|
console.success("Evaluation completed successfully")
|
140
125
|
|
141
126
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"""UiPath evaluator implementations for agent performance evaluation."""
|
2
|
+
|
3
|
+
from .base_evaluator import BaseEvaluator
|
4
|
+
from .exact_match_evaluator import ExactMatchEvaluator
|
5
|
+
from .json_similarity_evaluator import JsonSimilarityEvaluator
|
6
|
+
from .llm_as_judge_evaluator import LlmAsAJudgeEvaluator
|
7
|
+
from .trajectory_evaluator import TrajectoryEvaluator
|
8
|
+
|
9
|
+
__all__ = [
|
10
|
+
"BaseEvaluator",
|
11
|
+
"ExactMatchEvaluator",
|
12
|
+
"JsonSimilarityEvaluator",
|
13
|
+
"LlmAsAJudgeEvaluator",
|
14
|
+
"TrajectoryEvaluator",
|
15
|
+
]
|