Skip to content

Conversation

karllessard
Copy link
Collaborator

Signed-off-by: Ryan Nett [email protected]

Rebase of #360

@google-cla
Copy link

google-cla bot commented Aug 5, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented Aug 5, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@karllessard
Copy link
Collaborator Author

@rnett , looks like you'll need to consent my new PR...

Craigacp
Craigacp previously approved these changes Aug 5, 2021
Copy link
Collaborator

@Craigacp Craigacp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small things but I'm fine if this is committed as is.

*/
public Map<String, Operand<?>> call(Scope scope, Map<String, Operand<?>> arguments) {
List<Operand<?>> inputList = new ArrayList<>(signature.inputNames().size());
List<Operand<?>> inputList = new ArrayList<>(signature().inputNames().size());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this go through the signature accessor now? If we want to do that, would it be better to buffer the signature in a local variable to avoid all the times signature() is called?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've looked and didn't see any reason for calling signature() instead of signature, since there are no class extending ConcreteFunction that I'm aware of. I've marked the class as final to make sure of that.


if (i > outputList.size()) {
throw new IllegalStateException(
"Somehow, not all required outputs were returned from the function");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be useful if this exception returned both i and outputList.size(). Though I suspect it's very unlikely to happen.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I've also move that sanity check outside the loop, it could be done beforehand.

@google-cla
Copy link

google-cla bot commented Aug 5, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

Copy link
Collaborator

@Craigacp Craigacp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@google-cla
Copy link

google-cla bot commented Aug 5, 2021

☹️ Sorry, but only Googlers may change the label cla: yes.

@karllessard karllessard merged commit 3f8272f into tensorflow:master Aug 5, 2021
@karllessard karllessard deleted the ryan-rn-func-fix branch August 5, 2021 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants