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

Perform backend initialization in backend.__init__ #707

Merged
merged 1 commit into from Jun 9, 2020

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented Jun 8, 2020

Initialize backend in backend.__init__.py.

@mthrok mthrok force-pushed the backend-init branch 2 times, most recently from 8749477 to 15f3ebb Compare June 8, 2020 22:56
@codecov
Copy link

codecov bot commented Jun 8, 2020

Codecov Report

Merging #707 into master will decrease coverage by 0.05%.
The diff coverage is 86.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #707      +/-   ##
==========================================
- Coverage   89.29%   89.23%   -0.06%     
==========================================
  Files          25       25              
  Lines        2344     2351       +7     
==========================================
+ Hits         2093     2098       +5     
- Misses        251      253       +2     
Impacted Files Coverage Δ
torchaudio/backend/utils.py 86.66% <84.61%> (-5.34%) ⬇️
torchaudio/backend/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b788db3...d60d544. Read the comment docs.

@mthrok mthrok changed the title Move backend initialization logic to backend.__init__ Perform backend initialization in backend.__init__ Jun 9, 2020
@mthrok mthrok marked this pull request as ready for review June 9, 2020 16:16
@mthrok mthrok requested a review from vincentqb June 9, 2020 16:16
Copy link
Contributor

@vincentqb vincentqb left a comment

Choose a reason for hiding this comment

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

LGTM

elif 'soundfile' in _BACKENDS:
_BACKEND = 'soundfile'
else:
warnings.warn('No audio backend is available.')
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that a warning is more appropriate.

@mthrok mthrok merged commit 8296568 into pytorch:master Jun 9, 2020
@mthrok mthrok deleted the backend-init branch June 9, 2020 18:38
@mthrok
Copy link
Collaborator Author

mthrok commented Jun 9, 2020

Thanks!

mthrok pushed a commit to mthrok/audio that referenced this pull request Dec 13, 2022
Co-authored-by: Brian Johnson <brianjo@fb.com>
Co-authored-by: holly1238 <77758406+holly1238@users.noreply.github.com>
mpc001 pushed a commit to mpc001/audio that referenced this pull request Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants