Skip to content

fix: Upgrade azure-ai-ml Package to Version 1.26.1 and Restore Script to Base Version #425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 0 additions & 93 deletions .github/dependabot.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/CAdeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
export AZURE_SUBSCRIPTION_ID="${{ secrets.AZURE_SUBSCRIPTION_ID }}"
export GPT_MIN_CAPACITY="11"
export TEXT_EMBEDDING_MIN_CAPACITY="45"
export AZURE_REGIONS="${{ vars.AZURE_REGIONS_CA }}"

chmod +x ClientAdvisor/Deployment/scripts/checkquota.sh
if ! ClientAdvisor/Deployment/scripts/checkquota.sh; then
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/RAdeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
export AZURE_SUBSCRIPTION_ID="${{ secrets.AZURE_SUBSCRIPTION_ID }}"
export GPT_MIN_CAPACITY="30"
export TEXT_EMBEDDING_MIN_CAPACITY="45"
export AZURE_REGIONS="${{ vars.AZURE_REGIONS_RA }}"

chmod +x ResearchAssistant/Deployment/scripts/checkquota.sh
if ! ResearchAssistant/Deployment/scripts/checkquota.sh; then
Expand Down
75 changes: 69 additions & 6 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,82 @@
name: 'Stale Bot'
name: "Manage Stale Issues, PRs & Unmerged Branches"
on:
schedule:
- cron: '30 1 * * *'

- cron: '30 1 * * *' # Runs daily at 1:30 AM UTC
workflow_dispatch: # Allows manual triggering
permissions:
contents: write
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
- name: Mark Stale Issues and PRs
uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
stale-issue-message: "This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or it will be closed in 30 days."
stale-pr-message: "This PR is stale because it has been open 180 days with no activity. Please update or it will be closed in 30 days."
days-before-stale: 180
days-before-close: 30
exempt-issue-labels: "keep"
exempt-pr-labels: "keep"
cleanup-branches:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history for accurate branch checks
- name: Fetch All Branches
run: git fetch --all --prune
- name: List Merged Branches With No Activity in Last 3 Months
run: |

echo "Branch Name,Last Commit Date,Committer,Committed In Branch,Action" > merged_branches_report.csv

for branch in $(git for-each-ref --format '%(refname:short) %(committerdate:unix)' refs/remotes/origin | awk -v date=$(date -d '3 months ago' +%s) '$2 < date {print $1}'); do
if [[ "$branch" != "origin/main" && "$branch" != "origin/dev" ]]; then
branch_name=${branch#origin/}
# Ensure the branch exists locally before getting last commit date
git fetch origin "$branch_name" || echo "Could not fetch branch: $branch_name"
last_commit_date=$(git log -1 --format=%ci "origin/$branch_name" || echo "Unknown")
committer_name=$(git log -1 --format=%cn "origin/$branch_name" || echo "Unknown")
committed_in_branch=$(git branch -r --contains "origin/$branch_name" | tr -d ' ' | paste -sd "," -)
echo "$branch_name,$last_commit_date,$committer_name,$committed_in_branch,Delete" >> merged_branches_report.csv
fi
done
- name: List PR Approved and Merged Branches Older Than 30 Days
run: |

for branch in $(gh api repos/${{ github.repository }}/pulls --jq '.[] | select(.merged_at != null and (.base.ref == "main" or .base.ref == "dev")) | select(.merged_at | fromdateiso8601 < (now - 2592000)) | .head.ref'); do
# Ensure the branch exists locally before getting last commit date
git fetch origin "$branch" || echo "Could not fetch branch: $branch"
last_commit_date=$(git log -1 --format=%ci origin/$branch || echo "Unknown")
committer_name=$(git log -1 --format=%cn origin/$branch || echo "Unknown")
committed_in_branch=$(git branch -r --contains "origin/$branch" | tr -d ' ' | paste -sd "," -)
echo "$branch,$last_commit_date,$committer_name,$committed_in_branch,Delete" >> merged_branches_report.csv
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: List Open PR Branches With No Activity in Last 3 Months
run: |

for branch in $(gh api repos/${{ github.repository }}/pulls --state open --jq '.[] | select(.base.ref == "main" or .base.ref == "dev") | .head.ref'); do
# Ensure the branch exists locally before getting last commit date
git fetch origin "$branch" || echo "Could not fetch branch: $branch"
last_commit_date=$(git log -1 --format=%ci origin/$branch || echo "Unknown")
committer_name=$(git log -1 --format=%cn origin/$branch || echo "Unknown")
if [[ $(date -d "$last_commit_date" +%s) -lt $(date -d '3 months ago' +%s) ]]; then
# If no commit in the last 3 months, mark for deletion
committed_in_branch=$(git branch -r --contains "origin/$branch" | tr -d ' ' | paste -sd "," -)
echo "$branch,$last_commit_date,$committer_name,$committed_in_branch,Delete" >> merged_branches_report.csv
fi
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload CSV Report of Inactive Branches
uses: actions/upload-artifact@v4
with:
name: merged-branches-report
path: merged_branches_report.csv
retention-days: 30
4 changes: 2 additions & 2 deletions ClientAdvisor/Deployment/scripts/checkquota.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# List of Azure regions to check for quota (update as needed)
REGIONS=("eastus" "westus" "northcentralus" "uksouth" "swedencentral")
IFS=', ' read -ra REGIONS <<< "$AZURE_REGIONS"

SUBSCRIPTION_ID="${AZURE_SUBSCRIPTION_ID}"
GPT_MIN_CAPACITY="${GPT_MIN_CAPACITY}"
Expand All @@ -18,7 +18,7 @@ if ! az login --service-principal -u "$AZURE_CLIENT_ID" -p "$AZURE_CLIENT_SECRET
fi

echo "🔄 Validating required environment variables..."
if [[ -z "$SUBSCRIPTION_ID" || -z "$GPT_MIN_CAPACITY" || -z "$TEXT_EMBEDDING_MIN_CAPACITY" ]]; then
if [[ -z "$SUBSCRIPTION_ID" || -z "$GPT_MIN_CAPACITY" || -z "$TEXT_EMBEDDING_MIN_CAPACITY" || -z "$REGIONS" ]]; then
echo "❌ ERROR: Missing required environment variables."
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_secrets_from_kv(kv_name, secret_name):
# construct a hub
my_hub = Hub(name=aihub_name, location=solutionLocation, display_name=aihub_name)

created_hub = ml_client.workspaces.begin_create(my_hub).result()
created_hub = ml_client.workspaces.begin_create(my_hub).result()

# construct the project
my_project = Project(
Expand All @@ -84,7 +84,7 @@ def get_secrets_from_kv(kv_name, secret_name):
)

created_project = ml_client.workspaces.begin_create(workspace=my_project).result()

open_ai_connection = AzureOpenAIConnection(
name="Azure_OpenAI",
api_key=open_ai_key,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
azure-identity
azure-keyvault-secrets
azure-ai-resources
azure-ai-ml==1.24.0
azure-ai-ml==1.26.1
msal[broker]==1.24.0b1
azure-mgmt-resource==23.1.0b2
azure-mgmt-cognitiveservices
Expand Down
4 changes: 2 additions & 2 deletions ResearchAssistant/Deployment/scripts/checkquota.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# List of Azure regions to check for quota (update as needed)
REGIONS=("eastus2" "westus" "northcentralus" "uksouth" "francecentral")
IFS=', ' read -ra REGIONS <<< "$AZURE_REGIONS"

SUBSCRIPTION_ID="${AZURE_SUBSCRIPTION_ID}"
GPT_MIN_CAPACITY="${GPT_MIN_CAPACITY}"
Expand All @@ -18,7 +18,7 @@ if ! az login --service-principal -u "$AZURE_CLIENT_ID" -p "$AZURE_CLIENT_SECRET
fi

echo "🔄 Validating required environment variables..."
if [[ -z "$SUBSCRIPTION_ID" || -z "$GPT_MIN_CAPACITY" || -z "$TEXT_EMBEDDING_MIN_CAPACITY" ]]; then
if [[ -z "$SUBSCRIPTION_ID" || -z "$GPT_MIN_CAPACITY" || -z "$TEXT_EMBEDDING_MIN_CAPACITY" || -z "$REGIONS" ]]; then
echo "❌ ERROR: Missing required environment variables."
exit 1
fi
Expand Down