Skip to content

Commit

Permalink
fix import by replacing GeneratorOutput with GeneratorStepOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
davidberenstein1957 committed Jan 10, 2025
1 parent e65894c commit 16b89a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/sections/how_to_guides/basic/task/generator_task.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ from typing_extensions import override

from distilabel.steps.tasks.base import GeneratorTask
from distilabel.steps.tasks.typing import ChatType
from distilabel.steps.typing import GeneratorOutput

from distilabel.steps.typing import GeneratorStepOutput

class MyCustomTask(GeneratorTask):
instruction: str

@override
def process(self, offset: int = 0) -> GeneratorOutput:
def process(self, offset: int = 0) -> GeneratorStepOutput:
output = self.llm.generate(
inputs=[
[
Expand Down Expand Up @@ -79,11 +78,12 @@ from typing import Any, Dict, List, Union

from distilabel.steps.tasks.base import GeneratorTask
from distilabel.steps.tasks.typing import ChatType
from distilabel.steps.typing import GeneratorStepOutput


class MyCustomTask(GeneratorTask):
@override
def process(self, offset: int = 0) -> GeneratorOutput:
def process(self, offset: int = 0) -> GeneratorStepOutput:
output = self.llm.generate(
inputs=[
[{"role": "user", "content": "Tell me a joke."}],
Expand Down
1 change: 1 addition & 0 deletions vllm
Submodule vllm added at cf5f00

0 comments on commit 16b89a0

Please sign in to comment.