Skip to content

Commit

Permalink
fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
czaloom committed Dec 11, 2024
1 parent 486bc0f commit 2967fb0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 27 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ jobs:
with:
python-version: "3.10"
- name: install lite
run: pip install -e .
working-directory: ./lite
run: pip install -e src
working-directory: ./src
- name: run classification benchmarks
run: python benchmark_classification.py
working-directory: ./lite/benchmarks/
working-directory: benchmarks/
- name: print classification results
run: |
export BENCHMARK_RESULTS=$(python -c "import os;import json;print(json.dumps(json.load(open('clf_results.json', 'r')), indent=4));")
echo "$BENCHMARK_RESULTS"
working-directory: ./lite/benchmarks/
working-directory: benchmarks/
- name: run object detection benchmarks
run: python benchmark_objdet.py
working-directory: ./lite/benchmarks/
working-directory: benchmarks/
- name: print object detection results
run: |
export BENCHMARK_RESULTS=$(python -c "import os;import json;print(json.dumps(json.load(open('objdet_results.json', 'r')), indent=4));")
echo "$BENCHMARK_RESULTS"
working-directory: ./lite/benchmarks/
working-directory: benchmarks/
run-synthetic-benchmarks:
runs-on: ubuntu-latest
steps:
Expand All @@ -43,8 +43,8 @@ jobs:
with:
python-version: "3.10"
- name: install lite
run: pip install -e .
working-directory: ./lite
run: pip install -e src
working-directory: ./src
- name: benchmark semantic segmentation
run: python benchmark_semantic_segmentation.py
working-directory: ./lite/benchmarks/synthetic/
working-directory: benchmarks/synthetic/
6 changes: 3 additions & 3 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
- "v*"

jobs:
build-and-publish-py-lite-package:
build-and-publish-py-package:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lite
working-directory: src
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -22,4 +22,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.VALOR_LITE_PYPI_API_TOKEN }}
packages-dir: ./lite/dist
packages-dir: src/dist
10 changes: 3 additions & 7 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main]
paths:
- valor_lite/**
- src/valor_lite/**
- docs/**
- .github/workflows/publish-docs.yml
- mkdocs.yml
Expand All @@ -19,11 +19,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: install lite
run: pip install ".[test]"
- name: install mkdocs and plug-ins
run: pip install -r docs/requirements.txt
- name: generate new swagger docs
run: python docs/scripts/generate_swagger_docs.py
- name: install python dependencies
run: pip install "src/[test, docs]"
- name: deploy docs to gh
run: mkdocs gh-deploy
16 changes: 8 additions & 8 deletions .github/workflows/tests-and-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
python-version: "3.10"
- name: run classification tests and report coverage
run: |
pip install -e ".[test]"
pip install -e "src/[test]"
COVERAGE_FILE=.coverage.classification python -m coverage run --include "valor_lite/*" -m pytest -v tests/classification/
python -m coverage combine
python -m coverage report -m
Expand All @@ -32,10 +32,10 @@ jobs:
echo "Coverage is below 99%"
exit 1
fi
working-directory: ./lite
working-directory: .
- name: run object detection tests and report coverage
run: |
pip install -e ".[test]"
pip install -e "src/[test]"
COVERAGE_FILE=.coverage.detection python -m coverage run --include "valor_lite/*" -m pytest -v tests/object_detection/
python -m coverage combine
python -m coverage report -m
Expand All @@ -46,10 +46,10 @@ jobs:
echo "Coverage is below 99%"
exit 1
fi
working-directory: ./lite
working-directory: .
- name: run semantic segmentation tests and report coverage
run: |
pip install -e ".[test]"
pip install -e "src/[test]"
COVERAGE_FILE=.coverage.segmentation python -m coverage run --include "valor_lite/*" -m pytest -v tests/semantic_segmentation/
python -m coverage combine
python -m coverage report -m
Expand All @@ -60,10 +60,10 @@ jobs:
echo "Coverage is below 99%"
exit 1
fi
working-directory: ./lite
working-directory: .
- name: run text generation tests and report coverage
run: |
pip install -e ".[test,openai,mistral]"
pip install -e "src/[test,openai,mistral]"
COVERAGE_FILE=.coverage.text_generation python -m coverage run --include "valor_lite/*" -m pytest -v tests/text_generation/
python -m coverage combine
python -m coverage report -m
Expand All @@ -74,4 +74,4 @@ jobs:
echo "Coverage is below 99%"
exit 1
fi
working-directory: ./lite
working-directory: .

0 comments on commit 2967fb0

Please sign in to comment.