|
|
@@ -6,47 +6,46 @@ on:
|
|
|
pull_request:
|
|
|
|
|
|
jobs:
|
|
|
-# convert-model:
|
|
|
-# runs-on: ubuntu-latest
|
|
|
-# env:
|
|
|
-# BLOOM_TESTING_WRITE_TOKEN: ${{ secrets.BLOOM_TESTING_WRITE_TOKEN }}
|
|
|
-# timeout-minutes: 15
|
|
|
-# steps:
|
|
|
-# - uses: actions/checkout@v2
|
|
|
-# - name: Set up Python
|
|
|
-# uses: actions/setup-python@v2
|
|
|
-# with:
|
|
|
-# python-version: 3.9
|
|
|
-# - name: Cache dependencies
|
|
|
-# uses: actions/cache@v2
|
|
|
-# with:
|
|
|
-# path: ~/.cache/pip
|
|
|
-# key: Key-v1-py3.9-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
|
|
|
-# - name: Install dependencies
|
|
|
-# run: |
|
|
|
-# python -m pip install --upgrade pip
|
|
|
-# pip install -r requirements.txt
|
|
|
-# - name: Delete test models older than 72 hours
|
|
|
-# run: |
|
|
|
-# export HF_TAG=$(python -c "import os; print(os.environ.get('GITHUB_HEAD_REF') or os.environ.get('GITHUB_REF_NAME'))")
|
|
|
-# python -c "from huggingface_hub import delete_repo; delete_repo(token='$BLOOM_TESTING_WRITE_TOKEN', \
|
|
|
-# name='test-bloomd-560m-$HF_TAG', organization='bloom-testing')" || true
|
|
|
-# - name: Delete previous model, if exists
|
|
|
-# run: |
|
|
|
-# export HF_TAG=$(python -c "import os; print(os.environ.get('GITHUB_HEAD_REF') or os.environ.get('GITHUB_REF_NAME'))")
|
|
|
-# python -c "from huggingface_hub import delete_repo; delete_repo(token='$BLOOM_TESTING_WRITE_TOKEN', \
|
|
|
-# name='test-bloomd-560m-$HF_TAG', organization='bloom-testing')" || true
|
|
|
-# - name: Convert model and push to hub
|
|
|
-# run: |
|
|
|
-# export HF_TAG=$(python -c "import os; print(os.environ.get('GITHUB_HEAD_REF') or os.environ.get('GITHUB_REF_NAME'))")
|
|
|
-# python -m cli.convert_model --model bigscience/bloom-560m --output_path ./converted_model \
|
|
|
-# --output_repo bloom-testing/test-bloomd-560m-$HF_TAG --use_auth_token $BLOOM_TESTING_WRITE_TOKEN \
|
|
|
-# --resize_token_embeddings 10000
|
|
|
-
|
|
|
+ convert-model:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ env:
|
|
|
+ BLOOM_TESTING_WRITE_TOKEN: ${{ secrets.BLOOM_TESTING_WRITE_TOKEN }}
|
|
|
+ timeout-minutes: 15
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v2
|
|
|
+ - name: Set up Python
|
|
|
+ uses: actions/setup-python@v2
|
|
|
+ with:
|
|
|
+ python-version: 3.9
|
|
|
+ - name: Cache dependencies
|
|
|
+ uses: actions/cache@v2
|
|
|
+ with:
|
|
|
+ path: ~/.cache/pip
|
|
|
+ key: Key-v1-py3.9-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
|
|
|
+ - name: Install dependencies
|
|
|
+ run: |
|
|
|
+ python -m pip install --upgrade pip
|
|
|
+ pip install -r requirements.txt
|
|
|
+ - name: Delete test models older than 72 hours
|
|
|
+ run: |
|
|
|
+ export HF_TAG=$(python -c "import os; print(os.environ.get('GITHUB_HEAD_REF') or os.environ.get('GITHUB_REF_NAME'))")
|
|
|
+ python -c "from huggingface_hub import delete_repo; delete_repo(token='$BLOOM_TESTING_WRITE_TOKEN', \
|
|
|
+ name='test-bloomd-560m-$HF_TAG', organization='bloom-testing')" || true
|
|
|
+ - name: Delete previous model, if exists
|
|
|
+ run: |
|
|
|
+ export HF_TAG=$(python -c "import os; print(os.environ.get('GITHUB_HEAD_REF') or os.environ.get('GITHUB_REF_NAME'))")
|
|
|
+ python -c "from huggingface_hub import delete_repo; delete_repo(token='$BLOOM_TESTING_WRITE_TOKEN', \
|
|
|
+ name='test-bloomd-560m-$HF_TAG', organization='bloom-testing')" || true
|
|
|
+ - name: Convert model and push to hub
|
|
|
+ run: |
|
|
|
+ export HF_TAG=$(python -c "import os; print(os.environ.get('GITHUB_HEAD_REF') or os.environ.get('GITHUB_REF_NAME'))")
|
|
|
+ python -m cli.convert_model --model bigscience/bloom-560m --output_path ./converted_model \
|
|
|
+ --output_repo bloom-testing/test-bloomd-560m-$HF_TAG --use_auth_token $BLOOM_TESTING_WRITE_TOKEN \
|
|
|
+ --resize_token_embeddings 50000
|
|
|
|
|
|
run-tests:
|
|
|
runs-on: ubuntu-latest
|
|
|
-# needs: convert-model
|
|
|
+ needs: convert-model
|
|
|
strategy:
|
|
|
matrix:
|
|
|
python-version: [ 3.7, 3.8, 3.9 ]
|
|
|
@@ -83,7 +82,8 @@ jobs:
|
|
|
export REF_NAME=bigscience/bloom-560m
|
|
|
|
|
|
python -m cli.run_server --converted_model_name_or_path $MODEL_NAME --block_indices 0:12 \
|
|
|
- --torch_dtype float32 --identity tests/test.id --host_maddrs /ip4/127.0.0.1/tcp/31337 --throughput 1 &
|
|
|
+ --torch_dtype float32 --identity tests/test.id --host_maddrs /ip4/127.0.0.1/tcp/31337 \
|
|
|
+ --throughput 1 &> server2.log &
|
|
|
SERVER1_PID=$!
|
|
|
|
|
|
sleep 5 # wait for the first server to initialize DHT
|
|
|
@@ -109,6 +109,7 @@ jobs:
|
|
|
--torch_dtype float32 --initial_peers $INITIAL_PEERS --throughput 1 &> server4.log &
|
|
|
SERVER5_PID=$!
|
|
|
|
|
|
+ #TODO tail server logs
|
|
|
sleep 30 # wait for servers to download layers
|
|
|
|
|
|
kill -0 $SERVER1_PID $SERVER2_PID $SERVER3_PID $SERVER4_PID $SERVER5_PID # ensure all servers survived init
|