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

[cherry-picked 2.1] Fix backward compatibility layer in backend module #3595

Closed
wants to merge 1 commit into from

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented Sep 4, 2023

The PR #3549 re-organized the backend implementations and deprecated the direct access to torchaudio.backend.

The change was supposed to be BC-compatible while issuing a warning to users, but the implementation of module-level __getattr__ was not quite right.

See an issue pyannote/pyannote-audio#1456.

This commit fixes it so that the following imports work;

from torchaudio.backend.common import AudioMetaData

from torchaudio.backend import sox_io_backend
from torchaudio.backend.sox_io_backend import save, load, info

from torchaudio.backend import no_backend
from torchaudio.backend.no_backend import save, load, info

from torchaudio.backend import soundfile_backend
from torchaudio.backend.soundfile_backend import save, load, info

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 4, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/3595

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Merge Blocking SEVs

There is 1 active merge blocking SEVs. Please view them below:

If you must merge, use @pytorchbot merge -f.

⏳ No Failures, 2 Pending

As of commit 06c6e48 with merge base 454418d (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mthrok mthrok force-pushed the fix-backend-bc branch 2 times, most recently from 80cec5a to 271719d Compare September 4, 2023 23:39
@facebook-github-bot
Copy link
Contributor

@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

The PR pytorch#3549 re-organized the backend implementations and deprecated
the direct access to torchaudio.backend.

The change was supposed to be BC-compatible while issuing a warning
to users, but the implementation of module-level `__getattr__` was
not quite right.

See an issue pyannote/pyannote-audio#1456.

This commit fixes it so that the following imports work;

```python
from torchaudio.backend.common import AudioMetaData

from torchaudio.backend import sox_io_backend
from torchaudio.backend.sox_io_backend import save, load, info

from torchaudio.backend import no_backend
from torchaudio.backend.no_backend import save, load, info

from torchaudio.backend import soundfile_backend
from torchaudio.backend.soundfile_backend import save, load, info
```
@facebook-github-bot
Copy link
Contributor

@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mthrok merged this pull request in 931598c.

@github-actions
Copy link

github-actions bot commented Sep 5, 2023

Hey @mthrok.
You merged this PR, but labels were not properly added. Please add a primary and secondary label (See https://github.com/pytorch/audio/blob/main/.github/process_commit.py).


Some guidance:

Use 'module: ops' for operations under 'torchaudio/{transforms, functional}', and ML-related components under 'torchaudio/csrc' (e.g. RNN-T loss).

Things in "examples" directory:

  • 'recipe' is applicable to training recipes under the 'examples' folder,
  • 'tutorial' is applicable to tutorials under the “examples/tutorials” folder
  • 'example' is applicable to everything else (e.g. C++ examples)
  • 'module: docs' is applicable to code documentations (not to tutorials).

Regarding examples in code documentations, please also use 'module: docs'.

Please use 'other' tag only when you’re sure the changes are not much relevant to users, or when all other tags are not applicable. Try not to use it often, in order to minimize efforts required when we prepare release notes.


When preparing release notes, please make sure 'documentation' and 'tutorials' occur as the last sub-categories under each primary category like 'new feature', 'improvements' or 'prototype'.

Things related to build are by default excluded from the release note, except when it impacts users. For example:
* Drop support of Python 3.7.
* Add support of Python 3.X.
* Change the way a third party library is bound (so that user needs to install it separately).

@mthrok mthrok deleted the fix-backend-bc branch September 5, 2023 15:10
@mthrok mthrok added the other label Sep 5, 2023
mthrok added a commit to mthrok/audio that referenced this pull request Sep 5, 2023
…orch#3595)

Summary:
The PR pytorch#3549 re-organized the backend implementations and deprecated the direct access to torchaudio.backend.

The change was supposed to be BC-compatible while issuing a warning to users, but the implementation of module-level `__getattr__` was not quite right.

See an issue pyannote/pyannote-audio#1456.

This commit fixes it so that the following imports work;

```python
from torchaudio.backend.common import AudioMetaData

from torchaudio.backend import sox_io_backend
from torchaudio.backend.sox_io_backend import save, load, info

from torchaudio.backend import no_backend
from torchaudio.backend.no_backend import save, load, info

from torchaudio.backend import soundfile_backend
from torchaudio.backend.soundfile_backend import save, load, info
```

Pull Request resolved: pytorch#3595

Reviewed By: nateanl

Differential Revision: D48957446

Pulled By: mthrok

fbshipit-source-id: ebb256461dd3032025fd27d0455ce980888f7778
mthrok added a commit that referenced this pull request Sep 5, 2023
…) (#3596)

Summary:
The PR #3549 re-organized the backend implementations and deprecated the direct access to torchaudio.backend.

The change was supposed to be BC-compatible while issuing a warning to users, but the implementation of module-level `__getattr__` was not quite right.

See an issue pyannote/pyannote-audio#1456.

This commit fixes it so that the following imports work;

```python
from torchaudio.backend.common import AudioMetaData

from torchaudio.backend import sox_io_backend
from torchaudio.backend.sox_io_backend import save, load, info

from torchaudio.backend import no_backend
from torchaudio.backend.no_backend import save, load, info

from torchaudio.backend import soundfile_backend
from torchaudio.backend.soundfile_backend import save, load, info
```

Pull Request resolved: #3595

Reviewed By: nateanl

Differential Revision: D48957446

Pulled By: mthrok

fbshipit-source-id: ebb256461dd3032025fd27d0455ce980888f7778
@mthrok mthrok changed the title Fix backward compatibility layer in backend module [cherry-picked 2.1] Fix backward compatibility layer in backend module Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants