-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid memory leaks and other tensorflow issues (#68)
This PR addresses two sources of memory leaks apparent when repeatedly encoding many molecules in a loop, both originating from `tensorflow`: - First, there is a very mild leak, caused by `tensorflow` not fully cleaning up some of its internals, which appears across many `tensorflow` versions. - Second, there is also a bigger leak introduced in `tensorflow` vesion `2.10`. The first issue is addressed by manually clearing `_py_funcs_used_in_graph`, while for the second I temporarily pin the supported `tensorflow` version to `<2.10`, awaiting the issue to be fixed upstream. The pin also avoids backward compatibility problems that start to appear in `2.14` and prevent the pretrained checkpoint from being loaded (see #67).
- Loading branch information
Showing
5 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ dependencies: | |
- pip | ||
- python=3.10 | ||
- rdkit | ||
- tensorflow | ||
- tensorflow<2.10 | ||
- pip: | ||
- numpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters