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

Autograph issues #137

Open
chaserileyroberts opened this issue Jul 3, 2019 · 4 comments
Open

Autograph issues #137

chaserileyroberts opened this issue Jul 3, 2019 · 4 comments

Comments

@chaserileyroberts
Copy link
Contributor

When tf.function(autograph=True), the compile times for code that uses contract_between skyrockets. This is bad because autograph=True is the default for tensorflow>=1.14.0.

We need to figure out where the bug lies, either on our end or on the tensorflow end.

@amilsted
Copy link
Contributor

amilsted commented Jul 5, 2019

The output suggests that autograph can't handle calls to contract_between: It throws a warning and falls back to non-autograph tracing.

WARNING: Entity <bound method TensorNetwork.contract_between of <tensornetwork.network.TensorNetwork object at 0x7f727b370898>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting <bound method TensorNetwork.contract_between of <tensornetwork.network.TensorNetwork object at 0x7f727b370898>>: AssertionError: Early stopping (e.g. break and/or return) should create state variables.

Possibly the error handling is causing overhead? Probably we can find out what's slow using cProfile.

PS: I think the default changed for tf.contrib.eager.defun(), but IIRC tf.function() also defaulted to autograph=True with 1.13.

@chaserileyroberts
Copy link
Contributor Author

Is there a way to make this a failing test?

@amilsted
Copy link
Contributor

Yes, we can test for these log messages: https://docs.pytest.org/en/latest/logging.html

@tralfamadude
Copy link

What is the impact of this bug? Is it harmless to correctness?

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

No branches or pull requests

3 participants