Clearing traced function cache

35 views
Skip to first unread message

jonas....@cern.ch

unread,
Feb 14, 2022, 1:55:44 PMFeb 14
to Discuss
 Hi all,
first off, thanks a lot for all the efforts and the great work, it's a pleasure to use TensorFlow!

Is there a public way to clear/invalidate the traced functions? In order to a) retrace it (with a changed Python state) and b) clear up the memory

The use-case is that a function is sometimes (Python) state based and therefore one would need to retrace it, basically invalidating the old trace and removing it.

I am aware that there are often ways around such a design, but sometimes there are None: if you build a model that depends on Python variable and run this a couple of times. Manually keeping track of changes is one thing (this is up to the user, clearly) but we cannot simply check for re-tracing _in general_ (since this would mean that we would also need to handle the re-tracing logic of Tensors).

How could we go about clearing the traced functions?

Best,
Jonas

Rohan Jain

unread,
Feb 28, 2022, 1:15:09 AMFeb 28
to Dan Moldovan, Faizan Muhammad, jonas....@cern.ch, Discuss
Faizan and Dan have done some recent work in this area that can help you. 

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/4bcc1231-1eb5-4f74-bbb4-fce13a8252e0n%40tensorflow.org.
--
Rohan

A K

unread,
Aug 3, 2022, 4:57:48 PMAug 3
to Discuss, roh...@google.com, Discuss, Dan Moldovan, Faizan Muhammad, jonas....@cern.ch
Hi All, is there a response or a solution to this problem? 
This memory leak (and maybe other ones) prevent using Tensorflow in production.
Thanks.

Mark Knecht

unread,
Aug 3, 2022, 5:25:03 PMAug 3
to A K, Discuss, roh...@google.com, Dan Moldovan, Faizan Muhammad, jonas....@cern.ch
Is this list even alive? I haven't seen any messages since last May and very little traffic since last year.

- Mark

Jiri Simsa

unread,
Aug 3, 2022, 6:43:30 PMAug 3
to Mark Knecht, A K, Discuss, roh...@google.com, Dan Moldovan, Faizan Muhammad, jonas....@cern.ch
The recommended forum for TF related discussion (e.g. asking technical questions) is https://discuss.tensorflow.org/ (which was launched last year).

Reply all
Reply to author
Forward
0 new messages