Suppress Validation Batch in training

This commit is contained in:
MasterPhooey
2025-12-31 08:43:09 -06:00
parent 3dd305e560
commit 2f9877c745

View File

@@ -854,6 +854,7 @@
"source": [ "source": [
"# Train + export with GPU first, then automatic CPU fallback on GPU/VRAM errors\n", "# Train + export with GPU first, then automatic CPU fallback on GPU/VRAM errors\n",
"# (LIVE streaming output + full log capture for error detection)\n", "# (LIVE streaming output + full log capture for error detection)\n",
"# NOTE: Suppress ONLY the noisy \"Validation Batch #...\" lines (everything else still streams)\n",
"import os, sys, subprocess, textwrap\n", "import os, sys, subprocess, textwrap\n",
"\n", "\n",
"# ---- Common TF env (applies to BOTH attempts) ----\n", "# ---- Common TF env (applies to BOTH attempts) ----\n",
@@ -931,8 +932,14 @@
" # Stream lines live AND capture them for OOM detection / error messages\n", " # Stream lines live AND capture them for OOM detection / error messages\n",
" assert proc.stdout is not None\n", " assert proc.stdout is not None\n",
" for line in proc.stdout:\n", " for line in proc.stdout:\n",
" print(line, end=\"\")\n",
" full_log.append(line)\n", " full_log.append(line)\n",
"\n",
" # Hide ONLY the per-minibatch validation spam\n",
" if line.startswith(\"Validation Batch #\"):\n",
" continue\n",
"\n",
" # Everything else streams live\n",
" print(line, end=\"\")\n",
" finally:\n", " finally:\n",
" returncode = proc.wait()\n", " returncode = proc.wait()\n",
"\n", "\n",