-
Notifications
You must be signed in to change notification settings - Fork 42
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
tf.debugging
& tests for tf.function
#304
Comments
the situation is actually much worse than I realised re def test_raise_is_incompatible_with_tf_function() -> None:
@tf.function
def f(a: tf.Tensor) -> tf.Tensor:
if a <= tf.constant(0):
raise ValueError
return a
with pytest.raises(ValueError):
f(tf.constant(1)) which suggests that the |
thanks for making this concrete, this seems quite indicative about exceptions |
|
Bumping this ticket in light of #880. |
This is a follow up on discussion in PR #299 - at the moment we use
tf.function
for optimizing the model, but users might pass any other piece of code through it e.g. whole BO loop through it. Hence, it would be good to have some tests that (all of) our code can be used withintf.function
without errors. Most likely we would have errors, since there is a lot of python code can cause errors withintf.function
. This is not a high priority probably, but it could get out of hand with time so perhaps at least we could start testing any new piece of code that we want to merge intodevelop
?Related to this, we should use
tf.debugging
everywhere in the code instead of if-else statements with someraise
statement that we dominantly use at the moment.The text was updated successfully, but these errors were encountered: