Skip to content

Remove custom flashlight import #3246

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

Closed
wants to merge 1 commit into from

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented Apr 6, 2023

In #3232, the CTC decoder is excluded from binary distribution.
To use CTCDecoder, users need to install flashlight-text.

Currently, if flashlight-text is not available, torchaudio still attempts to import the custom bundle.
This commit clean up this behavior by delaying the error until one of the components is actually used,
and providing a better message.

Test:
Binary smoke tests import torchaudio without installing flashlight.
Unit test CI jobs run the CTC decoder with flashlight installed.

@mthrok mthrok marked this pull request as ready for review April 6, 2023 13:49
@mthrok mthrok force-pushed the cleanup-flashlight branch from d912519 to 826c6a6 Compare April 6, 2023 13:50
@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 requested a review from a team April 6, 2023 13:51
Summary:
In pytorch#3232, the CTC decoder is excluded from binary distribution.
To use CTCDecoder, users need to install flashlight-text.

Currently, if flashlight-text is not available, torchaudio still attempts to import the custom bundle.
This commit clean up this behavior by delaying the error until one of the components is actually used,
and providing a better message.

Pull Request resolved: pytorch#3246

Test Plan:
Binary smoke tests import torchaudio without installing flashlight.
Unit test CI jobs run the CTC decoder with flashlight installed.

Differential Revision: D44748413

Pulled By: mthrok

fbshipit-source-id: 3314831e0dbd8ff40f249e81b81c311c91d4d198
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@mthrok merged this pull request in ae614ed.

@github-actions
Copy link

github-actions bot commented Apr 6, 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)

@mthrok mthrok deleted the cleanup-flashlight branch April 6, 2023 20:39
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.

2 participants