chrisqiqiu commented on PR #38429: URL: https://github.com/apache/beam/pull/38429#issuecomment-5015256490
> I'm okay with mitigating the cost with the solutions presented. Implemented both optimisations: 1. Skip the check entirely for generator (`yield`) DoFns detected at construction with `inspect.isgeneratorfunction`, so they pay no cost. 2. For `return` based DoFns, only validate the first output, then disable the check one check per DoFn instead of per element. Added a test confirming generator DoFns are unaffected. @jrmccluskey @claudevdm ready for another look, thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
