Skip to content
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

[tensorflow] Introduce non-strict NodeDef names #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brandonwillard
Copy link
Contributor

@brandonwillard brandonwillard commented Dec 3, 2019

NodeDef name values can now be interpreted as "non-strict" by using a special str type. This type tells TFlowMetaOp.reify to skip the unique name check and defer to the base graph, which will assign the next available unique name prefixed by the "non-strict" value (e.g. "truediv" to "truediv_1").

This approach is something between the old handling of tensor names (pre #90) and the initial approach of allowing None-valued names. This way, we can at least specify the name prefix without forcing the uniqueness of the associated graph.

Even so, I'm still on the fence about this one, because it brings back some form of meta/base graph inconsistency. Perhaps we could keep the .obj values for these kinds of objects empty, or (re)set the name once it's fully determined through .reify. The latter would require better meta object cache invalidation, but we need that anyway.

Closes #93.

@brandonwillard brandonwillard added bug Something isn't working important Features and issues that need to be addressed ASAP labels Dec 3, 2019
@brandonwillard brandonwillard self-assigned this Dec 3, 2019
@brandonwillard brandonwillard added enhancement New feature or request and removed bug Something isn't working labels Dec 3, 2019
When the default tensor string name type, `DefaultTensorName`, is used, the
`TFlowMetaTensor.reify` will not assume that the string name is "strict" and
rely upon the base graph to assign a unique name derived from the default one.

Closes pymc-devs#93.
@brandonwillard brandonwillard changed the title [tensorflow] Allow unspecified NodeDef names [tensorflow] Introduce non-strict NodeDef names Dec 4, 2019
@brandonwillard brandonwillard added TensorFlow This issue involves the TensorFlow backend meta graph This issue involves the meta graph objects labels Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request important Features and issues that need to be addressed ASAP meta graph This issue involves the meta graph objects TensorFlow This issue involves the TensorFlow backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TensorFlow Name Conflicts During Meta Object Reification
1 participant