Cody Webb

08/08/2023, 8:51 PM
So say I have some flows in a class:
Copy code
class SomeClass:

    def init(self):

def __runmodel(self, *args):
     code to run model on dask 

def gen_args_run_model(self):
    args_list = #code to gen arg_list
    #arg_list  is a list of tuples which have args
         results=[self._runmodel(*args) for args in args_list]
I want to create a deployment for gen_args_run_model that I can then run and it will kick off the run_model sub flow on dask with each iteration of args in arg list, how would I go about this?
Is there a more efficient way to do this?
Im guessing I would do
Copy code
And make the self._run_model function async?
I had async before implementing prefect and anything greater than 20 being submitted would timeout and fail
So I added batching and subflow deployment hopefully that’ll work

Cody Webb

08/10/2023, 4:22 PM
no didnt work
i guess i have to seperate out my class logic a bit