Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@step decorator to easily create steps #374

Closed
gabrielmbmb opened this issue Mar 5, 2024 · 0 comments · Fixed by #387
Closed

@step decorator to easily create steps #374

gabrielmbmb opened this issue Mar 5, 2024 · 0 comments · Fixed by #387
Assignees

Comments

@gabrielmbmb
Copy link
Member

gabrielmbmb commented Mar 5, 2024

Add a @step decorator allowing to easily create new steps.

@step(inputs=["instruction"], outputs=["generation"])
def MyStep(input: StepInput, runtime_param1: RuntimeParameter[int], runtime_param2: RuntimeParameter[str] = "hello"0 -> StepOutput:
    ...

with Pipeline():
    step = MyStep(name="my_step")

The decorator will create a subclass of Step programatically that can be used in a Pipeline.

@gabrielmbmb gabrielmbmb self-assigned this Mar 5, 2024
@gabrielmbmb gabrielmbmb linked a pull request Mar 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants