NameError: guild doesnt recognize defined variable?

Ah, yes indeed - good catch!

The two options are to a) see if that timeout problem still occurs. As I’ve mentioned that’s a real bear of a problem if it can’t be recreated consistently. IIRC your project uses multi-threading libraries and getting multi-threading processes to run reliably is something humankind has been fighting for for a long time.

Option b), which is I think what you should consider at this point, is to log the scalar values explicitly using one of the various logging libraries for TF summaries. See this section for help.