Merge dependency updates from GitHub

- Updated black from 24.3.0 to 26.3.1
- Kept ruff at 0.15.7 (our updated version)
- All other dependency updates already applied
This commit is contained in:
2026-03-26 08:31:46 +01:00
497 changed files with 11695 additions and 69836 deletions

145
.github/workflows/gpu-benchmark.yml vendored Normal file
View File

@@ -0,0 +1,145 @@
name: GPU Benchmark CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
schedule:
# Run benchmarks daily at 2 AM UTC
- cron: '0 2 * * *'
jobs:
gpu-benchmark:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.13]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
python3-dev \
pkg-config \
libnvidia-compute-515 \
cuda-toolkit-12-2 \
nvidia-driver-515
- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-benchmark torch torchvision torchaudio
pip install cupy-cuda12x
pip install nvidia-ml-py3
- name: Verify GPU availability
run: |
python -c "
import torch
print(f'PyTorch version: {torch.__version__}')
print(f'CUDA available: {torch.cuda.is_available()}')
if torch.cuda.is_available():
print(f'CUDA version: {torch.version.cuda}')
print(f'GPU count: {torch.cuda.device_count()}')
print(f'GPU name: {torch.cuda.get_device_name(0)}')
"
- name: Run GPU benchmarks
run: |
python -m pytest dev/gpu/test_gpu_performance.py \
--benchmark-only \
--benchmark-json=benchmark_results.json \
--benchmark-sort=mean \
-v
- name: Generate benchmark report
run: |
python dev/gpu/generate_benchmark_report.py \
--input benchmark_results.json \
--output benchmark_report.html \
--history-file benchmark_history.json
- name: Upload benchmark results
uses: actions/upload-artifact@v3
with:
name: benchmark-results-${{ matrix.python-version }}
path: |
benchmark_results.json
benchmark_report.html
benchmark_history.json
retention-days: 30
- name: Compare with baseline
run: |
python dev/gpu/compare_benchmarks.py \
--current benchmark_results.json \
--baseline .github/baselines/gpu_baseline.json \
--threshold 5.0 \
--output comparison_report.json
- name: Comment PR with results
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
try {
const results = JSON.parse(fs.readFileSync('comparison_report.json', 'utf8'));
const comment = `
## 🚀 GPU Benchmark Results
**Performance Summary:**
- **Mean Performance**: ${results.mean_performance.toFixed(2)} ops/sec
- **Performance Change**: ${results.performance_change > 0 ? '+' : ''}${results.performance_change.toFixed(2)}%
- **Status**: ${results.status}
**Key Metrics:**
${results.metrics.map(m => `- **${m.name}**: ${m.value.toFixed(2)} ops/sec (${m.change > 0 ? '+' : ''}${m.change.toFixed(2)}%)`).join('\n')}
${results.regressions.length > 0 ? '⚠️ **Performance Regressions Detected**' : '✅ **No Performance Regressions**'}
[View detailed report](${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID})
`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
} catch (error) {
console.log('Could not generate benchmark comment:', error.message);
}
- name: Update benchmark history
run: |
python dev/gpu/update_benchmark_history.py \
--results benchmark_results.json \
--history-file .github/baselines/benchmark_history.json \
--max-entries 100
- name: Fail on performance regression
run: |
python dev/gpu/check_performance_regression.py \
--results benchmark_results.json \
--baseline .github/baselines/gpu_baseline.json \
--threshold 10.0

View File

@@ -43,7 +43,7 @@ jobs:
bandit -r ${{ matrix.directory }} -f text -o bandit-report-${{ matrix.directory }}.txt
- name: Upload Bandit reports
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: bandit-report-${{ matrix.directory }}
path: |
@@ -53,7 +53,7 @@ jobs:
- name: Comment PR with Bandit findings
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const fs = require('fs');
@@ -132,7 +132,7 @@ jobs:
cd ../.. && cd website && npm audit --json > ../npm-audit-website.json || true
- name: Upload dependency reports
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: dependency-security-reports
path: |
@@ -178,7 +178,7 @@ jobs:
persist-credentials: false
- name: Run OSSF Scorecard
uses: ossf/scorecard-action@v2.3.3
uses: ossf/scorecard-action@v2.4.3
with:
results_file: results.sarif
results_format: sarif
@@ -233,7 +233,7 @@ jobs:
echo "4. Schedule regular security reviews" >> security-summary.md
- name: Upload security summary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: security-summary
path: security-summary.md
@@ -241,7 +241,7 @@ jobs:
- name: Comment PR with security summary
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const fs = require('fs');