Skip to content

[FEATURE] Allow passing self to steps created with step decorator #662

@gabrielmbmb

Description

@gabrielmbmb

Is your feature request related to a problem? Please describe.
process function created with step decorator doesn't have a way to access Step class attributes.

Describe the solution you'd like

from distilabel.step import step

@step(step_type="generator", pass_self=True)
def MyGenerator(self, offset: int = 0): ...

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions