OperatorNotAllowedInGraphError: using a `tf.Tensor` as a Python `bool` is not allowed

When I try to run the mnist example I get the following:

OperatorNotAllowedInGraphError: using a tf.Tensor as a Python bool is not allowed: AutoGraph did convert this function. This might indicate you are trying to use an unsupported feature.

1 Like

Hi @melnimr - this may have been resolved. What version of Guild are you using?

It is 0.7.3

This would have been fixed in 0.7.4, which isn’t generally available. However, you can install a pre-release version this way:

pip install --pre guildai

I have the same issue even I execute this command. Is there a solution or not yet please ?

Hi @DiiiB98 and welcome!

Just to make sure I’m looking at the same example, could you give me a link to what you’re running here?


1 Like

You find in this link the files used and this is the result after runninf the gridsearch with this command.
Thank you for your answer

@garrett I’m hitting this as well. Is this the same issue: Summary plugins not working with TensorFlow 2 · Issue #278 · guildai/guildai · GitHub

if so, what’s the easiest way to disable the plugins?

1 Like

I just committed a change to address this — these plugins are not handling the TF 2.2+ API changes atm and so in this case they at least don’t break the operation.

Look for this in the next pre-release (probably tomorrow) or officially in 0.7.5.