Skip to content

Conversation

chihuahua
Copy link
Member

@chihuahua chihuahua commented Aug 21, 2017

Previously, if a function lacks input_args or lacks output_args, the
graph explorer would be unable to load a graph because
input_arg['name'] triggers an error (due to input_arg being undefined).

And indeed, functions without inputs (such as one with this signature from #375)
are possible:

signature {
  name: "_make_dataset_14a55393"
  output_arg {
    name: "BatchDataset"
    type: DT_RESOURCE
  }
}

Likewise, nothing stops the function.Defun API from making a function
without outputs (and only side effects).

This change guards those cases. Fixes #375. I can view the graph from the TensorFlow workshop (07_structured_data.ipynb) after this change:

qh3tdgur9v0

Previously, if a function lacks input_args or lacks output_args, the
graph explorer would be unable to load a graph because
input_arg['name'] triggers an error (due to input_arg being undefined).

And indeed, functions without inputs (such as one with this signature)
as possible:

Likewise, nothing stops the `function.Defun` API from making a function
without outputs (and only side effects).

This change guards those cases.
@chihuahua chihuahua merged commit ec502fa into master Aug 24, 2017
@chihuahua chihuahua deleted the chizeng-no-input-args branch August 24, 2017 18:00
jart pushed a commit that referenced this pull request Aug 24, 2017
Previously, if a function lacks input_args or lacks output_args, the
graph explorer would be unable to load a graph because
input_arg['name'] triggers an error (due to input_arg being undefined).

And indeed, functions without inputs (such as one with this signature)
as possible:

Likewise, nothing stops the `function.Defun` API from making a function
without outputs (and only side effects).

This change guards those cases. Fixes #375.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants