Closed MinaKh closed 5 months ago
@MinaKh I think you should add torchaudio
to the test requirements.txt
, 'cause it fails as dependency in the CI tests.
@MinaKh I think you should add
torchaudio
to the testrequirements.txt
, 'cause it fails as dependency in the CI tests.
Thanks, just did!
It seems that the tests now are running using CUDA. Maybe it is better to run them with everything on CPU? Or we could modify the requirements.txt
to install the GPU version of PyTorch (both vision
and audio
).
It seems that the tests now are running using CUDA. Maybe it is better to run them with everything on CPU? Or we could modify the
requirements.txt
to install the GPU version of PyTorch (bothvision
andaudio
).
@fabrizio-ottati No, I can set them to run on cpu. Also there are other tests that I passed on my machine but fail on CI. I need to fix without need to install extra packages. Thanks!
The Github Actions test suite doens't have a GPU installed, therefore there's no point in installing any CUDA dependencies. Tests should always run on CPU please. Thank you
The Github Actions test suite doens't have a GPU installed, therefore there's no point in installing any CUDA dependencies. Tests should always run on CPU please. Thank you
Thanks @biphasic, As far as I checked my tests are not running on GPU. The error might be caused by general imports of torch and torchaudio, or by the difference in my local version and the installed one on the server. So I included the versions in the requirements. At this point I need to be able to run tests on GitHub to understand the issue better and fix it. Currently tests are not running automatically after my pushes (perhaps needs to be authorized every time by you and other admins?).
@MinaKh are the tests passing on your local machine?
Also I just relaxed the Github actions approval to the minimum level possible, I hope it now works without my manual approval!
Hi @biphasic,
Thanks for facilitating this! It seems that we need to explicitly install cpu version of torchaudio
in ci-pipeline.yml
.
Lines 24, 45 and 66 need to be updated to following:
pip install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cpu
I tried to do that but apparently I don't have permission to update the workflow:
(refusing to allow a Personal Access Token to create or update workflow
.github/workflows/ci-pipeline.ymlwithout
workflowscope)
How shall we proceed?
where do you see that error? I see a different error, again related to CUDA https://github.com/neuromorphs/tonic/actions/runs/7089430652/job/19294156537?pr=273
where do you see that error? I see a different error, again related to CUDA https://github.com/neuromorphs/tonic/actions/runs/7089430652/job/19294156537?pr=273
where do you see that error? I see a different error, again related to CUDA https://github.com/neuromorphs/tonic/actions/runs/7089430652/job/19294156537?pr=273
@biphasic Yes I see this error and I think its because we don't specify the cpu version while installing torchaudio. To fix that I proposed that update in the ci-pipeline.yml
And the error that I included in the last message is what I see in my pc, not being able to push to ci-pipeline.yml
. I am not authorized to push to workflow!
sorry I accidentally closed the previous comment and don't know how to undo that!
Will get on it! On 5 Dec 2023, at 10:54, Mina Khoei @.***> wrote:
where do you see that error? I see a different error, again related to CUDA https://github.com/neuromorphs/tonic/actions/runs/7089430652/job/19294156537?pr=273
@biphasic Yes I see this error and I think what causes that is we dont specify the cpu version while installing torchaudio. Tofix that I proposed that update in the ci-pipeline.yml And the error that I included in the last message is what I see in my pc. not being able to push to ci-pipeline.yml . I am not authorized to push to workflow
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@fabrizio-ottati Thanks Fabrizio, sorry I just accidentally closed this PR :D Can you undo that?
Ok, reopened! sorry for the inconvenience!
@MinaKh I need to sit and do it properly. I will update you this afternoon
I don't know why but it keeps installing the CUDA version even if I have specificied to use the CPU wheel of PyTorch.
Okay, it seems I convinced it @MinaKh :)
Attention: Patch coverage is 97.19626%
with 3 lines
in your changes are missing coverage. Please review.
Project coverage is 77.72%. Comparing base (
e5bd291
) to head (0af124a
). Report is 22 commits behind head on develop.
Files | Patch % | Lines |
---|---|---|
tonic/audio_transforms.py | 92.00% | 2 Missing :warning: |
tonic/audio_augmentations.py | 98.78% | 1 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Okay, it seems I convinced it @MinaKh :)
Okay, it seems I convinced it @MinaKh :)
Thanks @fabrizio-ottati
@biphasic all the tests are passing now. I have created a separate test/torch_requirements.txt
so that I can pull the CPU wheel of PyTorch. Moreover, following torchaudio
documentation, specific combinations of torch
and torchaudio
versions need to be used to ensure safe installation.
Now the code is ready to be reviewed and CI should be safe.
Most transforms are encapsulated enough so that I can add them, but some stuff that uses QUTNoise things I won't be able to merge like that, unless it is made a bit more general. For example, maybe Tonic has a AddNoise class, but then in your user code at SynSense you call it with AddNoise(QUTNoise), after the principle of dependency injection
@biphasic I removed those classes (noise augmentations) from this branch. currently it is very specific and I will prepare another PR later for that.
What's the status on this PR? :)
What's the status on this PR? :)
It is ready for final review...
This branch includes following updates in tonic/develop:
Three transforms are added to
audio_transforms.py
:SwapAxes
,AmplitudeScale
androbustAmplitudeScale
A new script is added:
audio_augmentations.py
containing wrapper classes for following audio augmentations:RandomAmplitudeScale
RandomPitchShift
RandomTimeStreatch
RIR
: adding room impulse response (echo effect)AddWhiteNoise
corresponding tests added:
test_audio_trnasform.py
A new script added for testing audio augmentations --->
test_audio_augmentations.py
A tutorial notebook is added in
docs/tutorials/