Add AutoParentDelegationEnabled flag to toggle auto parent delegation #4333
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/run-benchmarks.yml | |
| name: Validate-Benchmarks | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: run-benchmarks-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate-benchmarks: | |
| runs-on: Benchmarking | |
| steps: | |
| - name: Check out PR branch | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| fetch-depth: 0 | |
| - name: Install GitHub CLI | |
| run: | | |
| sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get update | |
| sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y --no-install-recommends \ | |
| -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" gh | |
| echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | |
| - name: Install system dependencies | |
| run: | | |
| sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y --no-install-recommends \ | |
| -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ | |
| build-essential clang curl libssl-dev llvm libudev-dev protobuf-compiler pkg-config | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| - name: Cache Rust build | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: bench-${{ hashFiles('**/Cargo.lock') }} | |
| cache-on-failure: true | |
| - name: Build node with benchmarks + weight tools | |
| run: | | |
| .github/scripts/check-skip-label.sh ${{ github.event.pull_request.number }} | |
| cargo build --profile production -p node-subtensor --features runtime-benchmarks | |
| .github/scripts/check-skip-label.sh ${{ github.event.pull_request.number }} | |
| cargo build --profile production -p subtensor-weight-tools --bin weight-compare | |
| - name: Run & validate benchmarks | |
| timeout-minutes: 180 | |
| run: | | |
| .github/scripts/check-skip-label.sh ${{ github.event.pull_request.number }} | |
| mkdir -p .bench_patch | |
| chmod +x scripts/benchmark_action.sh | |
| scripts/benchmark_action.sh | |
| - name: Archive bench patch | |
| if: always() | |
| run: | | |
| if [ -d ".bench_patch" ]; then | |
| tar -czf bench-patch.tgz .bench_patch | |
| fi | |
| - name: Upload patch artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bench-patch | |
| path: bench-patch.tgz | |
| if-no-files-found: warn |