From ca0d87a2524a9c8612b56379ea547fcc2550ecc0 Mon Sep 17 00:00:00 2001
From: Eleni Verteouri <141945709+EleniVerteouri@users.noreply.github.com>
Date: Tue, 9 Apr 2024 20:34:03 +0200
Subject: [PATCH] openai_fine_tuning fix for asyncio (#12667)

* Add files via upload

Adding nest_asyncio.apply() to resolve RuntimeError: asyncio.run() cannot be called from a running event loop

* Delete experimental/openai_fine_tuning/openai_fine_tuning-2.ipynb

* Update openai_fine_tuning.ipynb with asyncio to fix runtime error
---
 .../openai_fine_tuning/openai_fine_tuning.ipynb       | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/experimental/openai_fine_tuning/openai_fine_tuning.ipynb b/experimental/openai_fine_tuning/openai_fine_tuning.ipynb
index c3c2e559f3..3269ef18be 100644
--- a/experimental/openai_fine_tuning/openai_fine_tuning.ipynb
+++ b/experimental/openai_fine_tuning/openai_fine_tuning.ipynb
@@ -131,6 +131,17 @@
     ")"
    ]
   },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import nest_asyncio\n",
+    "\n",
+    "nest_asyncio.apply()"
+   ]
+  },
   {
    "cell_type": "code",
    "execution_count": null,
-- 
GitLab