generated from sensein/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub wf on self-hosted runner #163
Merged
Merged
Changes from 47 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
24da6d8
reorganizing tests #2
fabiocat93 01d5961
reorganizing tests #3
fabiocat93 6475e35
reorganizing tests #6
fabiocat93 22bba37
reorganizing tests #8
fabiocat93 6c38697
reorganizing tests #9
fabiocat93 c4b2ea1
reorganizing tests #10
fabiocat93 8deeacd
reorganizing tests #11
fabiocat93 4007ae8
reorganizing tests #12
fabiocat93 72cc0b1
reorganizing tests #14
fabiocat93 63db09b
reorganizing tests #16
fabiocat93 5809725
reorganizing tests #17
fabiocat93 7dadfbb
reorganizing tests #19
fabiocat93 48a9b53
reorganizing tests #20
fabiocat93 362ce38
reorganizing tests #21
fabiocat93 7c68b83
reorganizing tests #22
fabiocat93 d565d11
trying with a new machine #2
fabiocat93 134842f
trying with a new machine #3
fabiocat93 f95115a
moving to in CI
fabiocat93 08cf32b
moving to in CI #2
fabiocat93 289253d
moving to in CI #3
fabiocat93 64b42f1
moving to in CI #5
fabiocat93 0b9b89e
moving to in CI #6
fabiocat93 883553b
moving to in CI #7
fabiocat93 af19160
moving to in CI #8
fabiocat93 155603a
adjusting speech enhancement test
fabiocat93 c63cb74
fixing github token issue #4
fabiocat93 384ce07
fixing transcribe_timestamped workflow
fabiocat93 ba1ffac
removing transcribe_timestamped wf #3
fabiocat93 e3d5acc
fixing issues with cuda #2
fabiocat93 3548b61
fixing speech enhancing test
fabiocat93 5485819
fixing speech enhancing test #3
fabiocat93 83fe489
fixing speech enhancing test #5
fabiocat93 927ecdd
codecov
fabiocat93 d98d0ce
codecov #2
fabiocat93 71c2f66
codecov #3
fabiocat93 79d1ce9
codecov #4
fabiocat93 48d61cd
restructure yaml file #3
fabiocat93 8d58674
restructure yaml file #4
fabiocat93 7f4acae
splitting the flows #2
fabiocat93 08ef6db
fixing poetry cache directory
fabiocat93 f407e64
moving back the repository folder
fabiocat93 d551ff2
copy instead of mv
fabiocat93 972b463
Added fixture for cache clearing
wilke0818 af99bea
Merge branch 'main' into github-wf
wilke0818 4d98d99
Added docstring
wilke0818 2f31f42
fixing style issue
fabiocat93 3a11d97
add check for gpu tests
fabiocat93 bbd9646
adding tests on gpu for ubuntu-python 3.11
fabiocat93 f430b41
playing with the flow #2
fabiocat93 a8aa72b
cleaning
fabiocat93 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
name: e2c-runner-tests-310 | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, labeled] | ||
|
||
jobs: | ||
start-runner: | ||
if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'to-test-gpu') | ||
name: start-runner | ||
runs-on: ubuntu-latest | ||
outputs: | ||
label: ${{ steps.start-ec2-runner.outputs.label }} | ||
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} | ||
job-ran: ${{ steps.set-ran.outputs.ran }} | ||
steps: | ||
- id: set-ran | ||
run: echo "::set-output name=ran::true" | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_KEY_SECRET }} | ||
aws-region: ${{ vars.AWS_REGION }} | ||
- name: Start EC2 runner | ||
id: start-ec2-runner | ||
uses: machulav/ec2-github-runner@v2 | ||
with: | ||
mode: start | ||
github-token: ${{ secrets.GH_TOKEN }} | ||
ec2-image-id: ${{ vars.AWS_IMAGE_ID }} | ||
ec2-instance-type: ${{ vars.AWS_INSTANCE_TYPE }} | ||
subnet-id: ${{ vars.AWS_SUBNET }} | ||
security-group-id: ${{ vars.AWS_SECURITY_GROUP }} | ||
|
||
|
||
ubuntu-tests-310: | ||
name: ubuntu-tests-310 | ||
needs: start-runner | ||
runs-on: ${{ needs.start-runner.outputs.label }} | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ${{ vars.WORKING_DIR }} | ||
strategy: | ||
matrix: | ||
python-version: ['3.10'] | ||
env: | ||
WORKING_DIR: ${{ vars.WORKING_DIR }} | ||
POETRY_CACHE_DIR: ${{ vars.WORKING_DIR }} | ||
outputs: | ||
job-ran: ${{ steps.set-ran.outputs.ran }} | ||
steps: | ||
- id: set-ran | ||
run: echo "::set-output name=ran::true" | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 # no need for the history | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install ffmpeg (Ubuntu) | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: sudo apt-get update && sudo apt-get install -y ffmpeg | ||
shell: bash | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.7.1 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Check available space | ||
run: | | ||
df -h | ||
shell: bash | ||
- name: Echo python info | ||
run: | | ||
python --version | ||
which python | ||
shell: bash | ||
- name: Copy senselab directory to current directory | ||
run: | | ||
cp -r /actions-runner/_work/senselab/senselab . | ||
- name: Install dependencies with Poetry | ||
run: | | ||
cd senselab | ||
poetry env use ${{ matrix.python-version }} | ||
poetry run pip install iso-639 | ||
poetry install --with dev | ||
shell: bash | ||
- name: Check poetry info | ||
run: | | ||
cd senselab | ||
poetry env info | ||
poetry --version | ||
shell: bash | ||
- name: Check NVIDIA SMI details | ||
run: | | ||
cd senselab | ||
poetry run nvidia-smi | ||
poetry run nvidia-smi -L | ||
poetry run nvidia-smi -q -d Memory | ||
shell: bash | ||
- name: Prepare cache folder for pytest | ||
run: mkdir -p $WORKING_DIR/pytest/temp | ||
shell: bash | ||
- name: Run unit tests | ||
id: run-tests | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
HF_TOKEN: ${{ secrets.HF_TOKEN }} | ||
run: > | ||
cd senselab && poetry run pytest \ | ||
--rootdir=$WORKING_DIR/pytest \ | ||
--basetemp=$WORKING_DIR/pytest/temp \ | ||
--junitxml=pytest.xml \ | ||
--cov-report=term-missing:skip-covered \ | ||
--cov-report=xml:coverage.xml \ | ||
--cov=src src/tests \ | ||
--log-level=DEBUG \ | ||
--verbose | ||
shell: bash | ||
|
||
stop-runner: | ||
name: stop-runner | ||
needs: | ||
- start-runner # waits for the EC2 instance to be created | ||
- ubuntu-tests-310 # waits for the actual job to finish | ||
runs-on: ubuntu-latest | ||
if: ${{ needs.start-runner.outputs.job-ran == 'true' && needs.ubuntu-tests-310.outputs.job-ran == 'true' || failure() }} # required to stop the runner even if an error occurred in previous jobs | ||
steps: | ||
- name: Check available space | ||
run: | | ||
df -h | ||
shell: bash | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_KEY_SECRET }} | ||
aws-region: ${{ vars.AWS_REGION }} | ||
- name: Stop EC2 runner | ||
uses: machulav/ec2-github-runner@v2 | ||
with: | ||
mode: stop | ||
github-token: ${{ secrets.GH_TOKEN }} | ||
label: ${{ needs.start-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
3 changes: 3 additions & 0 deletions
3
src/senselab/audio/workflows/transcribe_timestamped/__init__.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
"""Workflow for timestamped transcription.""" | ||
|
||
""" | ||
# TODO: Please double-check this because tests are failing | ||
from senselab.audio.workflows.transcribe_timestamped.transcribe_timestamped import transcribe_timestamped | ||
|
||
__all__ = ["transcribe_timestamped"] | ||
""" |
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we go ahead and add a 3.11 and 3.12 before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added 3.11. would stay like this for now. We can add 3.12 in the future (I want first to check how much money we use with 3.10 and 3.11).