Fix Scope name collisions#248
Merged
karllessard merged 11 commits intotensorflow:masterfrom May 28, 2021
Merged
Conversation
Open
Closed
Merged
karllessard
requested changes
May 26, 2021
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerSession.java
Outdated
Show resolved
Hide resolved
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java
Show resolved
Hide resolved
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/NameScope.java
Outdated
Show resolved
Hide resolved
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/NameScope.java
Show resolved
Hide resolved
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/NameScope.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Contributor
Author
|
I had to add a quick fix for spotless as well, it wouldn't work when called from subdirectories. |
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Collaborator
|
The latest commit removes copyright statements. We shouldn't do that. |
8000
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Contributor
Author
|
I took it out as per #209 (comment). Is that incorrect? |
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Collaborator
|
You can remove it from things where the copyright is owned by TensorFlow contributors, or Google, if that's what they want. But you can't remove it from the code I've contributed as that's under an Oracle copyright, and my lawyers will be grumpy at me. In this case it's not doing that, but if you enforce that on commit or file update it will do, and that would be bad. |
Ok I think the way env is passed to the various constructors of NameScope could still be improved but let's merge it the way it is now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes two possible sources of name collision issues:
This could probably be done better by either checking against the environment every time, or having a base NameScope instead of scope, but both of those would require large restructurings. This is just a patch to get it working.