Errata

AI-Powered Business Intelligence

Errata for AI-Powered Business Intelligence

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page CH 8-10
CH 8-10

Hello,

I’m running into a couple of problems while exploring the use cases in the book “AI-powered business intelligence” in Azure.

First of all, two of the services in the book are no longer available in Azure since 20th of september 2023:
1. Use case: automating anomaly detection --> anomaly detector in cognitive services
2. Use case: next best action recommendations --> personalizer in cognitive services
3. Logically the above is going to be a problem in CH10

Can you advise/provide alternative solutions for these use cases?

Second, while running the Python script in CH 9 “use case: parsing documents with AI” I’m running into a fault in section 2 “Calling the AI service”: "ComputerVisionOcrErrorExeption: Operation returned an invaled status code "Bad Request"".

As far as I can see I’ve correctly inputted the Azure Cognitive Services Text Analytics Key and Endpoint and Azure Blob Storage Connection String and container names. Can you advice on a solution?

Thanks in advance for your reaction!

Best regards

Note from the Author or Editor:
Azure Anomaly Detector is still available until 2026, see here: azure.microsoft.com/en-us/products/ai-services/ai-anomaly-detector

Azure Cognitive Services Personalizer has been rebranded into AI Personalizer: azure.microsoft.com/en-us/products/ai-services/ai-personalizer

For the error message, it indicated that either the URL, authentication, or the submitted payload isn’t valid. Could you please check the request response for any further error diagnostic?

Anonymous  Oct 19, 2023 
Printed Page 238
238

Thanks for your response regarding the question above. I think I responded anonymously, at least I see no possibility to responde in the previous question, so hopefully this works.

With regard to your response below my response:

Azure Anomaly Detector is still available until 2026, see here: azure.microsoft.com/en-us/products/ai-services/ai-anomaly-detector
--> this seems to be incorrect, even though the service is available until 2026 it isn't possible to create new Anomaly Detector resources
--> text from link you provided above: "Starting on the 20th of September, 2023 you won’t be able to create new Anomaly Detector resources. The Anomaly Detector service is being retired on the 1st of October, 2026."
--> when you try to create a new resource there is a fault stating "Could not create the marketplace item. Gallery item is required, no gallery item is provided."

Azure Cognitive Services Personalizer has been rebranded into AI Personalizer: azure.microsoft.com/en-us/products/ai-services/ai-personalizer
--> Same as above, you state it has been rebranded to "AI personalizer" however according to the link you provided above it's not possible to create new resources
--> text on website "Starting on the 20th of September, 2023 you won’t be able to create new Personalizer resources. The Personalizer service is being retired on the 1st of October, 2026."
--> when you try to create a new resource there is a fault stating "Could not create the marketplace item. Gallery item is required, no gallery item is provided."

--> The fault "Could not create the marketplace item. Gallery item is required, no gallery item is provided." only seems to occur with the services on which the website states that it is nog possible to create new resources as of 20th of september 2023, so both the services above but also the Metrics advisor. There are a few others such as the Language Understanding and QnA maker (classic) that er beeing retired but for both these services there is explicitly stated that a new er version is available which is not the case for personalizer, anomoly detector and metrics advisor.

For the error message, it indicated that either the URL, authentication, or the submitted payload isn’t valid. Could you please check the request response for any further error diagnostic?

--> in more detail the following information is provided:
---------------------------------------------------------------------------
ComputerVisionOcrErrorException Traceback (most recent call last)
Cell In[3], line 7
5 for file in files:
6 filepath = AZURE_INPUT_CONTAINER + "/" + file
----> 7 results.append(document_analysis(filepath, computervision_client))
8 time.sleep(6) # To not exceed free tier limit of 20 calls per minute

Cell In[1], line 78, in document_analysis(filepath, computervision_client)
75 file = open(filepath, "rb")
77 # Call the POST API that performs image analysis
---> 78 read_response = computervision_client.read_in_stream(file, raw=True)
80 # Close file
81 file.close()

File /anaconda/envs/jupyter_env/lib/python3.8/site-packages/azure/cognitiveservices/vision/computervision/operations/_computer_vision_client_operations.py:1709, in ComputerVisionClientOperationsMixin.read_in_stream(self, image, language, pages, model_version, reading_order, custom_headers, raw, callback, **operation_config)
1706 response = self._client.send(request, stream=False, **operation_config)
1708 if response.status_code not in [202]:
-> 1709 raise models.ComputerVisionOcrErrorException(self._deserialize, response)
1711 if raw:
1712 client_raw_response = ClientRawResponse(None, response)

ComputerVisionOcrErrorException: Operation returned an invalid status code 'Bad Request'

Thanks again for your response!

Note from the Author or Editor:
You're right, Azure Anomaly Detector and Personalizer are sunsetting and not accepting new signups. Your best option would be to switch to a similar product from a different vendor, here are two examples:
- AWS Personalize: https://aws.amazon.com/personalize/
- AWS Lookout for metrics: https://aws.amazon.com/lookout-for-metrics/

Author will reach out directly to further troubleshoot the code error, as the code shown in the book still seems to work for him.

Cyriel Cauberg  Nov 30, 2023