vits icon indicating copy to clipboard operation
vits copied to clipboard

DEBUG numba

Open Ayushjaiswal12 opened this issue 2 years ago • 4 comments

I am having some debug numba core output that is running infintely. Please help me build this model on my own dataset.

Ayushjaiswal12 avatar Jul 19 '22 06:07 Ayushjaiswal12

At least for the numba debug issue, I assume you're running this in the Google Colab notebook. It's not running infinitely, the stdout on the colab is just so slow that it halts the import process.

The import that causes this issue in librosa, which has documented issues with Colab. The way I solved this was by importing librosa before the code in this repo i.e. changing the cell which imports everything to:

%matplotlib inline
import matplotlib.pyplot as plt
import IPython.display as ipd

import os
import json
import math
import torch
from torch import nn
from torch.nn import functional as F
from torch.utils.data import DataLoader

import librosa
import logging

logging.getLogger('numba').setLevel(logging.WARNING)

import commons
import utils
from data_utils import TextAudioLoader, TextAudioCollate, TextAudioSpeakerLoader, TextAudioSpeakerCollate
from models import SynthesizerTrn
from text.symbols import symbols
from text import text_to_sequence

from scipy.io.wavfile import write


def get_text(text, hps):
    text_norm = text_to_sequence(text, hps.data.text_cleaners)
    if hps.data.add_blank:
        text_norm = commons.intersperse(text_norm, 0)
    text_norm = torch.LongTensor(text_norm)
    return text_norm

The important change is

import librosa
import logging

logging.getLogger('numba').setLevel(logging.WARNING)

which stops numba from outputting the debug calls, and therefore preventing the blocking stdout messages -- hope this helps!

kradonneoh avatar Jul 29 '22 19:07 kradonneoh