mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-02-13 14:50:23 +00:00
replace warn (#1255)
This commit is contained in:
@@ -113,7 +113,7 @@ class TextAudioLoaderMultiNSFsid(torch.utils.data.Dataset):
|
||||
try:
|
||||
spec = torch.load(spec_filename)
|
||||
except:
|
||||
logger.warn("%s %s", spec_filename, traceback.format_exc())
|
||||
logger.warning("%s %s", spec_filename, traceback.format_exc())
|
||||
spec = spectrogram_torch(
|
||||
audio_norm,
|
||||
self.filter_length,
|
||||
@@ -305,7 +305,7 @@ class TextAudioLoader(torch.utils.data.Dataset):
|
||||
try:
|
||||
spec = torch.load(spec_filename)
|
||||
except:
|
||||
logger.warn("%s %s", spec_filename, traceback.format_exc())
|
||||
logger.warning("%s %s", spec_filename, traceback.format_exc())
|
||||
spec = spectrogram_torch(
|
||||
audio_norm,
|
||||
self.filter_length,
|
||||
|
||||
@@ -33,7 +33,7 @@ def load_checkpoint_d(checkpoint_path, combd, sbd, optimizer=None, load_opt=1):
|
||||
try:
|
||||
new_state_dict[k] = saved_state_dict[k]
|
||||
if saved_state_dict[k].shape != state_dict[k].shape:
|
||||
logger.warn(
|
||||
logger.warning(
|
||||
"shape-%s-mismatch. need: %s, get: %s",
|
||||
k,
|
||||
state_dict[k].shape,
|
||||
@@ -111,7 +111,7 @@ def load_checkpoint(checkpoint_path, model, optimizer=None, load_opt=1):
|
||||
try:
|
||||
new_state_dict[k] = saved_state_dict[k]
|
||||
if saved_state_dict[k].shape != state_dict[k].shape:
|
||||
logger.warn(
|
||||
logger.warning(
|
||||
"shape-%s-mismatch|need-%s|get-%s",
|
||||
k,
|
||||
state_dict[k].shape,
|
||||
@@ -409,7 +409,7 @@ def get_hparams_from_file(config_path):
|
||||
def check_git_hash(model_dir):
|
||||
source_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
if not os.path.exists(os.path.join(source_dir, ".git")):
|
||||
logger.warn(
|
||||
logger.warning(
|
||||
"{} is not a git repository, therefore hash value comparison will be ignored.".format(
|
||||
source_dir
|
||||
)
|
||||
@@ -422,7 +422,7 @@ def check_git_hash(model_dir):
|
||||
if os.path.exists(path):
|
||||
saved_hash = open(path).read()
|
||||
if saved_hash != cur_hash:
|
||||
logger.warn(
|
||||
logger.warning(
|
||||
"git hash values are different. {}(saved) != {}(current)".format(
|
||||
saved_hash[:8], cur_hash[:8]
|
||||
)
|
||||
|
||||
@@ -99,7 +99,7 @@ def main():
|
||||
n_gpus = 1
|
||||
if n_gpus < 1:
|
||||
# patch to unblock people without gpus. there is probably a better way.
|
||||
logger.warn("NO GPU DETECTED: falling back to CPU - this may take a while")
|
||||
logger.warning("NO GPU DETECTED: falling back to CPU - this may take a while")
|
||||
n_gpus = 1
|
||||
os.environ["MASTER_ADDR"] = "localhost"
|
||||
os.environ["MASTER_PORT"] = str(randint(20000, 55555))
|
||||
|
||||
@@ -224,7 +224,7 @@ class VC:
|
||||
)
|
||||
except:
|
||||
info = traceback.format_exc()
|
||||
logger.warn(info)
|
||||
logger.warning(info)
|
||||
return info, (None, None)
|
||||
|
||||
def vc_multi(
|
||||
|
||||
Reference in New Issue
Block a user