forked from microsoft/promptflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[promptflow] Hide additional info & debug info when list runs (micros…
…oft#1384) # Description This PR targets to hide `additionalInfo` and `debugInfo` when list runs (pf/pfazure), so that we can have more clean run list experience; otherwise, one failed run may print a long and not useful stacktrace. This PR also applies a little update on email sanitization, it will only sanitize `<username>@microsoft.com` to avoid mis-sanitize something like `@tool`. # All Promptflow Contribution checklist: - [x] **The pull request does not introduce [breaking changes].** - [x] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [x] **I have read the [contribution guidelines](../CONTRIBUTING.md).** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#suggested-workflow).** ## General Guidelines and Best Practices - [x] Title of the pull request is clear and informative. - [x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [x] Pull request includes test coverage for the included changes.
- Loading branch information
1 parent
6cc2bcb
commit a49f779
Showing
8 changed files
with
273 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
232 changes: 232 additions & 0 deletions
232
...t_configs/recordings/test_run_operations_TestFlowRun_test_failed_run_to_dict_exclude.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,232 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- promptflow-sdk/0.0.1 promptflow/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 | ||
Python/3.10.13 (Windows-10-10.0.22631-SP0) | ||
method: GET | ||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000 | ||
response: | ||
body: | ||
string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000", | ||
"name": "00000", "type": "Microsoft.MachineLearningServices/workspaces", "location": | ||
"eastus", "tags": {}, "etag": null, "kind": "Default", "sku": {"name": "Basic", | ||
"tier": "Basic"}, "properties": {"discoveryUrl": "https://eastus.api.azureml.ms/discovery"}}' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-length: | ||
- '3630' | ||
content-type: | ||
- application/json; charset=utf-8 | ||
expires: | ||
- '-1' | ||
pragma: | ||
- no-cache | ||
strict-transport-security: | ||
- max-age=31536000; includeSubDomains | ||
vary: | ||
- Accept-Encoding | ||
x-cache: | ||
- CONFIG_NOCACHE | ||
x-content-type-options: | ||
- nosniff | ||
x-request-time: | ||
- '0.029' | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- promptflow-sdk/0.0.1 promptflow/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 | ||
Python/3.10.13 (Windows-10-10.0.22631-SP0) | ||
method: GET | ||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores?count=30&isDefault=true&orderByAsc=false | ||
response: | ||
body: | ||
string: '{"value": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", | ||
"name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", | ||
"properties": {"description": null, "tags": null, "properties": null, "isDefault": | ||
true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": | ||
null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": | ||
"00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", | ||
"containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": | ||
"https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, | ||
"systemData": {"createdAt": "2023-04-08T02:53:06.5886442+00:00", "createdBy": | ||
"779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": | ||
"2023-04-08T02:53:07.521127+00:00", "lastModifiedBy": "779301c0-18b2-4cdc-801b-a0a3368fee0a", | ||
"lastModifiedByType": "Application"}}]}' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-length: | ||
- '1372' | ||
content-type: | ||
- application/json; charset=utf-8 | ||
expires: | ||
- '-1' | ||
pragma: | ||
- no-cache | ||
strict-transport-security: | ||
- max-age=31536000; includeSubDomains | ||
vary: | ||
- Accept-Encoding | ||
x-cache: | ||
- CONFIG_NOCACHE | ||
x-content-type-options: | ||
- nosniff | ||
x-request-time: | ||
- '0.205' | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: '{"runId": "3dfd077a-f071-443e-9c4e-d41531710950", "selectRunMetadata": | ||
true, "selectRunDefinition": true, "selectJobSpecification": true}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '137' | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- python-requests/2.31.0 | ||
method: POST | ||
uri: https://eastus.api.azureml.ms/history/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/rundata | ||
response: | ||
body: | ||
string: '{"runMetadata": {"runNumber": 1689673888, "rootRunId": "fd68a549-2027-4f0f-9f21-adc39cc86c94", | ||
"createdUtc": "2023-07-18T09:51:28.1405441+00:00", "createdBy": {"userObjectId": | ||
"c05e0746-e125-4cb3-9213-a8b535eacd79", "userPuId": "10032000324F7449", "userIdp": | ||
null, "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", | ||
"userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "Honglin | ||
Du", "upn": null}, "userId": "c05e0746-e125-4cb3-9213-a8b535eacd79", "token": | ||
null, "tokenExpiryTimeUtc": null, "error": {"error": {"code": "UserError", | ||
"severity": null, "message": "Input ''question'' in line 0 is not provided | ||
for flow ''Simple_mock_answer''.", "messageFormat": "", "messageParameters": | ||
{}, "referenceCode": "Executor", "detailsUri": null, "target": null, "details": | ||
[], "innerError": {"code": "ValidationError", "innerError": {"code": "InvalidFlowRequest", | ||
"innerError": {"code": "InputNotFound", "innerError": null}}}, "debugInfo": | ||
{"type": "InputNotFound", "message": null, "stackTrace": "Traceback (most | ||
recent call last):\n File \"/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/executor.py\", | ||
line 243, in exec_request_raw\n return self._route_request_raw(raw_request, | ||
raise_ex=raise_ex)\n File \"/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/executor.py\", | ||
line 316, in _route_request_raw\n return self._exec_batch_request(\n File | ||
\"/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/executor.py\", | ||
line 393, in _exec_batch_request\n run_infos = self._exec_batch_request_inner(\n File | ||
\"/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/executor.py\", | ||
line 654, in _exec_batch_request_inner\n batch_inputs = FlowRequestValidator.ensure_batch_inputs_type(batch_request.flow, | ||
batch_request.batch_inputs)\n File \"/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/flow_request_validator.py\", | ||
line 99, in ensure_batch_inputs_type\n return [cls.ensure_flow_inputs_type(flow, | ||
inputs, idx) for idx, inputs in enumerate(batch_inputs)]\n File \"/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/flow_request_validator.py\", | ||
line 99, in <listcomp>\n return [cls.ensure_flow_inputs_type(flow, inputs, | ||
idx) for idx, inputs in enumerate(batch_inputs)]\n File \"/azureml-envs/prompt-flow/runtime/lib/python3.9/site-packages/promptflow/executor/flow_request_validator.py\", | ||
line 192, in ensure_flow_inputs_type\n raise InputNotFound(\npromptflow.executor.flow_request_validator.InputNotFound: | ||
Input ''question'' in line 0 is not provided for flow ''Simple_mock_answer''.\n", | ||
"innerException": null, "data": null, "errorResponse": null}, "additionalInfo": | ||
null}, "correlation": null, "environment": null, "location": null, "time": | ||
"2023-07-18T09:51:31.441881+00:00", "componentName": "promptflow/20230710.v2"}, | ||
"warnings": null, "revision": 4, "statusRevision": 2, "runUuid": "555c524f-0fa8-47d7-bf0b-cc6db82ab734", | ||
"parentRunUuid": "01cdc8fe-2bfd-40be-817c-7ae28282e7a7", "rootRunUuid": "01cdc8fe-2bfd-40be-817c-7ae28282e7a7", | ||
"lastStartTimeUtc": null, "currentComputeTime": null, "computeDuration": "00:00:00.4131767", | ||
"effectiveStartTimeUtc": null, "lastModifiedBy": {"userObjectId": "c05e0746-e125-4cb3-9213-a8b535eacd79", | ||
"userPuId": "10032000324F7449", "userIdp": null, "userAltSecId": null, "userIss": | ||
"https://sts.windows.net/00000000-0000-0000-0000-000000000000/", "userTenantId": | ||
"00000000-0000-0000-0000-000000000000", "userName": "Honglin Du", "upn": null}, | ||
"lastModifiedUtc": "2023-07-18T09:51:28.1405441+00:00", "duration": "00:00:00.4131767", | ||
"cancelationReason": null, "currentAttemptId": 1, "runId": "3dfd077a-f071-443e-9c4e-d41531710950", | ||
"parentRunId": "fd68a549-2027-4f0f-9f21-adc39cc86c94", "experimentId": "64956f20-fc4f-4b13-aa32-8c52f722b94f", | ||
"status": "Failed", "startTimeUtc": "2023-07-18T09:51:31.2748721+00:00", "endTimeUtc": | ||
"2023-07-18T09:51:31.6880488+00:00", "scheduleId": null, "displayName": "Simple_mock_answer-bulktest-variant_0-fd68a549-2027-4f0f-9f21-adc39cc86c94", | ||
"name": null, "dataContainerId": "dcid.3dfd077a-f071-443e-9c4e-d41531710950", | ||
"description": "", "hidden": false, "runType": "azureml.promptflow.FlowRun", | ||
"runTypeV2": {"orchestrator": null, "traits": [], "attribution": null, "computeType": | ||
"MIR_v2"}, "properties": {"azureml.promptflow.flow_id": "6f0d05fd-2cc1-495a-be6d-c60c3f3b1f14", | ||
"azureml.promptflow.flow_type": "Default", "azureml.promptflow.variant_id": | ||
"variant_0", "azureml.promptflow.baseline_variant_run_id": "3dfd077a-f071-443e-9c4e-d41531710950", | ||
"azureml.promptflow.bulk_test_id": "fd68a549-2027-4f0f-9f21-adc39cc86c94", | ||
"azureml.promptflow.flow_experiment_id": "3e123da1-f9a5-4c91-9234-8d9ffbb39ff5", | ||
"azureml.promptflow.runtime_name": "demo-mir", "azureml.promptflow.runtime_version": | ||
"20230710.v2"}, "parameters": {}, "actionUris": {}, "scriptName": null, "target": | ||
null, "uniqueChildRunComputeTargets": [], "tags": {}, "settings": {}, "services": | ||
{}, "inputDatasets": [], "outputDatasets": [], "runDefinition": null, "jobSpecification": | ||
null, "primaryMetricName": null, "createdFrom": null, "cancelUri": null, "completeUri": | ||
null, "diagnosticsUri": null, "computeRequest": null, "compute": null, "retainForLifetimeOfWorkspace": | ||
null, "queueingInfo": null, "inputs": null, "outputs": null}, "runDefinition": | ||
{"Nodes": [{"Name": "hello_prompt", "Tool": "hello_prompt", "Comment": null, | ||
"Inputs": {}, "Api": null, "Provider": null, "Connection": null, "Module": | ||
null, "Reduce": false}, {"Name": "echo_my_prompt", "Tool": "echo_my_prompt", | ||
"Comment": null, "Inputs": {"input1": "${hello_prompt.output}"}, "Api": null, | ||
"Provider": null, "Connection": null, "Module": null, "Reduce": false}], "Tools": | ||
[{"Name": "hello_prompt", "Type": "prompt", "Inputs": {"question": {"Name": | ||
null, "Type": ["string"], "Default": null, "Description": null, "Enum": null, | ||
"enabled_by": null, "enabled_by_type": null, "model_list": null, "Capabilities": | ||
null}}, "Outputs": null, "Description": null, "connection_type": null, "Module": | ||
null, "class_name": null, "Source": null, "LkgCode": "Q: {{question}}", "Code": | ||
"Q: {{question}}", "Function": null, "action_type": null, "provider_config": | ||
null, "function_config": null, "is_builtin": false, "package": null, "package_version": | ||
null}, {"Name": "echo_my_prompt", "Type": "python", "Inputs": {"input1": {"Name": | ||
"input1", "Type": ["string"], "Default": null, "Description": null, "Enum": | ||
null, "enabled_by": null, "enabled_by_type": null, "model_list": null, "Capabilities": | ||
null}}, "Outputs": null, "Description": null, "connection_type": null, "Module": | ||
null, "class_name": null, "Source": null, "LkgCode": "from promptflow import | ||
tool\nimport time\nimport sys\n# The inputs section will change based on the | ||
arguments of the tool function, after you save the code\n# Adding type to | ||
arguments and return value will help the system show the types properly\n# | ||
Please update the function name/signature per need\n\n\n@tool\ndef my_python_tool(input1: | ||
str) -> str:\n print(f\"@@@ My input data is {input1}...\")\n sys.stderr.write(f\"### | ||
This is an error message {input1}\") \n return \"Prompt: \" + input1\n", | ||
"Code": "from promptflow import tool\nimport time\nimport sys\n# The inputs | ||
section will change based on the arguments of the tool function, after you | ||
save the code\n# Adding type to arguments and return value will help the system | ||
show the types properly\n# Please update the function name/signature per need\n\n\n@tool\ndef | ||
my_python_tool(input1: str) -> str:\n print(f\"@@@ My input data is {input1}...\")\n sys.stderr.write(f\"### | ||
This is an error message {input1}\") \n return \"Prompt: \" + input1\n", | ||
"Function": "my_python_tool", "action_type": null, "provider_config": null, | ||
"function_config": null, "is_builtin": false, "package": null, "package_version": | ||
null}], "Codes": null, "Inputs": {"question": {"Name": null, "Type": "string", | ||
"Default": null, "Description": null, "is_chat_input": false}}, "Outputs": | ||
{"output_prompt": {"Name": null, "Type": "string", "Description": null, "Reference": | ||
"${echo_my_prompt.output}", "evaluation_only": false, "is_chat_output": false}}}, | ||
"jobSpecification": null, "systemSettings": null}' | ||
headers: | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '10114' | ||
content-type: | ||
- application/json; charset=utf-8 | ||
strict-transport-security: | ||
- max-age=15724800; includeSubDomains; preload | ||
transfer-encoding: | ||
- chunked | ||
vary: | ||
- Accept-Encoding | ||
x-content-type-options: | ||
- nosniff | ||
x-request-time: | ||
- '0.112' | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |