From 3233da87ab348aaa9803c1361f57e775d0c3f3e1 Mon Sep 17 00:00:00 2001 From: "Priyanka Singhal (Persistent Systems Inc)" Date: Tue, 8 Apr 2025 14:30:02 +0530 Subject: [PATCH 1/6] Replace standard with globalstandard and updated quota check document --- docs/quota_check.md | 12 +++-- infra/scripts/checkquota_km.sh | 4 +- infra/scripts/quota_check_params.sh | 75 ++++++++--------------------- 3 files changed, 30 insertions(+), 61 deletions(-) diff --git a/docs/quota_check.md b/docs/quota_check.md index 7778edbf2..e47e63ef9 100644 --- a/docs/quota_check.md +++ b/docs/quota_check.md @@ -63,12 +63,16 @@ The final table lists regions with available quota. You can select any of these 1. Open the terminal in VS Code or Codespaces. 2. If you're using VS Code, click the dropdown on the right side of the terminal window, and select `Git Bash`. ![git_bash](images/git_bash.png) -3. Navigate to the `scripts` folder where the script files are located and make the script as executable: +3. Log in to your Azure account (if not already logged in): + ```sh + az login + ``` +4. Navigate to the `scripts` folder where the script files are located and make the script as executable: ```sh cd infra/scripts chmod +x quota_check_params.sh ``` -4. Run the appropriate script based on your requirement: +5. Run the appropriate script based on your requirement: **To check quota for the deployment** @@ -77,10 +81,10 @@ The final table lists regions with available quota. You can select any of these ``` - Refer to [Input Formats](#input-formats) for detailed commands. -5. If you see the error `_bash: az: command not found_`, install Azure CLI: +6. If you see the error `_bash: az: command not found_`, install Azure CLI: ```sh curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash az login ``` -6. Rerun the script after installing Azure CLI. +7. Rerun the script after installing Azure CLI. diff --git a/infra/scripts/checkquota_km.sh b/infra/scripts/checkquota_km.sh index b622bd262..438f4b230 100644 --- a/infra/scripts/checkquota_km.sh +++ b/infra/scripts/checkquota_km.sh @@ -32,8 +32,8 @@ echo "✅ Azure subscription set successfully." # Define models and their minimum required capacities declare -A MIN_CAPACITY=( - ["OpenAI.Standard.gpt-4o-mini"]=$GPT_MIN_CAPACITY #km generic - ["OpenAI.Standard.text-embedding-ada-002"]=$TEXT_EMBEDDING_MIN_CAPACITY #km generic + ["OpenAI.GlobalStandard.gpt-4o-mini"]=$GPT_MIN_CAPACITY #km generic + ["OpenAI.GlobalStandard.text-embedding-ada-002"]=$TEXT_EMBEDDING_MIN_CAPACITY #km generic ) VALID_REGION="" diff --git a/infra/scripts/quota_check_params.sh b/infra/scripts/quota_check_params.sh index 2673e689e..4fafae470 100644 --- a/infra/scripts/quota_check_params.sh +++ b/infra/scripts/quota_check_params.sh @@ -99,25 +99,21 @@ echo "✅ Retrieved Azure regions. Checking availability..." INDEX=1 VALID_REGIONS=() -for REGION in "${REGIONS[@]}"; do - echo "----------------------------------------" - echo "🔍 Checking region: $REGION" +TABLE_ROWS=() +for REGION in "${REGIONS[@]}"; do QUOTA_INFO=$(az cognitiveservices usage list --location "$REGION" --output json | tr '[:upper:]' '[:lower:]') if [ -z "$QUOTA_INFO" ]; then - echo "⚠️ WARNING: Failed to retrieve quota for region $REGION. Skipping." continue fi + TEMP_TABLE_ROWS=() TEXT_EMBEDDING_AVAILABLE=false AT_LEAST_ONE_MODEL_AVAILABLE=false - TEMP_TABLE_ROWS=() for index in "${!FINAL_MODEL_NAMES[@]}"; do MODEL_NAME="${FINAL_MODEL_NAMES[$index]}" REQUIRED_CAPACITY="${FINAL_CAPACITIES[$index]}" - FOUND=false - INSUFFICIENT_QUOTA=false if [ "$MODEL_NAME" = "text-embedding-ada-002" ]; then MODEL_TYPES=("openai.standard.$MODEL_NAME") @@ -126,65 +122,34 @@ for REGION in "${REGIONS[@]}"; do fi for MODEL_TYPE in "${MODEL_TYPES[@]}"; do - FOUND=false - INSUFFICIENT_QUOTA=false - echo "🔍 Checking model: $MODEL_NAME with required capacity: $REQUIRED_CAPACITY ($MODEL_TYPE)" - - MODEL_INFO=$(echo "$QUOTA_INFO" | awk -v model="\"value\": \"$MODEL_TYPE\"" ' - BEGIN { RS="},"; FS="," } - $0 ~ model { print $0 } - ') - - if [ -z "$MODEL_INFO" ]; then - FOUND=false - echo "⚠️ WARNING: No quota information found for model: $MODEL_NAME in region: $REGION for model type: $MODEL_TYPE." - continue - fi + MODEL_INFO=$(echo "$QUOTA_INFO" | awk -v model="\"value\": \"$MODEL_TYPE\"" 'BEGIN { RS="},"; FS="," } $0 ~ model { print $0 }') + if [ -z "$MODEL_INFO" ]; then continue; fi - if [ -n "$MODEL_INFO" ]; then - FOUND=true - CURRENT_VALUE=$(echo "$MODEL_INFO" | awk -F': ' '/"currentvalue"/ {print $2}' | tr -d ',' | tr -d ' ') - LIMIT=$(echo "$MODEL_INFO" | awk -F': ' '/"limit"/ {print $2}' | tr -d ',' | tr -d ' ') - - CURRENT_VALUE=${CURRENT_VALUE:-0} - LIMIT=${LIMIT:-0} - - CURRENT_VALUE=$(echo "$CURRENT_VALUE" | cut -d'.' -f1) - LIMIT=$(echo "$LIMIT" | cut -d'.' -f1) - - AVAILABLE=$((LIMIT - CURRENT_VALUE)) - echo "✅ Model: $MODEL_TYPE | Used: $CURRENT_VALUE | Limit: $LIMIT | Available: $AVAILABLE" - - if [ "$AVAILABLE" -ge "$REQUIRED_CAPACITY" ]; then - FOUND=true - if [ "$MODEL_NAME" = "text-embedding-ada-002" ]; then - TEXT_EMBEDDING_AVAILABLE=true - fi - AT_LEAST_ONE_MODEL_AVAILABLE=true - TEMP_TABLE_ROWS+=("$(printf "| %-4s | %-20s | %-43s | %-10s | %-10s | %-10s |" "$INDEX" "$REGION" "$MODEL_TYPE" "$LIMIT" "$CURRENT_VALUE" "$AVAILABLE")") - else - INSUFFICIENT_QUOTA=true + CURRENT_VALUE=$(echo "$MODEL_INFO" | awk -F': ' '/"currentvalue"/ {print $2}' | tr -d ', ' | cut -d'.' -f1) + LIMIT=$(echo "$MODEL_INFO" | awk -F': ' '/"limit"/ {print $2}' | tr -d ', ' | cut -d'.' -f1) + + CURRENT_VALUE=${CURRENT_VALUE:-0} + LIMIT=${LIMIT:-0} + AVAILABLE=$((LIMIT - CURRENT_VALUE)) + + if [ "$AVAILABLE" -ge "$REQUIRED_CAPACITY" ]; then + if [ "$MODEL_NAME" = "text-embedding-ada-002" ]; then + TEXT_EMBEDDING_AVAILABLE=true fi - fi - - if [ "$FOUND" = false ]; then - echo "❌ No models found for model: $MODEL_NAME in region: $REGION (${MODEL_TYPES[*]})" - elif [ "$INSUFFICIENT_QUOTA" = true ]; then - echo "⚠️ Model $MODEL_NAME in region: $REGION has insufficient quota (${MODEL_TYPES[*]})." + AT_LEAST_ONE_MODEL_AVAILABLE=true + TEMP_TABLE_ROWS+=("$(printf "| %-4s | %-20s | %-43s | %-10s | %-10s | %-10s |" "$INDEX" "$REGION" "$MODEL_TYPE" "$LIMIT" "$CURRENT_VALUE" "$AVAILABLE")") fi done done -if { [ "$IS_USER_PROVIDED_PAIRS" = true ] && [ "$INSUFFICIENT_QUOTA" = false ] && [ "$FOUND" = true ]; } || { [ "$TEXT_EMBEDDING_AVAILABLE" = true ] && { [ "$APPLY_OR_CONDITION" != true ] || [ "$AT_LEAST_ONE_MODEL_AVAILABLE" = true ]; }; }; then + if { [ "$IS_USER_PROVIDED_PAIRS" = true ] && [ "$INSUFFICIENT_QUOTA" = false ]; } || + { [ "$TEXT_EMBEDDING_AVAILABLE" = true ] && { [ "$APPLY_OR_CONDITION" != true ] || [ "$AT_LEAST_ONE_MODEL_AVAILABLE" = true ]; }; }; then VALID_REGIONS+=("$REGION") TABLE_ROWS+=("${TEMP_TABLE_ROWS[@]}") - INDEX=$((INDEX + 1)) - elif [ ${#USER_PROVIDED_PAIRS[@]} -eq 0 ]; then - echo "🚫 Skipping $REGION as it does not meet quota requirements." fi - done + if [ ${#TABLE_ROWS[@]} -eq 0 ]; then echo "--------------------------------------------------------------------------------------------------------------------" From da3c84f39aecb8d78d7682d6c93c025ca1e0a6f4 Mon Sep 17 00:00:00 2001 From: "Priyanka Singhal (Persistent Systems Inc)" Date: Tue, 8 Apr 2025 14:56:31 +0530 Subject: [PATCH 2/6] commented out echo statement --- infra/scripts/quota_check_params.sh | 79 +++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/infra/scripts/quota_check_params.sh b/infra/scripts/quota_check_params.sh index 4fafae470..0a0960a53 100644 --- a/infra/scripts/quota_check_params.sh +++ b/infra/scripts/quota_check_params.sh @@ -99,21 +99,25 @@ echo "✅ Retrieved Azure regions. Checking availability..." INDEX=1 VALID_REGIONS=() -TABLE_ROWS=() - for REGION in "${REGIONS[@]}"; do + echo "----------------------------------------" + echo "🔍 Checking region: $REGION" + QUOTA_INFO=$(az cognitiveservices usage list --location "$REGION" --output json | tr '[:upper:]' '[:lower:]') if [ -z "$QUOTA_INFO" ]; then + echo "⚠️ WARNING: Failed to retrieve quota for region $REGION. Skipping." continue fi - TEMP_TABLE_ROWS=() TEXT_EMBEDDING_AVAILABLE=false AT_LEAST_ONE_MODEL_AVAILABLE=false + TEMP_TABLE_ROWS=() for index in "${!FINAL_MODEL_NAMES[@]}"; do MODEL_NAME="${FINAL_MODEL_NAMES[$index]}" REQUIRED_CAPACITY="${FINAL_CAPACITIES[$index]}" + FOUND=false + INSUFFICIENT_QUOTA=false if [ "$MODEL_NAME" = "text-embedding-ada-002" ]; then MODEL_TYPES=("openai.standard.$MODEL_NAME") @@ -122,33 +126,66 @@ for REGION in "${REGIONS[@]}"; do fi for MODEL_TYPE in "${MODEL_TYPES[@]}"; do - MODEL_INFO=$(echo "$QUOTA_INFO" | awk -v model="\"value\": \"$MODEL_TYPE\"" 'BEGIN { RS="},"; FS="," } $0 ~ model { print $0 }') - if [ -z "$MODEL_INFO" ]; then continue; fi - - CURRENT_VALUE=$(echo "$MODEL_INFO" | awk -F': ' '/"currentvalue"/ {print $2}' | tr -d ', ' | cut -d'.' -f1) - LIMIT=$(echo "$MODEL_INFO" | awk -F': ' '/"limit"/ {print $2}' | tr -d ', ' | cut -d'.' -f1) - - CURRENT_VALUE=${CURRENT_VALUE:-0} - LIMIT=${LIMIT:-0} - AVAILABLE=$((LIMIT - CURRENT_VALUE)) + FOUND=false + INSUFFICIENT_QUOTA=false + # echo "🔍 Checking model: $MODEL_NAME with required capacity: $REQUIRED_CAPACITY ($MODEL_TYPE)" + + MODEL_INFO=$(echo "$QUOTA_INFO" | awk -v model="\"value\": \"$MODEL_TYPE\"" ' + BEGIN { RS="},"; FS="," } + $0 ~ model { print $0 } + ') + + if [ -z "$MODEL_INFO" ]; then + FOUND=false + # echo "⚠️ WARNING: No quota information found for model: $MODEL_NAME in region: $REGION for model type: $MODEL_TYPE." + continue + fi - if [ "$AVAILABLE" -ge "$REQUIRED_CAPACITY" ]; then - if [ "$MODEL_NAME" = "text-embedding-ada-002" ]; then - TEXT_EMBEDDING_AVAILABLE=true + if [ -n "$MODEL_INFO" ]; then + FOUND=true + CURRENT_VALUE=$(echo "$MODEL_INFO" | awk -F': ' '/"currentvalue"/ {print $2}' | tr -d ',' | tr -d ' ') + LIMIT=$(echo "$MODEL_INFO" | awk -F': ' '/"limit"/ {print $2}' | tr -d ',' | tr -d ' ') + + CURRENT_VALUE=${CURRENT_VALUE:-0} + LIMIT=${LIMIT:-0} + + CURRENT_VALUE=$(echo "$CURRENT_VALUE" | cut -d'.' -f1) + LIMIT=$(echo "$LIMIT" | cut -d'.' -f1) + + AVAILABLE=$((LIMIT - CURRENT_VALUE)) + # echo "✅ Model: $MODEL_TYPE | Used: $CURRENT_VALUE | Limit: $LIMIT | Available: $AVAILABLE" + + if [ "$AVAILABLE" -ge "$REQUIRED_CAPACITY" ]; then + FOUND=true + if [ "$MODEL_NAME" = "text-embedding-ada-002" ]; then + TEXT_EMBEDDING_AVAILABLE=true + fi + AT_LEAST_ONE_MODEL_AVAILABLE=true + TEMP_TABLE_ROWS+=("$(printf "| %-4s | %-20s | %-43s | %-10s | %-10s | %-10s |" "$INDEX" "$REGION" "$MODEL_TYPE" "$LIMIT" "$CURRENT_VALUE" "$AVAILABLE")") + else + INSUFFICIENT_QUOTA=true fi - AT_LEAST_ONE_MODEL_AVAILABLE=true - TEMP_TABLE_ROWS+=("$(printf "| %-4s | %-20s | %-43s | %-10s | %-10s | %-10s |" "$INDEX" "$REGION" "$MODEL_TYPE" "$LIMIT" "$CURRENT_VALUE" "$AVAILABLE")") + fi + + if [ "$FOUND" = false ]; then + # echo "❌ No models found for model: $MODEL_NAME in region: $REGION (${MODEL_TYPES[*]})" + : + elif [ "$INSUFFICIENT_QUOTA" = true ]; then + : + # echo "⚠️ Model $MODEL_NAME in region: $REGION has insufficient quota (${MODEL_TYPES[*]})." fi done done - if { [ "$IS_USER_PROVIDED_PAIRS" = true ] && [ "$INSUFFICIENT_QUOTA" = false ]; } || - { [ "$TEXT_EMBEDDING_AVAILABLE" = true ] && { [ "$APPLY_OR_CONDITION" != true ] || [ "$AT_LEAST_ONE_MODEL_AVAILABLE" = true ]; }; }; then +if { [ "$IS_USER_PROVIDED_PAIRS" = true ] && [ "$INSUFFICIENT_QUOTA" = false ] && [ "$FOUND" = true ]; } || { [ "$TEXT_EMBEDDING_AVAILABLE" = true ] && { [ "$APPLY_OR_CONDITION" != true ] || [ "$AT_LEAST_ONE_MODEL_AVAILABLE" = true ]; }; }; then VALID_REGIONS+=("$REGION") TABLE_ROWS+=("${TEMP_TABLE_ROWS[@]}") + INDEX=$((INDEX + 1)) + elif [ ${#USER_PROVIDED_PAIRS[@]} -eq 0 ]; then + echo "🚫 Skipping $REGION as it does not meet quota requirements." fi -done +done if [ ${#TABLE_ROWS[@]} -eq 0 ]; then echo "--------------------------------------------------------------------------------------------------------------------" @@ -165,4 +202,4 @@ else echo "➡️ To request a quota increase, visit: https://aka.ms/oai/stuquotarequest" fi -echo "✅ Script completed." +echo "✅ Script completed." \ No newline at end of file From b34445bdf26d58683f6d98a2754c213c44b21dbd Mon Sep 17 00:00:00 2001 From: "Priyanka Singhal (Persistent Systems Inc)" Date: Tue, 8 Apr 2025 18:10:35 +0530 Subject: [PATCH 3/6] added --verbose feature in script --- infra/scripts/quota_check_params.sh | 69 ++++++++++++++++++++++++----- 1 file changed, 57 insertions(+), 12 deletions(-) diff --git a/infra/scripts/quota_check_params.sh b/infra/scripts/quota_check_params.sh index 0a0960a53..6929bd736 100644 --- a/infra/scripts/quota_check_params.sh +++ b/infra/scripts/quota_check_params.sh @@ -1,4 +1,50 @@ #!/bin/bash +# VERBOSE=false + +MODELS="" +REGIONS="" +VERBOSE=false + +while [[ $# -gt 0 ]]; do + case "$1" in + --models) + MODELS="$2" + shift 2 + ;; + --regions) + REGIONS="$2" + shift 2 + ;; + --verbose) + VERBOSE=true + shift + ;; + *) + echo "Unknown option: $1" + exit 1 + ;; + esac +done + +# Fallback to defaults if not provided +[[ -z "$MODELS" ]] +[[ -z "$REGIONS" ]] + +echo "Models: $MODELS" +echo "Regions: $REGIONS" +echo "Verbose: $VERBOSE" + +for arg in "$@"; do + if [ "$arg" = "--verbose" ]; then + VERBOSE=true + fi +done + +log_verbose() { + if [ "$VERBOSE" = true ]; then + echo "$1" + fi +} # Default Models and Capacities (Comma-separated in "model:capacity" format) DEFAULT_MODEL_CAPACITY="gpt-4o:30,gpt-4o-mini:30,gpt-4:30,text-embedding-ada-002:80" @@ -51,8 +97,8 @@ DEFAULT_REGIONS="eastus,uksouth,eastus2,northcentralus,swedencentral,westus,west IFS=',' read -r -a DEFAULT_REGION_ARRAY <<< "$DEFAULT_REGIONS" # Read parameters (if any) -IFS=',' read -r -a USER_PROVIDED_PAIRS <<< "$1" -USER_REGION="$2" +IFS=',' read -r -a USER_PROVIDED_PAIRS <<< "$MODELS" +USER_REGION="$REGIONS" IS_USER_PROVIDED_PAIRS=false @@ -100,12 +146,12 @@ INDEX=1 VALID_REGIONS=() for REGION in "${REGIONS[@]}"; do - echo "----------------------------------------" - echo "🔍 Checking region: $REGION" + log_verbose "----------------------------------------" + log_verbose "🔍 Checking region: $REGION" QUOTA_INFO=$(az cognitiveservices usage list --location "$REGION" --output json | tr '[:upper:]' '[:lower:]') if [ -z "$QUOTA_INFO" ]; then - echo "⚠️ WARNING: Failed to retrieve quota for region $REGION. Skipping." + log_verbose "⚠️ WARNING: Failed to retrieve quota for region $REGION. Skipping." continue fi @@ -128,7 +174,7 @@ for REGION in "${REGIONS[@]}"; do for MODEL_TYPE in "${MODEL_TYPES[@]}"; do FOUND=false INSUFFICIENT_QUOTA=false - # echo "🔍 Checking model: $MODEL_NAME with required capacity: $REQUIRED_CAPACITY ($MODEL_TYPE)" + log_verbose "🔍 Checking model: $MODEL_NAME with required capacity: $REQUIRED_CAPACITY ($MODEL_TYPE)" MODEL_INFO=$(echo "$QUOTA_INFO" | awk -v model="\"value\": \"$MODEL_TYPE\"" ' BEGIN { RS="},"; FS="," } @@ -137,7 +183,7 @@ for REGION in "${REGIONS[@]}"; do if [ -z "$MODEL_INFO" ]; then FOUND=false - # echo "⚠️ WARNING: No quota information found for model: $MODEL_NAME in region: $REGION for model type: $MODEL_TYPE." + log_verbose "⚠️ WARNING: No quota information found for model: $MODEL_NAME in region: $REGION for model type: $MODEL_TYPE." continue fi @@ -153,7 +199,7 @@ for REGION in "${REGIONS[@]}"; do LIMIT=$(echo "$LIMIT" | cut -d'.' -f1) AVAILABLE=$((LIMIT - CURRENT_VALUE)) - # echo "✅ Model: $MODEL_TYPE | Used: $CURRENT_VALUE | Limit: $LIMIT | Available: $AVAILABLE" + log_verbose "✅ Model: $MODEL_TYPE | Used: $CURRENT_VALUE | Limit: $LIMIT | Available: $AVAILABLE" if [ "$AVAILABLE" -ge "$REQUIRED_CAPACITY" ]; then FOUND=true @@ -168,11 +214,10 @@ for REGION in "${REGIONS[@]}"; do fi if [ "$FOUND" = false ]; then - # echo "❌ No models found for model: $MODEL_NAME in region: $REGION (${MODEL_TYPES[*]})" - : + log_verbose "❌ No models found for model: $MODEL_NAME in region: $REGION (${MODEL_TYPES[*]})" + elif [ "$INSUFFICIENT_QUOTA" = true ]; then - : - # echo "⚠️ Model $MODEL_NAME in region: $REGION has insufficient quota (${MODEL_TYPES[*]})." + log_verbose "⚠️ Model $MODEL_NAME in region: $REGION has insufficient quota (${MODEL_TYPES[*]})." fi done done From 5807700b9afe542457c738ccd35f7e0fe99887b7 Mon Sep 17 00:00:00 2001 From: "Priyanka Singhal (Persistent Systems Inc)" Date: Mon, 14 Apr 2025 17:26:32 +0530 Subject: [PATCH 4/6] updated Readme --- docs/quota_check.md | 46 ++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/docs/quota_check.md b/docs/quota_check.md index e47e63ef9..c85dbae17 100644 --- a/docs/quota_check.md +++ b/docs/quota_check.md @@ -1,6 +1,15 @@ ## Check Quota Availability Before Deployment Before deploying the accelerator, **ensure sufficient quota availability** for the required model. +> **For Global Standard | GPT-4o - the capacity to at least 150k tokens post-deployment for optimal performance.** + +> **For Standard | GPT-4 - ensure a minimum of 30k–40k tokens for best results.** + +### Login if you have not done so already +``` +azd auth login +``` + ### 📌 Default Models & Capacities: ``` @@ -15,33 +24,40 @@ eastus, uksouth, eastus2, northcentralus, swedencentral, westus, westus2, southc - Only model(s) provided → The script will check for those models in the default regions. - Only region(s) provided → The script will check default models in the specified regions. - Both models and regions provided → The script will check those models in the specified regions. +- `--verbose` passed → Enables detailed logging output for debugging and traceability. ### **Input Formats** -✔️ Run without parameters to check default models & regions: +> Use the --models, --regions, and --verbose options for parameter handling: + +✔️ Run without parameters to check default models & regions without verbose logging: ``` ./quota_check_params.sh ``` -✔️ Model name and required capacity in the format: +✔️ Enable verbose logging: + ``` + ./quota_check_params.sh --verbose + ``` +✔️ Check specific model(s) in default regions: ``` - ./quota_check_params.sh gpt-4o:30 + ./quota_check_params.sh --models gpt-4o:30,text-embedding-ada-002:80 ``` -✔️ Multiple models can be passed, separated by commas: +✔️ Check default models in specific region(s): ``` - ./quota_check_params.sh gpt-4o:30,text-embedding-ada-002:80 +./quota_check_params.sh --regions eastus,westus ``` ✔️ Passing Both models and regions: ``` - ./quota_check_params.sh gpt-4o:30 eastus,westus2 + ./quota_check_params.sh --models gpt-4o:30 --regions eastus,westus2 ``` -✔️ Check default models in specific regions: +✔️ All parameters combined: ``` - ./quota_check_params.sh "" eastus,westus2 + ./quota_check_params.sh --models gpt-4:30,text-embedding-ada-002:80 --regions eastus,westus --verbose ``` ### **Sample Output** The final table lists regions with available quota. You can select any of these regions for deployment. -![quota-check-ouput](Images/quota-check-output.png) +![quota-check-ouput](images/quota-check-output.png) --- ### **If using Azure Portal and Cloud Shell** @@ -63,16 +79,12 @@ The final table lists regions with available quota. You can select any of these 1. Open the terminal in VS Code or Codespaces. 2. If you're using VS Code, click the dropdown on the right side of the terminal window, and select `Git Bash`. ![git_bash](images/git_bash.png) -3. Log in to your Azure account (if not already logged in): - ```sh - az login - ``` -4. Navigate to the `scripts` folder where the script files are located and make the script as executable: +3. Navigate to the `scripts` folder where the script files are located and make the script as executable: ```sh cd infra/scripts chmod +x quota_check_params.sh ``` -5. Run the appropriate script based on your requirement: +4. Run the appropriate script based on your requirement: **To check quota for the deployment** @@ -81,10 +93,10 @@ The final table lists regions with available quota. You can select any of these ``` - Refer to [Input Formats](#input-formats) for detailed commands. -6. If you see the error `_bash: az: command not found_`, install Azure CLI: +5. If you see the error `_bash: az: command not found_`, install Azure CLI: ```sh curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash az login ``` -7. Rerun the script after installing Azure CLI. +6. Rerun the script after installing Azure CLI. \ No newline at end of file From d74e841f58cf71f306659e86a44cb0b6e2d2bc58 Mon Sep 17 00:00:00 2001 From: "Priyanka Singhal (Persistent Systems Inc)" Date: Mon, 14 Apr 2025 20:03:27 +0530 Subject: [PATCH 5/6] updated readme --- docs/quota_check.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/quota_check.md b/docs/quota_check.md index c85dbae17..327f8bf21 100644 --- a/docs/quota_check.md +++ b/docs/quota_check.md @@ -57,7 +57,7 @@ eastus, uksouth, eastus2, northcentralus, swedencentral, westus, westus2, southc ### **Sample Output** The final table lists regions with available quota. You can select any of these regions for deployment. -![quota-check-ouput](images/quota-check-output.png) +![quota-check-ouput](Images/quota-check-output.png) --- ### **If using Azure Portal and Cloud Shell** @@ -78,7 +78,7 @@ The final table lists regions with available quota. You can select any of these ### **If using VS Code or Codespaces** 1. Open the terminal in VS Code or Codespaces. 2. If you're using VS Code, click the dropdown on the right side of the terminal window, and select `Git Bash`. - ![git_bash](images/git_bash.png) + ![git_bash](Images/git_bash.png) 3. Navigate to the `scripts` folder where the script files are located and make the script as executable: ```sh cd infra/scripts From bf4b77852d47bfb17a0029921b997f923bdb6b39 Mon Sep 17 00:00:00 2001 From: Roopan-Microsoft <168007406+Roopan-Microsoft@users.noreply.github.com> Date: Mon, 14 Apr 2025 23:22:42 +0530 Subject: [PATCH 6/6] Update quota_check.md --- docs/quota_check.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/quota_check.md b/docs/quota_check.md index 327f8bf21..4e51e1c47 100644 --- a/docs/quota_check.md +++ b/docs/quota_check.md @@ -1,9 +1,7 @@ ## Check Quota Availability Before Deployment Before deploying the accelerator, **ensure sufficient quota availability** for the required model. -> **For Global Standard | GPT-4o - the capacity to at least 150k tokens post-deployment for optimal performance.** - -> **For Standard | GPT-4 - ensure a minimum of 30k–40k tokens for best results.** +> **We recommend increasing the capacity to 100k tokens for optimal performance.** ### Login if you have not done so already ``` @@ -99,4 +97,4 @@ The final table lists regions with available quota. You can select any of these curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash az login ``` -6. Rerun the script after installing Azure CLI. \ No newline at end of file +6. Rerun the script after installing Azure CLI.