Without logic app, how to set up automated notification to remind the OpenAI model's retirement dates

Zhai, Jim 40 Reputation points
2024-11-07T20:51:16.8366667+00:00

I asked a similar question two weeks ago, and the solution you provided is using python, Azure API, and Logic App, which is good. However, for some reasons, the Logic App is not available for us. We are wondering if you can recommend 1-2 different alternative approaches other than using Logic App? Thank you.

Original Question:

"I wanted to set up automated monitoring and notification functions to track and remind the retirement date of the models that I have deployed in the production environment, and send reminder email to specific people three months in advance. However, from my understanding, these retirement dates of models are stored in the model's metadata and not in the logs? I can't find retirement date from "signals" of the monitor/alerts features. It seems like I cannot simply query the retirement dates from the system or from logs, nor can I find this field in the alerts settings.

I would like to ask how I can configure these retirement dates into my alerts, and what should be the easiest way to get those information of retirement dates and setup into automated alerts? Should I do customized logs? please help me."

The following is the link to the original question and solutions: https://video2.skills-academy.com/en-us/answers/questions/2109306/how-to-set-up-automated-notification-to-remind-the#comment-1827905

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,226 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 52,776 Reputation points
    2024-11-07T22:03:03.8066667+00:00

    Hello @Zhai, Jim

    Thanks for reaching out to us, there is an alternative way to set an alert with Azure Function with Timer Trigger + Email Notification.

    As you can get the retirement date from an API call - https://video2.skills-academy.com/en-us/rest/api/aiservices/accountmanagement/models/list?view=rest-aiservices-accountmanagement-2024-10-01&tabs=HTTP#listlocationmodels

    Then you can use an Azure Function with a Timer Trigger to periodically check model metadata and send email reminders. The Timer Trigger can be scheduled to run at specified intervals (e.g., daily or weekly) to check the remaining time until each model's retirement date.

    1. Implementation:
      1. Set up the Azure Function:
        • Configure the Timer Trigger in the Azure Function to run at your desired interval.
        • Call the internal API you set up to store retirement dates
      2. Logic for Retirement Notification:
        • Calculate the difference between the current date and the model’s retirement date.
        • If the difference is within your desired threshold (e.g., 90 days), trigger an email.
      3. Send Email:
        • Use Azure SendGrid (a preferred email service for Azure) or SMTP email directly in the Azure Function to send the reminder email to the designated recipients.

    The document you may want to refer to - https://video2.skills-academy.com/en-us/azure/azure-functions/functions-create-scheduled-function

    Also, you may also considerate to use an Azure Automation Account to run a PowerShell script or Python3 on a regular schedule. The script would check each model’s retirement date and send reminder emails as needed.

    Document for your reference - https://video2.skills-academy.com/en-us/azure/automation/learn/automation-tutorial-runbook-textual-python-3

    Please take a look and let us know how it works, if you meet any new issues during your testing, feel free to create a new thread.

    I hope this helps!

    Regards,

    Yutong

    -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.