fastaudio / fastai_audio

[DEPRECATED] 🔊️ Audio with fastaiv1
MIT License
160 stars 49 forks source link

Mac OSX issue with Requirement torch-1.2.0 #50

Closed Mikelew88 closed 4 years ago

Mikelew88 commented 4 years ago

Hi There,

I'm playing around with the tutorials locally on my mac for my own project but run into the following issue:

RuntimeError: RuntimeError: fft: ATen not compiled with MKL support
...
The above operation failed in interpreter, with the following stack trace:
at .../site-packages/torchaudio/functional.py:203:14
        Fourier bins, and time is the number of window hops (n_frames).
    """
    assert waveform.dim() == 2

    if pad > 0:
        # TODO add "with torch.no_grad():" back when JIT supports it
        waveform = torch.nn.functional.pad(waveform, (pad, pad), "constant")

    # default values are consistent with librosa.core.spectrum._spectrogram
    spec_f = _stft(waveform, n_fft, hop_length, win_length, window,
             ~~~~~ <--- HERE
                   True, 'reflect', False, True)

    if normalized:
        spec_f /= window.pow(2).sum().sqrt()
    spec_f = spec_f.pow(power).sum(-1)  # get power of "complex" tensor
    return spec_f

This seems to be fixed in the latest torch release (https://github.com/pytorch/pytorch/issues/18996) but with the requirement of 0.1.2 I'm curious if anyone has a suggestion to get up and running on OSX.

Thanks, Mike

mogwai commented 4 years ago

We upgraded the torch version in a recent pull request have you tried to pull from master again recently?

We don't officially support mac. Best thing would be to spin up a virtual machine with Ubuntu on it or ssh into a hosted one. There are many tutorials on the fastai site.

I'll have a go to try and recreate the error although unless you have a cuda enabled graphics card your models will train very slowly.

bigbeef105 commented 4 years ago

I have the same issue on Mac today.. I rolled back to 1.2/0.3 torchaudio to try to resolve a bug where FFT / spectrogram transform crashes the kernel every time. Now this error.

Mikelew88 commented 4 years ago

Yeah this was the latest on master, I just started working with the project yesterday. I'll go ahead and close this for now if Mac isn't really supported, and run on Ubuntu. It was the next step to get GPU acceleration anyways. Thanks for the responses.

mogwai commented 4 years ago

We created a colab notebook to get started with to if you don't have access to a ubuntu machine:

https://colab.research.google.com/drive/1s0Ouw5PxvrmHdm_gBU0qiA6piOf3VSWO

mogwai commented 4 years ago

Just realised the notebook isn't working. If somoene does get it working let me know and I'll add a link to the readme

Mikelew88 commented 4 years ago

Looks like the issue is just that the cd command isn't working, not too familiar with google collab notebooks, so not sure on the correct cd syntax. You can just change the paths to be relative from home and it works.

On Sat, Jan 25, 2020 at 6:21 AM Harry Coultas Blum notifications@github.com wrote:

Just realised the notebook isn't working. If somoene does get it working let me know and I'll add a link to the readme

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/mogwai/fastai_audio/issues/50?email_source=notifications&email_token=AD6QCBXANYSBEHKPYVBR72LQ7Q4EZA5CNFSM4KJ4T5FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ44LWA#issuecomment-578405848, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6QCBQGNII35D6HWPHFXULQ7Q4EZANCNFSM4KJ4T5FA .

mogwai commented 4 years ago

Fixed this in #52