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

This commit is contained in:
mrq 2023-02-18 03:31:44 +00:00
parent 915ab5f65d
commit 809012c84d
2 changed files with 7 additions and 7 deletions

View File

@ -37,9 +37,9 @@
"source":[ "source":[
"!git clone https://git.ecker.tech/mrq/ai-voice-cloning/\n", "!git clone https://git.ecker.tech/mrq/ai-voice-cloning/\n",
"%cd ai-voice-cloning\n", "%cd ai-voice-cloning\n",
"!apt install python3.8-venv\n", "#!apt install python3.8-venv\n",
"!python -m venv venv\n", "#!python -m venv venv\n",
"!source ./venv/bin/activate\n", "#!source ./venv/bin/activate\n",
"!git clone https://git.ecker.tech/mrq/DL-Art-School dlas\n", "!git clone https://git.ecker.tech/mrq/DL-Art-School dlas\n",
"!python -m pip install --upgrade pip\n", "!python -m pip install --upgrade pip\n",
"!pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116\n", "!pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116\n",
@ -114,7 +114,7 @@
"cell_type":"code", "cell_type":"code",
"source":[ "source":[
"%cd /content/ai-voice-cloning\n", "%cd /content/ai-voice-cloning\n",
"!source ./venv/bin/activate\n", "#!source ./venv/bin/activate\n",
"\n", "\n",
"import os\n", "import os\n",
"import sys\n", "import sys\n",

View File

@ -450,14 +450,14 @@ def run_training(config_path):
buffer=[] buffer=[]
for line in iter(training_process.stdout.readline, ""): for line in iter(training_process.stdout.readline, ""):
buffer.append(line) buffer.append(line)
print(line) print(line[:-1])
yield "".join(buffer) yield "".join(buffer)
training_process.stdout.close() training_process.stdout.close()
return_code = training_process.wait() return_code = training_process.wait()
training_process = None training_process = None
if return_code: #if return_code:
raise subprocess.CalledProcessError(return_code, cmd) # raise subprocess.CalledProcessError(return_code, cmd)
def stop_training(): def stop_training():