Skip to content
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

Update torchaudio to 0.9 for tensorflow-gpu compatibility #43

Merged
merged 2 commits into from
Jun 22, 2021

Conversation

jbitton
Copy link
Contributor

@jbitton jbitton commented Jun 22, 2021

Summary:
As called out in #28, there are some conflicting dependencies between torchaudio/torch 0.8.1/1.8.1 and tensorflow-gpu.

However, as discovered in pytorch/audio#1595, upgrading to v0.9 etc actually resolve this issue.

Thus, I update the torchaudio/torch versions in our requirements.txt and I also updated our numpy requirement so there are no conflicting dependencies between tf-gpu and augly :)

I verified on my side that all unit tests still pass and that setup.py finishes as expected with no errors. I also update setup.py to add our README to our PyPI page.

Ran:

python -m unittest augly.tests.audio_tests.functional_unit_tests
----------------------------------------------------------------------
Ran 21 tests in 4.683s

OK

python -m unittest augly.tests.audio_tests.transforms_unit_tests
----------------------------------------------------------------------
Ran 24 tests in 1.892s

OK

python -m unittest augly.tests.image_tests.functional_unit_tests
----------------------------------------------------------------------
Ran 32 tests in 32.442s

OK (skipped=2)

python -m unittest augly.tests.image_tests.transforms_unit_tests
----------------------------------------------------------------------
Ran 39 tests in 12.182s

OK (skipped=3)

python -m unittest augly.tests.video_tests.transforms.cv2_tests
----------------------------------------------------------------------
Ran 5 tests in 72.686s

OK

and

python setup.py install
.....
Using /home/jbitton/anaconda3/envs/testing_reqs/lib/python3.9/site-packages
Finished processing dependencies for augly==0.1.1

Differential Revision: D29292956

Summary:
As called out in facebookresearch#28, there are some conflicting dependencies between `torchaudio`/`torch` 0.8.1/1.8.1 and `tensorflow-gpu`.

However, as discovered in pytorch/audio#1595, upgrading to v0.9 etc actually resolve this issue.

Thus, I update the torchaudio/torch versions in our `requirements.txt` and I also updated our `numpy` requirement so there are no conflicting dependencies between `tf-gpu` and `augly` :)

I verified on my side that all unit tests still pass and that `setup.py` finishes as expected with no errors. I also update `setup.py` to add our README to our PyPI page.

Differential Revision: D29292956

fbshipit-source-id: e07f8b3d6d2d8bc9b21af166307f2ae00dbca663
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jun 22, 2021
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D29292956

@jbitton
Copy link
Contributor Author

jbitton commented Jun 22, 2021

@zpapakipos let me know if running this on your side works without issue. if yes, let's merge + update the PyPI package!

@jbitton jbitton requested a review from zpapakipos June 22, 2021 09:27
@zpapakipos
Copy link
Contributor

zpapakipos commented Jun 22, 2021

Tested on my side.

Installed using new reqs locally:

cd AugLy/
git pull
git checkout change_reqs
conda create -n augly_change_reqs -y
conda activate augly_change_reqs
cd ..
pip install -e AugLy/

Ran unit tests:

python -m unittest augly.tests.audio_tests.functional_unit_tests
----------------------------------------------------------------------
Ran 21 tests in 2.664s

OK

python -m unittest augly.tests.audio_tests.transforms_unit_tests
----------------------------------------------------------------------
Ran 24 tests in 1.069s

OK

python -m unittest augly.tests.image_tests.functional_unit_tests
----------------------------------------------------------------------
Ran 32 tests in 27.815s

OK (skipped=2)

python -m unittest augly.tests.image_tests.transforms_unit_tests
----------------------------------------------------------------------
Ran 39 tests in 10.127s

OK (skipped=3)

python -m unittest augly.tests.text_tests.functional_unit_tests
----------------------------------------------------------------------
Ran 12 tests in 0.059s

OK

python -m unittest augly.tests.text_tests.transforms_unit_tests
----------------------------------------------------------------------
Ran 12 tests in 0.016s

OK

python -m unittest augly.tests.video_tests.transforms.composite_tests
----------------------------------------------------------------------
Ran 11 tests in 31.113s

OK

Built & uploaded new pypi package:

# <changed version number in setup.py to 0.1.2>
git add setup.py
git commit -m "Update version # to 0.1.2"
git push
conda activate pypi
python -m build --wheel
twine upload dist/*

Tested new pypi package (in colab audio example notebook):

!pip install -U augly
!sudo apt-get install python3-magic

import os
import augly.audio as audaugs
import augly.utils as utils
from IPython.display import display, Audio

# Get input audio
input_audio = os.path.join(
    utils.TEST_URI, "audio", "inputs", "vad-go-stereo-44100.wav"
)
display(Audio(input_audio))

from augly.audio.utils import validate_and_load_audio

input_audio_arr, sr = validate_and_load_audio(input_audio)
meta = []
aug = audaugs.PeakingEqualizer()
aug_audio, sr = aug(input_audio_arr, sample_rate=sr, metadata=meta)
display(Audio(aug_audio, rate=sr))
meta

Copy link
Contributor

@zpapakipos zpapakipos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, and all my testing works! Thanks for making this change :) I just updated the version # in setup.py since I changed that in the change_reqs branch before uploading the package.

setup.py Outdated Show resolved Hide resolved
@zpapakipos zpapakipos merged commit 1a342a3 into facebookresearch:main Jun 22, 2021
@jbitton jbitton deleted the export-D29292956 branch June 22, 2021 15:59
tanujdhiman pushed a commit to tanujdhiman/AugLy that referenced this pull request Jul 23, 2021
…okresearch#43)

* Update `torchaudio` to 0.9 for `tensorflow-gpu` compatibility

Summary:
As called out in facebookresearch#28, there are some conflicting dependencies between `torchaudio`/`torch` 0.8.1/1.8.1 and `tensorflow-gpu`.

However, as discovered in pytorch/audio#1595, upgrading to v0.9 etc actually resolve this issue.

Thus, I update the torchaudio/torch versions in our `requirements.txt` and I also updated our `numpy` requirement so there are no conflicting dependencies between `tf-gpu` and `augly` :)

I verified on my side that all unit tests still pass and that `setup.py` finishes as expected with no errors. I also update `setup.py` to add our README to our PyPI page.

Differential Revision: D29292956

fbshipit-source-id: e07f8b3d6d2d8bc9b21af166307f2ae00dbca663

* Update setup.py

Co-authored-by: Zoe Papakipos <zpapakipos@users.noreply.github.com>
tanujdhiman pushed a commit to tanujdhiman/AugLy that referenced this pull request Oct 16, 2021
…okresearch#43)

* Update `torchaudio` to 0.9 for `tensorflow-gpu` compatibility

Summary:
As called out in facebookresearch#28, there are some conflicting dependencies between `torchaudio`/`torch` 0.8.1/1.8.1 and `tensorflow-gpu`.

However, as discovered in pytorch/audio#1595, upgrading to v0.9 etc actually resolve this issue.

Thus, I update the torchaudio/torch versions in our `requirements.txt` and I also updated our `numpy` requirement so there are no conflicting dependencies between `tf-gpu` and `augly` :)

I verified on my side that all unit tests still pass and that `setup.py` finishes as expected with no errors. I also update `setup.py` to add our README to our PyPI page.

Differential Revision: D29292956

fbshipit-source-id: e07f8b3d6d2d8bc9b21af166307f2ae00dbca663

* Update setup.py

Co-authored-by: Zoe Papakipos <zpapakipos@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants