From 809012c84d46453b17b355d4fb3b019b49f0f8c7 Mon Sep 17 00:00:00 2001 From: mrq Date: Sat, 18 Feb 2023 03:31:44 +0000 Subject: [PATCH] debugging in colab is pure cock and ball torture because sometimes the files don't actually update when edited, and sometimes they update after I restart the runtime, notebook can't use venv because I can't source it in a subprocess shell call --- notebook.ipynb | 8 ++++---- src/utils.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/notebook.ipynb b/notebook.ipynb index 6569fcd..a2812ba 100755 --- a/notebook.ipynb +++ b/notebook.ipynb @@ -37,9 +37,9 @@ "source":[ "!git clone https://git.ecker.tech/mrq/ai-voice-cloning/\n", "%cd ai-voice-cloning\n", - "!apt install python3.8-venv\n", - "!python -m venv venv\n", - "!source ./venv/bin/activate\n", + "#!apt install python3.8-venv\n", + "#!python -m venv venv\n", + "#!source ./venv/bin/activate\n", "!git clone https://git.ecker.tech/mrq/DL-Art-School dlas\n", "!python -m pip install --upgrade pip\n", "!pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116\n", @@ -114,7 +114,7 @@ "cell_type":"code", "source":[ "%cd /content/ai-voice-cloning\n", - "!source ./venv/bin/activate\n", + "#!source ./venv/bin/activate\n", "\n", "import os\n", "import sys\n", diff --git a/src/utils.py b/src/utils.py index 3f336c5..fb1de93 100755 --- a/src/utils.py +++ b/src/utils.py @@ -450,14 +450,14 @@ def run_training(config_path): buffer=[] for line in iter(training_process.stdout.readline, ""): buffer.append(line) - print(line) + print(line[:-1]) yield "".join(buffer) training_process.stdout.close() return_code = training_process.wait() training_process = None - if return_code: - raise subprocess.CalledProcessError(return_code, cmd) + #if return_code: + # raise subprocess.CalledProcessError(return_code, cmd) def stop_training():