โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Traceback (most recent call last) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ in <cell line: 3>:3 โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ locals โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ Dataset = <class 'datasets.arrow_dataset.Dataset'> โ โ
โ โ Dict = typing.Dict โ โ
โ โ document = [ โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN EN \n \n \n EUROPEAN โ โ
โ โ \nCOMMISSION \nBrussels, 21.4.2021 \nCOM(2021) 206 โ โ
โ โ final'+308, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 0 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN 1 EN EXPLANATORY MEMORANDUM \n1. โ โ
โ โ CONTEXT OF THE PROPOSAL \n1.1. Reasons fo'+3873, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 1 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN 2 EN intelligence as stated by โ โ
โ โ the European Council3 and ensures the protect'+4148, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 2 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN 3 EN proposal takes into account โ โ
โ โ the aforementioned resolution of the Europe'+3626, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 3 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN 4 EN 1.2. Consistency with โ โ
โ โ existing policy pr ovisions in the policy area \n'+3902, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 4 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN 5 EN This proposal is also โ โ
โ โ consistent with the applicable Union legislation '+3839, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 5 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN 6 EN 2. LEGAL BASIS, โ โ
โ โ SUBSIDIARITY AND PROPORTIONALITY \n2.1. Legal โ โ
โ โ basi'+3628, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 6 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN 7 EN 2.3. Proportionality \nThe โ โ
โ โ proposal builds on existing legal frameworks'+3464, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 7 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN 8 EN academic/research โ โ
โ โ institutions, a nd 73 from public authorities. Civil โ โ
โ โ '+3721, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 8 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN 9 EN In addition, the AI โ โ
โ โ Alliance26 was formed as a platform for approximate'+3401, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 9 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ ... +98 โ โ
โ โ ] โ โ
โ โ drive = <module 'google.colab.drive' from โ โ
โ โ '/usr/local/lib/python3.10/dist-packages/google/colab/drivโฆ โ โ
โ โ exit = <IPython.core.autocall.ZMQExitAutocall object at โ โ
โ โ 0x7db0dbc37d90> โ โ
โ โ get_ipython = <bound method InteractiveShell.get_ipython of โ โ
โ โ <google.colab._shell.Shell object at 0x7db0dbc377f0>> โ โ
โ โ In = [ โ โ
โ โ โ '', โ โ
โ โ โ "get_ipython().system('pip install -qU distilabel โ โ
โ โ langchain pypdf')", โ โ
โ โ โ 'import os\nfrom typing import Dict\nfrom โ โ
โ โ distilabel.llms.huggingface import Infere'+120, โ โ
โ โ โ 'os.environ["HF_TOKEN"] = โ โ
โ โ "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"\nos.environ["HF_'+โฆ โ โ
โ โ โ 'from datasets import Dataset\nfrom โ โ
โ โ langchain_community.document_loaders import Py'+9, โ โ
โ โ โ "from google.colab import โ โ
โ โ drive\ndrive.mount('/content/drive')", โ โ
โ โ โ 'loader = โ โ
โ โ PyPDFLoader("/content/drive/MyDrive/EU_AI_Act_Doc.pdf")\ndโฆ โ โ
โ โ = load'+9, โ โ
โ โ โ 'print(len(document))', โ โ
โ โ โ 'from langchain.text_splitter import โ โ
โ โ RecursiveCharacterTextSplitter\nMARKDOWN_SEPA'+318, โ โ
โ โ โ 'splits = text_splitter.split_documents(document)', โ โ
โ โ โ ... +46 โ โ
โ โ ] โ โ
โ โ InferenceEndpointsLLM = <class โ โ
โ โ 'distilabel.llms.huggingface.inference_endpoints.Inferenceโฆ โ โ
โ โ inputs = [ โ โ
โ โ โ { โ โ
โ โ โ โ 'question': "What's the second most populated city โ โ
โ โ in Denmark?" โ โ
โ โ โ } โ โ
โ โ ] โ โ
โ โ instructions_dataset = Dataset({ โ โ
โ โ โ features: ['input'], โ โ
โ โ โ num_rows: 50 โ โ
โ โ }) โ โ
โ โ llm = InferenceEndpointsLLM( โ โ
โ โ โ generation_kwargs={}, โ โ
โ โ โ model_id='mistralai/Mistral-7B-Instruct-v0.2', โ โ
โ โ โ endpoint_name=None, โ โ
โ โ โ endpoint_namespace=None, โ โ
โ โ โ โ โ
โ โ base_url='https://api-inference.huggingface.co/models/mistโฆ โ โ
โ โ โ api_key=SecretStr('**********'), โ โ
โ โ โ tokenizer_id=None, โ โ
โ โ โ model_display_name=None, โ โ
โ โ โ use_openai_client=False โ โ
โ โ ) โ โ
โ โ loader = <langchain_community.document_loaders.pdf.PyPDFLoader โ โ
โ โ object at 0x7db095942c50> โ โ
โ โ MARKDOWN_SEPARATORS = [ โ โ
โ โ โ '\n#{1,6} ', โ โ
โ โ โ '```\n', โ โ
โ โ โ '\n\\*\\*\\*+\n', โ โ
โ โ โ '\n---+\n', โ โ
โ โ โ '\n___+\n', โ โ
โ โ โ '\n\n', โ โ
โ โ โ '\n', โ โ
โ โ โ ' ', โ โ
โ โ โ '' โ โ
โ โ ] โ โ
โ โ os = <module 'os' from '/usr/lib/python3.10/os.py'> โ โ
โ โ Out = { โ โ
โ โ โ 10: 'EN 6 EN 2. LEGAL BASIS, SUBSIDIARITY AND โ โ
โ โ PROPORTIONALITY \n2.1. Legal basi'+901, โ โ
โ โ โ 11: 'EN EN \n \n \n EUROPEAN \nCOMMISSION โ โ
โ โ \nBrussels, 21.4.2021 \nCOM(2021) 206 final'+308, โ โ
โ โ โ 12: Dataset({ โ โ
โ โ โ features: ['input'], โ โ
โ โ โ num_rows: 50 โ โ
โ โ }), โ โ
โ โ โ 31: 'EN 6 EN 2. LEGAL BASIS, SUBSIDIARITY AND โ โ
โ โ PROPORTIONALITY \n2.1. Legal basi'+901, โ โ
โ โ โ 32: 'EN EN \n \n \n EUROPEAN \nCOMMISSION โ โ
โ โ \nBrussels, 21.4.2021 \nCOM(2021) 206 final'+308, โ โ
โ โ โ 33: Dataset({ โ โ
โ โ โ features: ['input'], โ โ
โ โ โ num_rows: 50 โ โ
โ โ }), โ โ
โ โ โ 47: 'EN 6 EN 2. LEGAL BASIS, SUBSIDIARITY AND โ โ
โ โ PROPORTIONALITY \n2.1. Legal basi'+901, โ โ
โ โ โ 48: 'EN EN \n \n \n EUROPEAN \nCOMMISSION โ โ
โ โ \nBrussels, 21.4.2021 \nCOM(2021) 206 final'+308, โ โ
โ โ โ 49: Dataset({ โ โ
โ โ โ features: ['input'], โ โ
โ โ โ num_rows: 50 โ โ
โ โ }) โ โ
โ โ } โ โ
โ โ Pipeline = <class 'distilabel.pipeline.local.Pipeline'> โ โ
โ โ PyPDFLoader = <class โ โ
โ โ 'langchain_community.document_loaders.pdf.PyPDFLoader'> โ โ
โ โ QuestionAnsweringTask = <class '__main__.QuestionAnsweringTask'> โ โ
โ โ quit = <IPython.core.autocall.ZMQExitAutocall object at โ โ
โ โ 0x7db0dbc37d90> โ โ
โ โ RecursiveCharacterTextSplitter = <class โ โ
โ โ 'langchain_text_splitters.character.RecursiveCharacterTextโฆ โ โ
โ โ SelfInstruct = <class 'distilabel.steps.tasks.self_instruct.SelfInstruct'> โ โ
โ โ splits = [ โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN EN \n \n \n EUROPEAN โ โ
โ โ \nCOMMISSION \nBrussels, 21.4.2021 \nCOM(2021) 206 โ โ
โ โ final'+305, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 0, โ โ
โ โ โ โ โ 'start_index': 0 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN 1 EN EXPLANATORY MEMORANDUM \n1. โ โ
โ โ CONTEXT OF THE PROPOSAL \n1.1. Reasons fo'+875, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 1, โ โ
โ โ โ โ โ 'start_index': 0 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='elements and techniques that power โ โ
โ โ the socio -economic benefits of AI can also b'+877, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 1, โ โ
โ โ โ โ โ 'start_index': 957 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='to excellence and trust2. The White โ โ
โ โ Paper sets out policy options on how to ach'+848, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 1, โ โ
โ โ โ โ โ 'start_index': 1916 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='of fundamental rights. Following the โ โ
โ โ publication of the White Paper, the Commiss'+887, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 1, โ โ
โ โ โ โ โ 'start_index': 2846 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='2 European Commission, White Paper on โ โ
โ โ Artificial Intelligence - A European appro'+55, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 1, โ โ
โ โ โ โ โ 'start_index': 3816 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='EN 2 EN intelligence as stated by โ โ
โ โ the European Council3 and ensures the protect'+836, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 2, โ โ
โ โ โ โ โ 'start_index': 0 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='The most recent Conclusi ons from 21 โ โ
โ โ October 2020 further called for addressing'+876, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 2, โ โ
โ โ โ โ โ 'start_index': 919 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='resolution includes a text of the โ โ
โ โ legislative proposal for a regulation on ethic'+880, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 2, โ โ
โ โ โ โ โ 'start_index': 1877 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ Document( โ โ
โ โ โ โ page_content='artificial intelligence -Adoption โ โ
โ โ 6177/19, 2019. \n7 European Council, Special '+894, โ โ
โ โ โ โ metadata={ โ โ
โ โ โ โ โ 'source': โ โ
โ โ '/content/drive/MyDrive/EU_AI_Act_Doc.pdf', โ โ
โ โ โ โ โ 'page': 2, โ โ
โ โ โ โ โ 'start_index': 2839 โ โ
โ โ โ โ } โ โ
โ โ โ ), โ โ
โ โ โ ... +372 โ โ
โ โ ] โ โ
โ โ text_splitter = <langchain_text_splitters.character.RecursiveCharacterTextโฆ โ โ
โ โ object at 0x7db097424ee0> โ โ
โ โ TextGeneration = <class โ โ
โ โ 'distilabel.steps.tasks.text_generation.TextGeneration'> โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ /usr/local/lib/python3.10/dist-packages/distilabel/llms/huggingface/inference_endpoints.py:407 โ
โ in generate โ
โ โ
โ 404 โ โ โ ] โ
โ 405 โ โ โ return [outputs[0] for outputs in await asyncio.gather(*tasks)] โ
โ 406 โ โ โ
โ โฑ 407 โ โ outputs = self.event_loop.run_until_complete(agenerate(inputs, **kwargs)) โ
โ 408 โ โ return list(grouper(outputs, n=num_generations, incomplete="ignore")) โ
โ 409 โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ locals โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ agenerate = <function InferenceEndpointsLLM.generate.<locals>.agenerate at โ โ
โ โ 0x7db0973eb1c0> โ โ
โ โ inputs = [{'question': "What's the second most populated city in Denmark?"}] โ โ
โ โ kwargs = {} โ โ
โ โ num_generations = 1 โ โ
โ โ self = InferenceEndpointsLLM( โ โ
โ โ โ generation_kwargs={}, โ โ
โ โ โ model_id='mistralai/Mistral-7B-Instruct-v0.2', โ โ
โ โ โ endpoint_name=None, โ โ
โ โ โ endpoint_namespace=None, โ โ
โ โ โ โ โ
โ โ base_url='https://api-inference.huggingface.co/models/mistralai/Mistral-7โฆ โ โ
โ โ โ api_key=SecretStr('**********'), โ โ
โ โ โ tokenizer_id=None, โ โ
โ โ โ model_display_name=None, โ โ
โ โ โ use_openai_client=False โ โ
โ โ ) โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ /usr/local/lib/python3.10/dist-packages/nest_asyncio.py:98 in run_until_complete โ
โ โ
โ 95 โ โ โ if not f.done(): โ
โ 96 โ โ โ โ raise RuntimeError( โ
โ 97 โ โ โ โ โ 'Event loop stopped before Future completed.') โ
โ โฑ 98 โ โ โ return f.result() โ
โ 99 โ โ
โ 100 โ def _run_once(self): โ
โ 101 โ โ """ โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ locals โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ f = <Task finished name='Task-8' โ โ
โ โ coro=<InferenceEndpointsLLM.generate.<locals>.agenerate() done, defined at โ โ
โ โ /usr/local/lib/python3.10/dist-packages/distilabel/llms/huggingface/inference_โฆ โ โ
โ โ exception=1 validation error for agenerate โ โ
โ โ input โ โ
โ โ Input should be a valid list [type=list_type, input_value={'question': โ โ
โ โ "What's the ...lated city in Denmark?"}, input_type=dict] โ โ
โ โ โ For further information visit https://errors.pydantic.dev/2.7/v/list_type> โ โ
โ โ future = <coroutine object InferenceEndpointsLLM.generate.<locals>.agenerate at โ โ
โ โ 0x7db0979c57e0> โ โ
โ โ manage_run = <function _patch_loop.<locals>.manage_run at 0x7db0ad7fb010> โ โ
โ โ self = <_UnixSelectorEventLoop running=True closed=False debug=False> โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ /usr/lib/python3.10/asyncio/futures.py:201 in result โ
โ โ
โ 198 โ โ โ raise exceptions.InvalidStateError('Result is not ready.') โ
โ 199 โ โ self.__log_traceback = False โ
โ 200 โ โ if self._exception is not None: โ
โ โฑ 201 โ โ โ raise self._exception.with_traceback(self._exception_tb) โ
โ 202 โ โ return self._result โ
โ 203 โ โ
โ 204 โ def exception(self): โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ locals โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ self = <Task finished name='Task-8' โ โ
โ โ coro=<InferenceEndpointsLLM.generate.<locals>.agenerate() done, defined at โ โ
โ โ /usr/local/lib/python3.10/dist-packages/distilabel/llms/huggingface/inference_endpoiโฆ โ โ
โ โ exception=1 validation error for agenerate โ โ
โ โ input โ โ
โ โ Input should be a valid list [type=list_type, input_value={'question': "What's the โ โ
โ โ ...lated city in Denmark?"}, input_type=dict] โ โ
โ โ โ For further information visit https://errors.pydantic.dev/2.7/v/list_type> โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ /usr/lib/python3.10/asyncio/tasks.py:232 in __step โ
โ โ
โ 229 โ โ โ if exc is None: โ
โ 230 โ โ โ โ # We use the `send` method directly, because coroutines โ
โ 231 โ โ โ โ # don't have `__iter__` and `__next__` methods. โ
โ โฑ 232 โ โ โ โ result = coro.send(None) โ
โ 233 โ โ โ else: โ
โ 234 โ โ โ โ result = coro.throw(exc) โ
โ 235 โ โ except StopIteration as exc: โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ locals โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ coro = <coroutine object InferenceEndpointsLLM.generate.<locals>.agenerate at โ โ
โ โ 0x7db0979c57e0> โ โ
โ โ self = None โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ /usr/local/lib/python3.10/dist-packages/distilabel/llms/huggingface/inference_endpoints.py:400 โ
โ in agenerate โ
โ โ
โ 397 โ โ โ inputs: List["ChatType"], **kwargs: Any โ
โ 398 โ โ ) -> "GenerateOutput": โ
โ 399 โ โ โ """Internal function to parallelize the asynchronous generation of responses โ
โ โฑ 400 โ โ โ tasks = [ โ
โ 401 โ โ โ โ asyncio.create_task(self.agenerate(input=input, **kwargs)) โ
โ 402 โ โ โ โ for input in inputs โ
โ 403 โ โ โ โ for _ in range(num_generations) โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ locals โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ inputs = [{'question': "What's the second most populated city in Denmark?"}] โ โ
โ โ kwargs = {} โ โ
โ โ num_generations = 1 โ โ
โ โ self = InferenceEndpointsLLM( โ โ
โ โ โ generation_kwargs={}, โ โ
โ โ โ model_id='mistralai/Mistral-7B-Instruct-v0.2', โ โ
โ โ โ endpoint_name=None, โ โ
โ โ โ endpoint_namespace=None, โ โ
โ โ โ โ โ
โ โ base_url='https://api-inference.huggingface.co/models/mistralai/Mistral-7โฆ โ โ
โ โ โ api_key=SecretStr('**********'), โ โ
โ โ โ tokenizer_id=None, โ โ
โ โ โ model_display_name=None, โ โ
โ โ โ use_openai_client=False โ โ
โ โ ) โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ /usr/local/lib/python3.10/dist-packages/distilabel/llms/huggingface/inference_endpoints.py:401 โ
โ in <listcomp> โ
โ โ
โ 398 โ โ ) -> "GenerateOutput": โ
โ 399 โ โ โ """Internal function to parallelize the asynchronous generation of responses โ
โ 400 โ โ โ tasks = [ โ
โ โฑ 401 โ โ โ โ asyncio.create_task(self.agenerate(input=input, **kwargs)) โ
โ 402 โ โ โ โ for input in inputs โ
โ 403 โ โ โ โ for _ in range(num_generations) โ
โ 404 โ โ โ ] โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ locals โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ .0 = <list_iterator object at 0x7db0957fd210> โ โ
โ โ input = {'question': "What's the second most populated city in Denmark?"} โ โ
โ โ kwargs = {} โ โ
โ โ num_generations = 1 โ โ
โ โ self = InferenceEndpointsLLM( โ โ
โ โ โ generation_kwargs={}, โ โ
โ โ โ model_id='mistralai/Mistral-7B-Instruct-v0.2', โ โ
โ โ โ endpoint_name=None, โ โ
โ โ โ endpoint_namespace=None, โ โ
โ โ โ โ โ
โ โ base_url='https://api-inference.huggingface.co/models/mistralai/Mistral-7โฆ โ โ
โ โ โ api_key=SecretStr('**********'), โ โ
โ โ โ tokenizer_id=None, โ โ
โ โ โ model_display_name=None, โ โ
โ โ โ use_openai_client=False โ โ
โ โ ) โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ /usr/local/lib/python3.10/dist-packages/pydantic/validate_call_decorator.py:59 in โ
โ wrapper_function โ
โ โ
โ 56 โ โ โ
โ 57 โ โ @functools.wraps(function) โ
โ 58 โ โ def wrapper_function(*args, **kwargs): โ
โ โฑ 59 โ โ โ return validate_call_wrapper(*args, **kwargs) โ
โ 60 โ โ โ
โ 61 โ โ wrapper_function.raw_function = function # type: ignore โ
โ 62 โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ locals โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ args = ( โ โ
โ โ โ InferenceEndpointsLLM( โ โ
โ โ โ โ generation_kwargs={}, โ โ
โ โ โ โ model_id='mistralai/Mistral-7B-Instruct-v0.2', โ โ
โ โ โ โ endpoint_name=None, โ โ
โ โ โ โ endpoint_namespace=None, โ โ
โ โ โ โ โ โ
โ โ base_url='https://api-inference.huggingface.co/models/mistralai/Misโฆ โ โ
โ โ โ โ api_key=SecretStr('**********'), โ โ
โ โ โ โ tokenizer_id=None, โ โ
โ โ โ โ model_display_name=None, โ โ
โ โ โ โ use_openai_client=False โ โ
โ โ โ ), โ โ
โ โ ) โ โ
โ โ kwargs = { โ โ
โ โ โ 'input': { โ โ
โ โ โ โ 'question': "What's the second most populated city in โ โ
โ โ Denmark?" โ โ
โ โ โ } โ โ
โ โ } โ โ
โ โ validate_call_wrapper = <pydantic._internal._validate_call.ValidateCallWrapper object at โ โ
โ โ 0x7db099202a70> โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ /usr/local/lib/python3.10/dist-packages/pydantic/_internal/_validate_call.py:81 in __call__ โ
โ โ
โ 78 โ โ โ self.__return_pydantic_validator__ = None โ
โ 79 โ โ
โ 80 โ def __call__(self, *args: Any, **kwargs: Any) -> Any: โ
โ โฑ 81 โ โ res = self.__pydantic_validator__.validate_python(pydantic_core.ArgsKwargs(args, โ
โ 82 โ โ if self.__return_pydantic_validator__: โ
โ 83 โ โ โ return self.__return_pydantic_validator__(res) โ
โ 84 โ โ return res โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ locals โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ args = ( โ โ
โ โ โ InferenceEndpointsLLM( โ โ
โ โ โ โ generation_kwargs={}, โ โ
โ โ โ โ model_id='mistralai/Mistral-7B-Instruct-v0.2', โ โ
โ โ โ โ endpoint_name=None, โ โ
โ โ โ โ endpoint_namespace=None, โ โ
โ โ โ โ โ โ
โ โ base_url='https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instrucโฆ โ โ
โ โ โ โ api_key=SecretStr('**********'), โ โ
โ โ โ โ tokenizer_id=None, โ โ
โ โ โ โ model_display_name=None, โ โ
โ โ โ โ use_openai_client=False โ โ
โ โ โ ), โ โ
โ โ ) โ โ
โ โ kwargs = {'input': {'question': "What's the second most populated city in Denmark?"}} โ โ
โ โ self = <pydantic._internal._validate_call.ValidateCallWrapper object at 0x7db099202a70> โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
ValidationError: 1 validation error for agenerate
input
Input should be a valid list [type=list_type, input_value={'question': "What's the ...lated city in Denmark?"},
input_type=dict]
For further information visit https://errors.pydantic.dev/2.7/v/list_type