mirror of
https://github.com/bigscience-workshop/petals
synced 2024-11-16 06:12:50 +00:00
Fix default branch in CI (#26)
Set default head ref if the environment variable is not set
This commit is contained in:
parent
ccdcefe405
commit
01ed4db750
8
.github/workflows/run-tests.yaml
vendored
8
.github/workflows/run-tests.yaml
vendored
@ -28,6 +28,10 @@ jobs:
|
||||
pip install -r requirements.txt
|
||||
- name: Delete previous model, if exists
|
||||
run: |
|
||||
if [ -z "$GITHUB_HEAD_REF" ]
|
||||
then
|
||||
export GITHUB_HEAD_REF="main"
|
||||
fi
|
||||
python -c "from huggingface_hub import delete_repo; delete_repo(token='$BLOOM_TESTING_WRITE_TOKEN', \
|
||||
name='test-bloomd-350m-$GITHUB_HEAD_REF', organization='bloom-testing')" || true
|
||||
- name: Convert model and push to hub
|
||||
@ -62,6 +66,10 @@ jobs:
|
||||
pip install -r requirements-dev.txt
|
||||
- name: Test
|
||||
run: |
|
||||
if [ -z "$GITHUB_HEAD_REF" ]
|
||||
then
|
||||
export GITHUB_HEAD_REF="main"
|
||||
fi
|
||||
export MODEL_NAME=bloom-testing/test-bloomd-350m-$GITHUB_HEAD_REF
|
||||
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 &
|
||||
|
Loading…
Reference in New Issue
Block a user