You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeError Traceback (most recent call last)
Cell In[4], line 22
20 break
21 final_results = {}
---> 22 for results in webglm.stream_query(question):
23 final_results.update(results)
24 if "references" in results:
File ~/rknn/WebGLM/model/modeling_webglm.py:36, in WebGLM.stream_query(self, question)
35 def stream_query(self, question):
---> 36 refs = self.ref_retriever.query(question)
37 if not refs:
38 yield { "references": [], "answer": "" }
File ~/rknn/WebGLM/model/retriever/init.py:27, in ReferenceRetiever.query(self, question)
24 return None
26 print("[System] Fetching ...")
---> 27 fetch_results = self.fetcher.fetch(urls)
28 cnt = sum([len(fetch_results[key]) for key in fetch_results])
29 print("[System] Count of available fetch results: ", cnt)
File ~/rknn/WebGLM/model/retriever/fetching/init.py:28, in Fetcher.fetch(self, urls)
24 def fetch(self, urls: List[str]) -> Dict[str, List[str]]:
26 urls = self._pre_handle_urls(urls)
---> 28 self.loop.run_until_complete(get_raw_pages(urls, close_browser=True))
29 responses = [playwright_based_crawl_new.results[url] for url in urls]
31 ret = dict()
File ~/anaconda3/lib/python3.10/asyncio/base_events.py:625, in BaseEventLoop.run_until_complete(self, future)
614 """Run until the Future is done.
615
616 If the argument is a coroutine, it is wrapped in a Task.
(...)
622 Return the Future's result, or raise its exception.
623 """
624 self._check_closed()
--> 625 self._check_running()
627 new_task = not futures.isfuture(future)
628 future = tasks.ensure_future(future, loop=self)
File ~/anaconda3/lib/python3.10/asyncio/base_events.py:584, in BaseEventLoop._check_running(self)
582 def _check_running(self):
583 if self.is_running():
--> 584 raise RuntimeError('This event loop is already running')
585 if events._get_running_loop() is not None:
586 raise RuntimeError(
587 'Cannot run the event loop while another loop is running')
RuntimeError: This event loop is already running
The text was updated successfully, but these errors were encountered:
RuntimeError Traceback (most recent call last)
Cell In[4], line 22
20 break
21 final_results = {}
---> 22 for results in webglm.stream_query(question):
23 final_results.update(results)
24 if "references" in results:
File ~/rknn/WebGLM/model/modeling_webglm.py:36, in WebGLM.stream_query(self, question)
35 def stream_query(self, question):
---> 36 refs = self.ref_retriever.query(question)
37 if not refs:
38 yield { "references": [], "answer": "" }
File ~/rknn/WebGLM/model/retriever/init.py:27, in ReferenceRetiever.query(self, question)
24 return None
26 print("[System] Fetching ...")
---> 27 fetch_results = self.fetcher.fetch(urls)
28 cnt = sum([len(fetch_results[key]) for key in fetch_results])
29 print("[System] Count of available fetch results: ", cnt)
File ~/rknn/WebGLM/model/retriever/fetching/init.py:28, in Fetcher.fetch(self, urls)
24 def fetch(self, urls: List[str]) -> Dict[str, List[str]]:
26 urls = self._pre_handle_urls(urls)
---> 28 self.loop.run_until_complete(get_raw_pages(urls, close_browser=True))
29 responses = [playwright_based_crawl_new.results[url] for url in urls]
31 ret = dict()
File ~/anaconda3/lib/python3.10/asyncio/base_events.py:625, in BaseEventLoop.run_until_complete(self, future)
614 """Run until the Future is done.
615
616 If the argument is a coroutine, it is wrapped in a Task.
(...)
622 Return the Future's result, or raise its exception.
623 """
624 self._check_closed()
--> 625 self._check_running()
627 new_task = not futures.isfuture(future)
628 future = tasks.ensure_future(future, loop=self)
File ~/anaconda3/lib/python3.10/asyncio/base_events.py:584, in BaseEventLoop._check_running(self)
582 def _check_running(self):
583 if self.is_running():
--> 584 raise RuntimeError('This event loop is already running')
585 if events._get_running_loop() is not None:
586 raise RuntimeError(
587 'Cannot run the event loop while another loop is running')
RuntimeError: This event loop is already running
The text was updated successfully, but these errors were encountered: