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
[02/03/25 14:19:48] INFO ['distilabel.pipeline'] π Pipeline data will be written to [base.py](file:///home/codespace/.python/current/lib/python3.12/site-packages/distilabel/pipeline/base.py):[1015](file:///home/codespace/.python/current/lib/python3.12/site-packages/distilabel/pipeline/base.py#1015)
'/home/codespace/.cache/distilabel/pipelines/ExamGenerator/1f7e4d598a0cea
173a88dd3cab208de83ec78fb0/executions/cdb962598e43a9709e9fb3323a9de0f3e4d
b2363/data/steps_outputs'
INFO ['distilabel.pipeline'] β The steps of the pipeline will be loaded in [base.py](file:///home/codespace/.python/current/lib/python3.12/site-packages/distilabel/pipeline/base.py):[1046](file:///home/codespace/.python/current/lib/python3.12/site-packages/distilabel/pipeline/base.py#1046)
stages:
* Legend: π° GeneratorStep π GlobalStep π Step
* Stage 0:
- π° 'load_instructions'
- π 'exam_generation'
INFO ['distilabel.pipeline'] β³ Waiting for all the steps of stage 0 to [base.py](file:///home/codespace/.python/current/lib/python3.12/site-packages/distilabel/pipeline/base.py):[1382](file:///home/codespace/.python/current/lib/python3.12/site-packages/distilabel/pipeline/base.py#1382)
load...
[02/03/25 14:19:49] ERROR ['distilabel.pipeline'] β Failed to load step 'exam_generation': Step [local.py](file:///home/codespace/.python/current/lib/python3.12/site-packages/distilabel/pipeline/local.py):[316](file:///home/codespace/.python/current/lib/python3.12/site-packages/distilabel/pipeline/local.py#316)
load failed: 'InferenceClient' object has no attribute '_resolve_url'
For further information visit
'https://distilabel.argilla.io/latest/api/pipeline/step_wrapper'
[02/03/25 14:19:51] ERROR ['distilabel.pipeline'] β Failed to load all the steps of stage 0 [base.py](file:///home/codespace/.python/current/lib/python3.12/site-packages/distilabel/pipeline/base.py):[1396](file:///home/codespace/.python/current/lib/python3.12/site-packages/distilabel/pipeline/base.py#1396)
NOTE: I also had to replace page with instruction to avoid this error:
ValueError: Step 'exam_generation' requires inputs ['instruction'], but only the inputs=['page'] are available, which means that the inputs=['instruction', 'system_prompt'] are missing or not available when the step gets to be executed in the pipeline. Please make sure previous steps to 'exam_generation' are generating the required inputs.
To reproduce
# Copyright 2023-present, Argilla, Inc.## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.fromtypingimportListimportwikipediafrompydanticimportBaseModel, Fieldfromdistilabel.llmsimportInferenceEndpointsLLMfromdistilabel.pipelineimportPipelinefromdistilabel.stepsimportLoadDataFromDictsfromdistilabel.steps.tasksimportTextGenerationpage=wikipedia.page(title="Transfer_learning")
classExamQuestion(BaseModel):
question: str=Field(..., description="The question to be answered")
answer: str=Field(..., description="The correct answer to the question")
distractors: List[str] =Field(
..., description="A list of incorrect but viable answers to the question"
)
classExamQuestions(BaseModel):
exam: List[ExamQuestion]
SYSTEM_PROMPT="""\You are an exam writer specialized in writing exams for students.Your goal is to create questions and answers based on the document provided, and a list of distractors, that are incorrect but viable answers to the question.Your answer must adhere to the following format:```[ { "question": "Your question", "answer": "The correct answer to the question", "distractors": ["wrong answer 1", "wrong answer 2", "wrong answer 3"] }, ... (more questions and answers as required)]```""".strip()
withPipeline(name="ExamGenerator") aspipeline:
load_dataset=LoadDataFromDicts(
name="load_instructions",
data=[
{
"instruction": page.content,
}
],
)
text_generation=TextGeneration(
name="exam_generation",
system_prompt=SYSTEM_PROMPT,
template="Generate a list of answers and questions about the document. Document:\n\n{{ instruction }}",
llm=InferenceEndpointsLLM(
model_id="meta-llama/Meta-Llama-3.1-8B-Instruct",
tokenizer_id="meta-llama/Meta-Llama-3.1-8B-Instruct",
structured_output={
"schema": ExamQuestions.model_json_schema(),
"format": "json",
},
),
input_batch_size=8,
output_mappings={"model_name": "generation_model"},
)
load_dataset>>text_generationdistiset=pipeline.run(
parameters={
text_generation.name: {
"llm": {
"generation_kwargs": {
"max_new_tokens": 2048,
}
}
}
},
use_cache=False,
)
Expected behavior
The example should run correctly.
Screenshots
No response
Environment
Distilabel Version: 1.5.3
Python Version: 3.12.1
Hugging Face Hub Version: 0.28.1
Additional context
I'm guessing the _resolve_url private variable was removed in a recent version of huggingface_hub.
The text was updated successfully, but these errors were encountered:
Describe the bug
Attempting to follow this tutorial: https://distilabel.argilla.io/dev/sections/pipeline_samples/examples/exam_questions/#build-the-pipeline, I get this error:
NOTE: I also had to replace
page
withinstruction
to avoid this error:To reproduce
Expected behavior
The example should run correctly.
Screenshots
No response
Environment
Additional context
I'm guessing the
_resolve_url
private variable was removed in a recent version ofhuggingface_hub
.The text was updated successfully, but these errors were encountered: