Metrics Advisor Readme and samples issues #15845
Labels
Client
This issue points to a problem in the data-plane of the library.
Cognitive - Metrics Advisor
Docs
test-manual-pass
Section link:
Note: Other section codes in Readme examples have
Question 1
.Reason:
1).NameError: name 'os' is not defined.
2).NameError: name 'datatime' is not defined.
3).NameError: name 'DataFeedMissingDataPointFillSettings' is not defined.
Suggestion:
1).Add code:
import os
2).Add code:
import datetime
3).Add code:
from azure.ai.metricsadvisor.models import DataFeedMissingDataPointFillSettings
2.
Section Link:
Suggestion:
Remove
import datetime
, because not use it in this code snippet.3.
Section link:
Reason:
if len(alerts) > 0:
TypeError: object of type 'ItemPaged' has no len().
Suggestion:
Update
to:
Section link:
Reason:
TypeError: sample_list_alerts_async() missing 1 required positional argument: 'alert_config_id'.
Suggestion:
Update to:
alerts = await sample_list_alerts_async(alert_config.id)
5.
Section link:
Suggestion:
Add
async
before "def".6.
Section link:
Suggestion:
1).We should import
MetricsAdvisorClient
fromazure.ai.metricsadvisor.aio
.Update to
2).Update to :
result = await client.get_feedback(feedback_id=feedback_id)
@jongio for notification.
The text was updated successfully, but these errors were encountered: