Uh oh!
There was an error while loading. Please reload this page.
[BEAM-8224] Fix bug in _fn_takes_side_inputs - #9563
Conversation
Bug was introduced in the conversion to inspect.signature, and manifests as assigning a wrapper function that accepts a single positional argument when the wrapped function can accept an arbitrary number.
udim
commented
Sep 13, 2019
R: @robertwb |
udim
commented
Sep 13, 2019
run pytthon 2 postcommit |
udim
commented
Sep 13, 2019
run python 2 postcommit |
udim
commented
Sep 13, 2019
run python 3.7 postcommit |
Changes LGTM. Py2 tests are failing due to: https://issues.apache.org/jira/browse/BEAM-8229 |
udim
commented
Sep 13, 2019
Run Python 3.7 PostCommit |
1 similar comment
udim
commented
Sep 13, 2019
Run Python 3.7 PostCommit |
robertwb
left a comment
There was a problem hiding this comment.
This should fix it, just one comment about tests.
| # Test that a lambda that accepts only a VAR_POSITIONAL can accept | ||
| # side-inputs. | ||
| result = (['a', 'b', 'c'] | ||
| | beam.Map(lambda *_: 'a', 5).with_input_types(str, int)) |
There was a problem hiding this comment.
Let's check that it actually gets the values right, e.g. do lambda *args: args. (Similarly below.)
markflyhigh
commented
Sep 13, 2019
#9570 is merge which should unblock Python2_PC failure. |
udim
commented
Sep 13, 2019
Run Python 3.7 PostCommit |
robertwb
commented
Sep 14, 2019
Run Portable_Python PreCommit |
aaltay
commented
Sep 14, 2019
New tests are failing in the precommit tests: 17:59:06 ====================================================================== |
robinyqiu
commented
Sep 16, 2019
Run Python PreCommit |
udim
commented
Sep 16, 2019
trivial_inference.py defaults to Any in 3.6, 3.7 since it doesn't support kwargs (added by the wrapper). Even if we did pass side-input hints, there is still missing logic that would bind the arguments for the var_positional into a single tuple (like getcallargs or signature.bind). Perhaps we should skip trivial_inference when side-inputs are present. |
aaltay
commented
Sep 16, 2019
Would we need to skip it for all python version or for some python versions? I am in favor of skipping in order to not block the release and continue with the proper fix in master. /cc @tvalentyn in case anything needs to be documented as known issues for python 3. |
Worked around an issue with trivial_inference not being passed side-input hints.
markflyhigh
commented
Sep 17, 2019
Run Portable_Python PreCommit |
1 similar comment
udim
commented
Sep 17, 2019
Run Portable_Python PreCommit |
udim
commented
Sep 17, 2019
I've opened a couple of bug for the portable precommit flakes: |
I believe we can safely ignore the portable python precommit failure, since this PR is holding up the release. |
Bug was introduced in the conversion to inspect.signature, and manifests as assigning a wrapper function that accepts a single positional argument when the wrapped function can accept an arbitrary number.
Bug was introduced in the conversion to inspect.signature, and manifests as assigning a wrapper function that accepts a single positional argument when the wrapped function can accept an arbitrary number.
Bug was introduced in the conversion to inspect.signature, and manifests
as assigning a wrapper function that accepts a single positional
argument when the wrapped function can accept an arbitrary number.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username).[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.Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.