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

Dust Off Fastaudio #121

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

kevinbird15
Copy link
Collaborator

@kevinbird15 kevinbird15 commented Dec 12, 2023

The goal if this PR is to get fastaudio back into a working state with a current version of fastai. My main goal was to get all warnings and errors resolved to get things working properly. When going through this, I didn't specify any specific libraries but that is something I think we should probably add back in before this could be merged. Huge thanks to #118 for getting this most of the way. I ended up using quite a bit of the same code and probably ran into a lot of the same issues they did initially.

closes #122 - updates ubuntu-18.04 to ubuntu-latest for one of the github action ymls

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

codecov bot commented Dec 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3d6c0a0) 86.95% compared to head (045a276) 86.94%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #121      +/-   ##
==========================================
- Coverage   86.95%   86.94%   -0.02%     
==========================================
  Files          13       13              
  Lines         843      827      -16     
  Branches       83      115      +32     
==========================================
- Hits          733      719      -14     
+ Misses         76       75       -1     
+ Partials       34       33       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

setup.cfg Outdated
torchaudio>=0.7,<0.9
librosa==0.8
colorednoise>=1.1
fastai #==2.3.1
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How should we handle versioning? I can snapshot the versions I am currently using and set them equal as we have here if that makes the most sense.

Copy link
Member

Choose a reason for hiding this comment

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

I think we should always lock the version to something

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, I will update this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I updated this, but I still don't really like it. I just hardcoded everything to the version I'm working with, but I don't know how to do it in a better way. Any suggestions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Testing something else that seems a bit better:

install_requires =
    fastai>=2.7.13,<3
    torchaudio>=2.1.1,<3
    librosa>=0.10.1,<1
    matplotlib>=3.3.3,<3.8 
    etc....

Basically saying any version greater than the one I tested, but not a major version bump

@@ -197,9 +198,9 @@ def colored_noise(shape, exponent, fmin=0, device=None):
s_scale = s_scale ** (-exponent / 2.0)

# Calculate theoretical output standard deviation from scaling
w = s_scale[1:].clone()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

clone was stripping sr. is deepcopy an ok option here or do I need to figure out why sr is getting stripped?

@@ -50,32 +48,6 @@ def tar_extract_at_filename(fname, dest):
tarfile.open(fname, "r:gz").extractall(dest)


# fix to preserve metadata for subclass tensor in serialization
# src: https://github.com/fastai/fastai/pull/3383
# TODO: remove this when #3383 lands and a new fastai version is created
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This PR went into place so I removed these because self.storage was causing issues

a2s = AudioToMFCC.from_cfg(AudioConfig.BasicMFCC())
sg = a2s(audio)
sg.show()
# def test_show_spectrogram():
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

commented this out due to #120

@kevinbird15
Copy link
Collaborator Author

How do we bump the version of fastaudio?

@mogwai
Copy link
Member

mogwai commented Dec 19, 2023

God I've forgotten, I think you just need to update the change log

Copy link
Member

@mogwai mogwai left a comment

Choose a reason for hiding this comment

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

Looks ok to me

@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.8, 3.9, '3.10', 3.11]
Copy link
Member

Choose a reason for hiding this comment

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

Why ' around the 3.10 only?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could do it around all of them if we want. but to answer your specific question, it is because 3.10 is treated as a number and the 0 is chopped off so it tried testing using 3.1 rather than 3.10 if you don't add the quotes. The rest resolve fine as is. I am definitely fine putting a quote around all of them though just for consistency

Copy link
Member

Choose a reason for hiding this comment

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

Right ok sounds good

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've added quotes to all of these in the updated version. Should I resolve the conversation or should you? I have done it both ways in different repos

@kevinbird15
Copy link
Collaborator Author

God I've forgotten, I think you just need to update the change log

I think we may just need to push to master and the github actions will create a new release. The changelog that I see (CHANGELOG.rst) doesn't look like it's been used (unless I misunderstand how it works)

@mogwai
Copy link
Member

mogwai commented Dec 29, 2023

Yeah I think so but can create a new PR to try it if it doesn't work

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.

create-release github action won't run properly
2 participants