We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 968742d commit 01c2d35Copy full SHA for 01c2d35
tests/trainer/resources/mnist.ipynb
@@ -513,12 +513,10 @@
513
"job = client.get_job(name=job_name)\n",
514
"pod_logs = client.get_job_logs(name=job_name, follow=False)\n",
515
"\n",
516
- "# Flatten all pod logs into a single list of lines\n",
517
- "logs = []\n",
518
- "for log_line in pod_logs:\n",
519
- " logs.extend(str(log_line).splitlines())\n",
+ "# Collect all log lines from the generator into a list\n",
+ "logs = list(pod_logs)\n",
+ "log_text = \"\\n\".join(str(line) for line in logs)\n",
520
521
- "log_text = \"\\n\".join(logs)\n",
522
523
"print(f\"Training job final status: {job.status}\")\n",
524
0 commit comments