run-experiment #65
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
| name: run-experiment | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| strategy: | |
| description: "Server strategy" | |
| required: false | |
| default: "auto" | |
| type: choice | |
| options: | |
| - auto | |
| - "no" | |
| - uniform | |
| - adaptive | |
| enable_quantization: | |
| description: "Enable quantization" | |
| required: false | |
| default: "true" | |
| type: choice | |
| options: | |
| - "true" | |
| - "false" | |
| quantization_bits: | |
| description: "Default quantization bits" | |
| required: false | |
| default: "8" | |
| type: choice | |
| options: | |
| - "1" | |
| - "2" | |
| - "4" | |
| - "8" | |
| - "16" | |
| - "32" | |
| quantization_bits_split: | |
| description: "Quantization bits split" | |
| required: false | |
| default: "8:0.4,4:0.3,2:0.2,1:0.1" | |
| quantization_bits_seed: | |
| description: "Seed for split assignment" | |
| required: false | |
| default: "0" | |
| simulated_latency_fp32_s: | |
| description: "Simulated latency for FP32 (seconds)" | |
| required: false | |
| default: "1.6" | |
| num_server_rounds: | |
| description: "Number of server rounds" | |
| required: false | |
| default: "20" | |
| num_clients_per_round: | |
| description: "Number of clients per round" | |
| required: false | |
| default: "10" | |
| jobs: | |
| cleanup: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Cleanup dstack | |
| uses: appleboy/ssh-action@v1.2.3 | |
| with: | |
| host: ${{ secrets.VPS_HOST }} | |
| username: ${{ secrets.VPS_USER }} | |
| key: ${{ secrets.VPS_SSH_KEY }} | |
| script: | | |
| cd ~/capstone | |
| docker compose restart dstack | |
| experiment: | |
| needs: cleanup | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v1 | |
| - name: Create virtual environment | |
| run: uv venv | |
| - name: Install dependencies | |
| run: uv pip install -e . | |
| - name: Run experiment | |
| env: | |
| VPS_HOST: ${{ secrets.VPS_HOST }} | |
| WANDB_API_KEY: ${{ secrets.WANDB_TOKEN }} | |
| RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }} | |
| STRATEGY: ${{ inputs.strategy }} | |
| ENABLE_QUANTIZATION: ${{ inputs.enable_quantization }} | |
| QUANTIZATION_BITS: ${{ inputs.quantization_bits }} | |
| QUANTIZATION_BITS_SPLIT: ${{ inputs.quantization_bits_split }} | |
| QUANTIZATION_BITS_SEED: ${{ inputs.quantization_bits_seed }} | |
| SIMULATED_LATENCY_FP32_S: ${{ inputs.simulated_latency_fp32_s }} | |
| NUM_SERVER_ROUNDS: ${{ inputs.num_server_rounds }} | |
| NUM_CLIENTS_PER_ROUND: ${{ inputs.num_clients_per_round }} | |
| run: uv run -- make start-detached |