Git Product home page Git Product logo

phoenix-on-azure's Introduction

Deploy Phoenix to Azure

Open in GitHub Codespaces Open in Dev Containers

Phoenix provides MLOps and LLMOps insights at lightning speed with zero-config observability. Phoenix provides a notebook-first experience for monitoring your models and LLM Applications by providing:

Example Image

  • LLM Traces - Trace through the execution of your LLM Application to understand the internals of your LLM Application and to troubleshoot problems related to things like retrieval and tool execution.
  • LLM Evals - Leverage the power of large language models to evaluate your generative model or application's relevance, toxicity, and more. Embedding Analysis - Explore embedding point-clouds and identify clusters of high drift and performance degradation.
  • RAG Analysis - Visualize your generative application's search and retrieval process to identify problems and improve your RAG pipeline. Structured Data Analysis - Statistically analyze your structured data by performing A/B analysis, temporal drift analysis, and more.

Example Image

Example Image

Table of contents:

Getting Started

You have a few options for getting started with this template. The quickest way to get started is GitHub Codespaces, since it will setup all the tools for you, but you can also set it up locally. You can also use a VS Code dev container

GitHub Codespaces

You can run this template virtually by using GitHub Codespaces. The button will open a web-based VS Code instance in your browser:

  1. Open the template (this may take several minutes) Open in GitHub Codespaces

  2. Open a terminal window

  3. Sign into your Azure account:

     azd auth login --use-device-code
  4. Provision the Azure resources and deploy your code:

    azd config set alpha.resourceGroupDeployments on
    # azd env set PERSISTENCE true
    azd provision
  5. To view the endpoint, follow the "Phoenix UI link"

  6. Optionally, you can configure a CI/CD pipeline:

    azd pipeline config

VS Code Dev Containers

A related option is VS Code Dev Containers, which will open the project in your local VS Code using the Dev Containers extension:

  1. Start Docker Desktop (install it if not already installed)

  2. Open the project: Open in Dev Containers

  3. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window.

  4. Sign into your Azure account:

     azd auth login
  5. Provision the Azure resources and deploy your code:

    azd config set alpha.resourceGroupDeployments on
    # azd env set PERSISTENCE true
    azd provision
  6. To view the endpoint, follow the "Phoenix UI link"

  7. Optionally, you can configure a CI/CD pipeline:

    azd pipeline config

Local Environment

Prerequisites

Quickstart

  1. Run this command to download the project code:

    azd init -t Arize-ai/phoenix-on-azure

    Note: this command will initialize a git repository, so you do not need to clone this repository.

  2. Create a Python virtual environment and install the required packages:

    pip install -r requirements.txt
  3. Sign into your Azure account:

     azd auth login
  4. Create a new azd environment:

    azd env new

    Enter a name that will be used for the resource group. This will create a new folder in the .azure folder, and set it as the active environment for any calls to azd going forward.

  5. Run this command to provision all the resources:

    If you want your data to be persisted between deployments, you can set the PERSISTENCE environment variable to true before running the provision command.

    azd config set alpha.resourceGroupDeployments on
    # azd env set PERSISTENCE true
    azd provision

    This will create a new resource group, and create the Azure Container App and PostgreSQL Flexible server inside that group. It will use the init.sh and post.sh hooks to set up default secrets, and pass the necessary environment variables to the Azure Container App.

  6. In order to deploy this template, you will need to turn on the resource group scoped deployments alpha feature. Learn more about azd's feature versioning strategy.

    azd config set alpha.resourceGroupDeployments on
  7. If you want your data to be persisted between deployments, you can set the PERSISTENCE environment variable to true before running the up command:

    azd env set PERSISTENCE true
  8. Provision and deploy the project to Azure:

    azd up

    This will create a new resource group, and create the Azure Container App and PostgreSQL Flexible server inside that group. It will use the init.sh and post.sh hooks to set up default secrets, and pass the necessary environment variables to the Azure Container App.

  9. To view the endpoint, follow the "Phoenix UI link"

  10. Optionally, you can configure a CI/CD pipeline:

    azd pipeline config

Guidance

Costs

You can estimate the cost of this project's architecture with Azure's pricing calculator

  • Azure Container Apps - Consumption tier pricing
  • Azure Monitor - Pay-as-you-go tier pricing

Disclaimer

Phoenix is an external project and is not affiliated with Microsoft.

phoenix-on-azure's People

Contributors

abalam666 avatar gkulin avatar jlopatec avatar kristenwomack avatar loopingz avatar vhvb1989 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

phoenix-on-azure's Issues

[Auto] AI Gallery Standard Validation FAILED

AI Gallery Standard Validation: FAILED

Repository Management:

README.md File. [How to fix?]
  • Error: ## Features is missing in README.md.
  • Error: ## Resources is missing in README.md.
✔️ LICENSE.md File.
SECURITY.md File. [How to fix?]
  • Error: SECURITY.md file is missing.
CODE_OF_CONDUCT.md File. [How to fix?]
  • Error: CODE_OF_CONDUCT.md file is missing.
CONTRIBUTING.md File. [How to fix?]
  • Error: CONTRIBUTING.md file is missing.
ISSUE_TEMPLATE.md File. [How to fix?]
  • Error: ISSUE_TEMPLATE.md file is missing.
Topics on repo contains ['azd-templates', 'ai-azd-templates']. [How to fix?]
  • Error: azd-templates is missing in topics.
  • Error: ai-azd-templates is missing in topics.

Source code structure and conventions:

azure-dev.yaml File. [How to fix?]
  • Error: azure-dev.yaml file is missing.
✔️ azure.yaml File.
✔️ infra Folder.
✔️ .devcontainer Folder.

Functional Requirements:

azd up. [How to fix?]

Error: Downloading Bicep
(✓) Done: Downloading Bicep
Initialize bicep provider

azd down. [How to fix?]

Error:
Deleting all resources and deployed code on Azure (azd down)
Local application code is not deleted when running 'azd down'.

Initialize bicep provider
Enter a value for the 'databasePassword' infrastructure secured parameter:Enter a value for the 'htpasswd' infrastructure parameter:
ERROR: initializing provisioning manager: resource group scoped deployments are currently under alpha support and need to be explicitly enabled. Run azd config set alpha.resourceGroupDeployments on to enable this feature.

Security Requirements:

⚠️ microsoft/security-devops-action is integrated to the CI/CD pipeline. [How to fix?]

Not found security check related actions in the CI/CD pipeline.

⚠️ Security scan. [How to fix?]
  • error: AZR-000363 - Container apps environments allows you to expose your container app to the Internet.
    Container apps environments deployed as external resources are available for public requests. External environments are deployed with a virtual IP on an external, public facing IP address.
    Disable public network access to improve security by exposing the Container Apps environment through an internal load balancer.
    This removes the need for a public IP address and prevents internet access to all Container Apps within the environment.
    To provide secure access, instead consider using an Application Gateway or Azure Front Door premium in front of your Container Apps on your private VNET.

  • error: AZR-000361 - Using managed identities have the following benefits:

  • Your app connects to resources with the managed identity. You don't need to manage credentials in your container app.

  • You can use role-based access control to grant specific permissions to a managed identity.

  • System-assigned identities are automatically created and managed. They're deleted when your container app is deleted.

  • You can add and delete user-assigned identities and assign them to multiple resources. They're independent of your container app's life cycle.

  • You can use managed identity to authenticate with a private Azure Container Registry without a username and password to pull containers for your Container App.

  • You can use managed identity to create connections for Dapr-enabled applications via Dapr components.

  • warning: AZR-000390 - Azure Database for PostgreSQL supports authentication with PostgreSQL logins and Azure AD authentication.
    By default, authentication with PostgreSQL logins is enabled. PostgreSQL logins are unable to provide sufficient protection for identities. Azure AD authentication provides strong protection controls including conditional access, identity governance, and privileged identity management.
    Once you decide to use Azure AD authentication, you can disable authentication with PostgreSQL logins.
    Azure AD-only authentication is only supported for the flexible server deployment model.

How to fix?

The full Definition of Done of the AI-Gallery template and fix approached can be found HERE.

Data is not persisted

Hi Team,

I have deployed this but i see data is not persisted and i see my data is lost every time in login to the UI in 12 hours . How can i make this persistent ?

Thanks
Mano

Password entry required?

I was surprised to get prompted for two passwords. Could those parameters default to empty strings, so that there's no prompt?

You could change main.bicep like so:

@secure()
param databasePassword string = ''
Screenshot 2024-07-11 at 2 55 17 PM

readme updates

remove

  • pip install
  • azd env new

add

  • turn on resource group scoped deployments (azd config set alpha.resourceGroupDeployments on)

When I was running azd provision I was prompted for

- Enter a value for the 'databasePassword' infrastructure secured parameter
- Enter a value for the 'htpasswd' infrastructure parameter

is this what we want? If so we should mention them in the readme

Run the command `azd provision` fail in Codespace and Dev Containers

Describe the issue:
When run azd provision in Codespace and Dev Containers, the error is as follows:
image

Repro Steps:

  1. Open the project: Open in Codespace or Dev Containers
  2. Run azd auth login --use-device-code
  3. Run azd config set alpha.resourceGroupDeployments on
  4. Run azd provision

Environment:

  • Azd version: azd version 1.9.5 (commit cd2b7af9995d358aab33c782614f801ac1997dde)
  • OS: Codespace ,VS Code Dev Containers

Expected behavior:
Run azd provision successfully.

@jongio and @loopingz and @abalam666 for notification.

Run the command `azd pipeline config` fail

Describe the issue:
When run azd pipeline config , the result was successful in terminal, but there is no workflow on GitHub.
image
image

Repro Steps:

  1. Open the project
  2. Run azd auth login
  3. Run azd pipeline config

Environment:

  • Azd version: azd version 1.9.5 (commit cd2b7af9995d358aab33c782614f801ac1997dde)
  • OS: Codespace ,VS Code Dev Containers,Local

Expected behavior:
Run azd pipeline config successfully and there is some workflow running on GitHub.

@jongio and @loopingz and @abalam666 for notification.

Can shell script use python3 only?

I'm on a Mac, and my python command doesn't actually work, due to a poorly setup alias. The python3 command always works, however. We only use python3 in our .sh scripts in other azd templates, so I wonder if that'd be possible? Or are there Windows environments running the shell scripts that don't have python3?

Readme link issue

Describe the issue:
The link of the Open in Github Codespace and DEV CONTAINERS is error.
When clicking the button in the following image,
image

image

it will redirect to the page shown in the following image:

image

Suggestion:
Add linkhttps://github.com/codespaces/new/arize-ai/phoenix-on-azure to Open in Github Codespace.
Add linkhttps://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/arize-ai/phoenix-on-azure to DEV CONTAINERS.

@jongio and @loopingz and @abalam666 for notification.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.