Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[textanalytics] adjust analyze tests for new service behavior #18498

Merged
merged 1 commit into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ interactions:
true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks":
[{"parameters": {"model-version": "bad", "loggingOptOut": false}}], "entityLinkingTasks":
[{"parameters": {"model-version": "bad", "loggingOptOut": false, "stringIndexType":
"UnicodeCodePoint"}}]}, "analysisInput": {"documents": [{"id": "1", "text":
"I did not like the hotel we stayed at.", "language": "english"}]}}'
"UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version":
"bad", "loggingOptOut": false, "opinionMining": false}}]}, "analysisInput":
{"documents": [{"id": "1", "text": "I did not like the hotel we stayed at.",
"language": "english"}]}}'
headers:
Accept:
- application/json, text/json
Content-Length:
- '627'
- '745'
Content-Type:
- application/json
User-Agent:
Expand All @@ -25,13 +27,13 @@ interactions:
bad is not supported for model-version parameter for job task type KeyPhraseExtraction.
Supported values latest,2019-10-01,2020-07-01."}}'
headers:
apim-request-id: 2d5df423-bd89-4c03-aff7-d078b896d355
apim-request-id: b5168c3b-fed4-4e5f-8c32-16446a1c0320
content-type: application/json; charset=utf-8
date: Tue, 27 Apr 2021 19:36:52 GMT
date: Tue, 04 May 2021 01:20:19 GMT
strict-transport-security: max-age=31536000; includeSubDomains; preload
transfer-encoding: chunked
x-content-type-options: nosniff
x-envoy-upstream-service-time: '14'
x-envoy-upstream-service-time: '5'
status:
code: 400
message: Bad Request
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
interactions:
- request:
body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version":
"bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], "entityRecognitionPiiTasks":
[{"parameters": {"model-version": "latest", "loggingOptOut": true, "stringIndexType":
"UnicodeCodePoint"}}], "keyPhraseExtractionTasks": [{"parameters": {"model-version":
"latest", "loggingOptOut": false}}], "entityLinkingTasks": []}, "analysisInput":
"latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}],
"entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut":
true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks":
[{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks":
[{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType":
"UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version":
"latest", "loggingOptOut": false, "opinionMining": false}}]}, "analysisInput":
{"documents": [{"id": "56", "text": ":)", "language": "en"}, {"id": "0", "text":
":(", "language": "en"}, {"id": "19", "text": ":P", "language": "en"}, {"id":
"1", "text": ":D", "language": "en"}]}}'
headers:
Accept:
- application/json, text/json
Content-Length:
- '623'
- '853'
Content-Type:
- application/json
User-Agent:
Expand All @@ -21,19 +24,127 @@ interactions:
uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze
response:
body:
string: '{"error":{"code":"InvalidRequest","message":"Job task parameter value
bad is not supported for model-version parameter for job task type NamedEntityRecognition.
Supported values latest,2020-04-01,2021-01-15."}}'
string: ''
headers:
apim-request-id: ccbde512-e278-4170-aa3e-32b28ef7c38e
content-type: application/json; charset=utf-8
date: Tue, 27 Apr 2021 19:37:16 GMT
apim-request-id: f44e6412-0daf-4e19-a565-efd3069dfc38
date: Tue, 04 May 2021 01:18:45 GMT
operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze/jobs/5f7c3672-7eb9-485e-a5eb-b8b9ae224df8
strict-transport-security: max-age=31536000; includeSubDomains; preload
transfer-encoding: chunked
x-content-type-options: nosniff
x-envoy-upstream-service-time: '16'
x-envoy-upstream-service-time: '5482'
status:
code: 400
message: Bad Request
code: 202
message: Accepted
url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.5/analyze
- request:
body: null
headers:
User-Agent:
- azsdk-python-ai-textanalytics/5.1.0b7 Python/3.9.0 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze/jobs/5f7c3672-7eb9-485e-a5eb-b8b9ae224df8
response:
body:
string: '{"jobId":"5f7c3672-7eb9-485e-a5eb-b8b9ae224df8","lastUpdateDateTime":"2021-05-04T01:18:48Z","createdDateTime":"2021-05-04T01:18:40Z","expirationDateTime":"2021-05-05T01:18:40Z","status":"running","errors":[],"displayName":"NA","tasks":{"details":{"name":"NA","lastUpdateDateTime":"2021-05-04T01:18:48Z"},"completed":1,"failed":0,"inProgress":4,"total":5,"entityLinkingTasks":[{"lastUpdateDateTime":"2021-05-04T01:18:47.8333045Z","name":"NA","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}}]}}'
headers:
apim-request-id: 54094ec0-5867-4de7-ab3d-4c8b35dab2e0
content-type: application/json; charset=utf-8
date: Tue, 04 May 2021 01:18:50 GMT
strict-transport-security: max-age=31536000; includeSubDomains; preload
transfer-encoding: chunked
x-content-type-options: nosniff
x-envoy-upstream-service-time: '64'
status:
code: 200
message: OK
url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze/jobs/5f7c3672-7eb9-485e-a5eb-b8b9ae224df8
- request:
body: null
headers:
User-Agent:
- azsdk-python-ai-textanalytics/5.1.0b7 Python/3.9.0 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze/jobs/5f7c3672-7eb9-485e-a5eb-b8b9ae224df8
response:
body:
string: '{"jobId":"5f7c3672-7eb9-485e-a5eb-b8b9ae224df8","lastUpdateDateTime":"2021-05-04T01:18:48Z","createdDateTime":"2021-05-04T01:18:40Z","expirationDateTime":"2021-05-05T01:18:40Z","status":"running","errors":[],"displayName":"NA","tasks":{"details":{"name":"NA","lastUpdateDateTime":"2021-05-04T01:18:48Z"},"completed":1,"failed":0,"inProgress":4,"total":5,"entityLinkingTasks":[{"lastUpdateDateTime":"2021-05-04T01:18:47.8333045Z","name":"NA","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}}]}}'
headers:
apim-request-id: aa3a0179-be88-4b98-bbc5-25a5f5cb40c4
content-type: application/json; charset=utf-8
date: Tue, 04 May 2021 01:18:56 GMT
strict-transport-security: max-age=31536000; includeSubDomains; preload
transfer-encoding: chunked
x-content-type-options: nosniff
x-envoy-upstream-service-time: '70'
status:
code: 200
message: OK
url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze/jobs/5f7c3672-7eb9-485e-a5eb-b8b9ae224df8
- request:
body: null
headers:
User-Agent:
- azsdk-python-ai-textanalytics/5.1.0b7 Python/3.9.0 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze/jobs/5f7c3672-7eb9-485e-a5eb-b8b9ae224df8
response:
body:
string: '{"jobId":"5f7c3672-7eb9-485e-a5eb-b8b9ae224df8","lastUpdateDateTime":"2021-05-04T01:18:48Z","createdDateTime":"2021-05-04T01:18:40Z","expirationDateTime":"2021-05-05T01:18:40Z","status":"running","errors":[],"displayName":"NA","tasks":{"details":{"name":"NA","lastUpdateDateTime":"2021-05-04T01:18:48Z"},"completed":1,"failed":0,"inProgress":4,"total":5,"entityLinkingTasks":[{"lastUpdateDateTime":"2021-05-04T01:18:47.8333045Z","name":"NA","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}}]}}'
headers:
apim-request-id: 5c21c43b-9220-4dc6-ae12-db12f88e942c
content-type: application/json; charset=utf-8
date: Tue, 04 May 2021 01:19:01 GMT
strict-transport-security: max-age=31536000; includeSubDomains; preload
transfer-encoding: chunked
x-content-type-options: nosniff
x-envoy-upstream-service-time: '113'
status:
code: 200
message: OK
url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze/jobs/5f7c3672-7eb9-485e-a5eb-b8b9ae224df8
- request:
body: null
headers:
User-Agent:
- azsdk-python-ai-textanalytics/5.1.0b7 Python/3.9.0 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze/jobs/5f7c3672-7eb9-485e-a5eb-b8b9ae224df8
response:
body:
string: '{"jobId":"5f7c3672-7eb9-485e-a5eb-b8b9ae224df8","lastUpdateDateTime":"2021-05-04T01:18:48Z","createdDateTime":"2021-05-04T01:18:40Z","expirationDateTime":"2021-05-05T01:18:40Z","status":"running","errors":[],"displayName":"NA","tasks":{"details":{"name":"NA","lastUpdateDateTime":"2021-05-04T01:18:48Z"},"completed":1,"failed":0,"inProgress":4,"total":5,"entityLinkingTasks":[{"lastUpdateDateTime":"2021-05-04T01:18:47.8333045Z","name":"NA","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}}]}}'
headers:
apim-request-id: 4016d2c3-3b26-427c-bba6-f3bc8d58bd36
content-type: application/json; charset=utf-8
date: Tue, 04 May 2021 01:19:06 GMT
strict-transport-security: max-age=31536000; includeSubDomains; preload
transfer-encoding: chunked
x-content-type-options: nosniff
x-envoy-upstream-service-time: '51'
status:
code: 200
message: OK
url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze/jobs/5f7c3672-7eb9-485e-a5eb-b8b9ae224df8
- request:
body: null
headers:
User-Agent:
- azsdk-python-ai-textanalytics/5.1.0b7 Python/3.9.0 (Windows-10-10.0.19041-SP0)
method: GET
uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze/jobs/5f7c3672-7eb9-485e-a5eb-b8b9ae224df8
response:
body:
string: '{"jobId":"5f7c3672-7eb9-485e-a5eb-b8b9ae224df8","lastUpdateDateTime":"2021-05-04T01:19:11Z","createdDateTime":"2021-05-04T01:18:40Z","expirationDateTime":"2021-05-05T01:18:40Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"details":{"name":"NA","lastUpdateDateTime":"2021-05-04T01:19:11Z"},"completed":5,"failed":0,"inProgress":0,"total":5,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-05-04T01:19:08.4566521Z","name":"NA","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-05-04T01:18:47.8333045Z","name":"NA","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-05-04T01:19:08.3743987Z","name":"NA","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-05-04T01:19:06.7419176Z","name":"NA","state":"succeeded","results":{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-05-04T01:19:11.175578Z","name":"NA","state":"succeeded","results":{"documents":[{"id":"56","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}'
headers:
apim-request-id: c88cff9e-2209-45da-b03c-2453474a8338
content-type: application/json; charset=utf-8
date: Tue, 04 May 2021 01:19:11 GMT
strict-transport-security: max-age=31536000; includeSubDomains; preload
transfer-encoding: chunked
x-content-type-options: nosniff
x-envoy-upstream-service-time: '226'
status:
code: 200
message: OK
url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.5/analyze/jobs/5f7c3672-7eb9-485e-a5eb-b8b9ae224df8
version: 1
Loading