Xavier BALESI
08/03/2022, 1:58 PMowen
08/03/2022, 7:08 PMdef get_generator_function(context):
def _fn():
yield 1
return _fn
def load_input(self, context):
my_fn = self.get_generator_function(context)
return my_fn
then invoke that generator in the op, but that only handles the input side. The output to be processed by the IOManager has to be emitted all at once (i.e. yield Output(output_name="result", value=12345)
), so there's no direct support for chunked outputs.
However, you could bring the output handling logic inside the body of the asset, and write chunks of your output to either the final location (meaning your IOManager's handle_output would essentially be a no-op), or a temporary file, which the IOManager would then copy over to a final location.Xavier BALESI
08/03/2022, 11:24 PMowen
08/04/2022, 4:42 PMXavier BALESI
08/05/2022, 9:26 AM