{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# AzureAI \n", "\n", "> The foundational models for time series by Nixtla can be deployed on your Azure subscription. This page explains how to easily get started with TimeGEN-1 deployed as an Azure AI endpoint. If you use the `nixtla` library, it should be a drop-in replacement where you only need to change the client parameters (endpoint URL, API key, model name)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Deploying TimeGEN-1\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Using the model\n", "\n", "Once your model is deployed and provided that you have the relevant permissions, consuming it will basically be the same process as for a Nixtla endpoint.\n", "\n", "To run the examples below, you will need to define the following environment variables:\n", "\n", "- `AZURE_AI_NIXTLA_BASE_URL` is your api URL, should be of the form `https://your-endpoint.inference.ai.azure.com/`.\n", "- `AZURE_AI_NIXTLA_API_KEY` is your authentication key." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## How to use" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Just import the library, set your credentials, and start forecasting in two lines of code!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "```bash\n", "pip install nixtla\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "```python\n", "import os\n", "from nixtla import NixtlaClient\n", "\n", "base_url = os.environ[\"AZURE_AI_NIXTLA_BASE_URL\"]\n", "api_key = os.environ[\"AZURE_AI_NIXTLA_API_KEY\"]\n", "model = \"azureai\"\n", "\n", "nixtla_client = NixtlaClient(api_key=api_key, base_url=base_url)\n", "nixtla_client.forecast(\n", " ...,\n", " model=model,\n", ")\n", "```" ] } ], "metadata": { "kernelspec": { "display_name": "python3", "language": "python", "name": "python3" } }, "nbformat": 4, "nbformat_minor": 4 }