-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Raise a Type Value error when result is not iterable #6242
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
Conversation
|
Hey @h4rr21 , could you please take care of this python precommit failures? |
|
Thanks for looking at this. One thing we have to be very careful of here is that this code runs for every element in at every step for every pipeline, so it's quite performance critical. Running the benchmarks at https://github.com/apache/beam/blob/master/sdks/python/apache_beam/tools/map_fn_microbenchmark.py (you might need #6293) I see Before After which is about a 5% regression. This may be worse if iter(results) is expensive. Perhaps change the string test to "type(results) is str" and omit the iter(...) test as it already gives a more informative |
|
@boyuanzz I was trying to open the details, but this url :
doesn't work for me |
|
Hello @robertwb thanks for pointing this microbenchmark. I'm trying to validate "results" as any itererable python object, I also now there is still under discussion if "string" should be a valid output... so we just be looking at this shouldn't impact the performance |
|
At this level, even |
|
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
|
This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time. |
Check the result should be a list Type
Follow this checklist to help us incorporate your contribution quickly and easily:
[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.It will help us expedite review of your Pull Request if you tag someone (e.g.
@username) to look at it.Post-Commit Tests Status (on master branch)