distilabel icon indicating copy to clipboard operation
distilabel copied to clipboard

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

Open gabrielmbmb opened this issue 9 months ago • 0 comments

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): ...

gabrielmbmb avatar May 22 '24 16:05 gabrielmbmb