Skip to content

add github actions

add github actions #18

Workflow file for this run

name: Run Smoke Test
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
env:
PYTHON_DEFAULT_VERSION: "3.11"
jobs:
test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
- name: Run Test
run: |
cd src/compute_horde_prompt_gen
python3 run.py --mock_model --number_of_batches 5 --number_of_prompts_per_batch 20 --uuids uuid1,uuid2,uuid3,uuid4,uuid5
# mkdir saved_models/
# mkdir output/
#
# echo "building image with no model"
# docker build -t compute-horde-prompt-gen .
#
# echo "running prompt generation with mock model"
# docker run -v ./output/:/app/output/ compute-horde-prompt-gen --mock_model --number_of_batches 5 --number_of_prompts_per_batch 20 --uuids uuid1,uuid2,uuid3,uuid4,uuid5
echo -e "\ngenerated batches:"
ls output/
echo -e "\nchecking if prompts are generated fine"
for i in $(seq 1 5); do
if [ $(cat output/prompts_uuid$i.txt | wc -l) -ne 20 ]; then
echo "Missing prompts: $(cat output/prompts_uuid{$i}.txt)"
exit 1
fi
done