docs: restructure documentation and align eval/batch backends #39
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: Validate Problems | |
| on: | |
| pull_request: | |
| paths: | |
| - 'algorithmic/problems/**' | |
| - 'research/problems/**' | |
| jobs: | |
| detect-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| algorithmic: ${{ steps.detect.outputs.algorithmic }} | |
| research: ${{ steps.detect.outputs.research }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Detect changed problems | |
| id: detect | |
| run: | | |
| # Detect changed algorithmic problems | |
| ALG=$(python scripts/detect_changed_problems.py --track algorithmic --base-ref origin/${{ github.base_ref }} -v 2>&1 | tail -1) | |
| echo "algorithmic=$ALG" >> $GITHUB_OUTPUT | |
| echo "Algorithmic problems: $ALG" | |
| # Detect changed research problems | |
| RES=$(python scripts/detect_changed_problems.py --track research --base-ref origin/${{ github.base_ref }} -v 2>&1 | tail -1) | |
| echo "research=$RES" >> $GITHUB_OUTPUT | |
| echo "Research problems: $RES" | |
| validate-algorithmic: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.algorithmic != '' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Validate problems | |
| run: | | |
| echo "Validating algorithmic problems: ${{ needs.detect-changes.outputs.algorithmic }}" | |
| uv run python scripts/validate_problems.py \ | |
| --track algorithmic \ | |
| --problems ${{ needs.detect-changes.outputs.algorithmic }} | |
| validate-research: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.research != '' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Setup AWS credentials | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| run: | | |
| mkdir -p ~/.aws | |
| cat > ~/.aws/credentials << EOF | |
| [default] | |
| aws_access_key_id = $AWS_ACCESS_KEY_ID | |
| aws_secret_access_key = $AWS_SECRET_ACCESS_KEY | |
| EOF | |
| cat > ~/.aws/config << EOF | |
| [default] | |
| region = us-east-1 | |
| EOF | |
| echo "AWS credentials configured" | |
| - name: Setup GCP credentials | |
| env: | |
| GCP_CREDS: ${{ secrets.GCP_CREDENTIALS }} | |
| run: | | |
| if [ -n "$GCP_CREDS" ]; then | |
| echo "$GCP_CREDS" > /tmp/gcp-key.json | |
| echo "GOOGLE_APPLICATION_CREDENTIALS=/tmp/gcp-key.json" >> $GITHUB_ENV | |
| gcloud auth activate-service-account --key-file=/tmp/gcp-key.json | |
| gcloud config set project ${{ secrets.GCP_PROJECT_ID }} | |
| echo "GCP credentials configured" | |
| fi | |
| - name: Generate SSH key for SkyPilot | |
| run: | | |
| mkdir -p ~/.ssh | |
| if [ ! -f ~/.ssh/sky-key ]; then | |
| ssh-keygen -t rsa -b 4096 -f ~/.ssh/sky-key -N "" -C "sky-ci" | |
| echo "Generated SSH key for SkyPilot" | |
| fi | |
| - name: Setup SkyPilot | |
| run: | | |
| uv run sky check aws gcp || echo "SkyPilot check failed, continuing..." | |
| - name: Validate problems | |
| timeout-minutes: 30 | |
| run: | | |
| echo "Validating research problems: ${{ needs.detect-changes.outputs.research }}" | |
| uv run python scripts/validate_problems.py \ | |
| --track research \ | |
| --timeout 1200 \ | |
| --problems ${{ needs.detect-changes.outputs.research }} \ | |
| --verbose |