https://prefect.io logo
#prefect-community
Title
# prefect-community
j

Jack Sundberg

04/18/2022, 4:42 PM
Hey everyone! Just like you can do class-based Tasks, are you able to do class-based workflows? With Prefect Orion introducing the
@flow
decorator, I'm guessing this will be possible, but don't see any docs on it.
k

Kevin Kho

04/18/2022, 4:46 PM
Hey @Jack Sundberg, have you seen this thread?
j

Jack Sundberg

04/18/2022, 4:56 PM
Hey @Kevin Kho, I hadn't seen that thread so thanks for linking it. My use-case looks pretty similar -- but my code isn't based on sklearn. Can I make a suggestion for letting users implement a feature like this?
k

Kevin Kho

04/18/2022, 4:57 PM
But are you holding some state that has to be passed from flow to flow>?
j

Jack Sundberg

04/18/2022, 4:58 PM
Nope, it's stateless. All class attributes are immutable
k

Kevin Kho

04/18/2022, 5:00 PM
I dont know if it’s possible to implement this while restricting the passing of state. You could open the feature request though and see what the core devs say
j

Jack Sundberg

04/18/2022, 5:04 PM
Hmm alright. I'm going to and open a github issue for this to float the idea. Thanks for the quick responses!
@Kevin Kho I opened a pull request for this. If you or some of the core devs could give feedback on whether this is possible, I'd appreciate it! https://github.com/PrefectHQ/prefect/issues/5689
*feature request. Not a pull request lol
k

Kevin Kho

04/18/2022, 6:03 PM
Ah ok this is a bit different from my interpretation, but we’ll see what they say
🚀 1
11 Views