「view this page in B3 βῆτα server」

Revisions №61534

branch: master 「№61534」
Commited by: Vikram K. Mulligan
GitHub commit link: 「c63087d4de69d6ff」 「№4855」
Difference from previous tested commit:  code diff
Commit date: 2021-01-22 09:55:28

Merge pull request #4855 from RosettaCommons/vmullig/gcn_test Add a test confirming that we can work with graph convolutional neural networks within Rosetta. This tests the RosettaTensorflowManager with a graph convolutional neural network (GCN). I'll need GCNs shortly for peptides, and others have been applying these to proteins. This PR also fixes a couple of off-by-one errors in the Tensorflow manager code. - [x] ~~Pull request #4606 should be merged before this one.~~ --> ~~PR #4606 has been merged into this one, and both will be merged together.~~ --> At @JackMaguire's request, we'll reopen PR #4606 and merge it before this one to keep changes suitably incremental. - [x] Conflicts with #4606 should be resolved before merging this, and `RosettaTensorflowSessionContainer::run_multi_input_session()` should be removed in favour of Jack's `RosettaTensorflowSessionContainer::run_multiheaded_session()`. - [x] Add the test observers, description, etc. - [x] Add a script to make the GCN (initialized with random weights). - [x] Add the GCN to the Rosetta database. (Note: this is a few hundred kilobytes.) - [x] Add expected output to the test directory. - [x] Add a pilot app that loads the GCN, provides it with known inputs, and tests whether we get the expected output. - [x] Exit with error status if the output does not match expected, within tolerance. - [x] Fix bugs locally. - [x] Check that this runs on the test server. It does! - [x] Error if run in non-Tensorflow builds. - [x] Beauty. - [x] Fix `app_exception_handling` test in non-tensorflow build. This PR also: - [x] Updates the `tools` submodule to point at the latest master of that repo. - [x] Removes an unused `RosettaTensorflowManager::set_session()` function. This function was unsafe, since it encourages creation of `RosettaTensorflowSessionContainers` (and Tensorflow sessions) by code external to the `RosettaTensorflowManager`. This prevents it from being a resource manager, and risks having things that it doesn't know about which compete for GPU access. (In any case, it probably wouldn't have been possible to use this, since the `RosettaTensorflowSessionContainer` class has a private constructor, and can only be constructed by the `RosettaTensorflowManager`.) - [x] ~~Adds a `RosettaTensorflowSessionContainer::run_multi_input_session()` class method, for Tensorflow models that take multiple input tensors (possibly of different sizes or dimension). This is needed for graph convolutional neural networks, which are typically represented by two to three input tensors (the adjacency matrix, the node data tensor, and the edge data tensor).~~ - [x] TODO: switch to @JackMaguire's `run_multiheaded_session()` from pull request #4606. I've accidentally reinvented the wheel here, so I'll take my implementation out and use his. - [x] Fixes an off-by-one error in some tensor accessors. - [x] Updates the header-only Tensorflow C-API files from Tensorflow 1.14 (which can't read Tensorflow 2 models) to Tensorflow 1.15 (the most recent version of the C-API, which _can_ read Tensorflow 2 models). Note that I copied the new licence for 1.15 to replace the 1.14 licence, so there are some cosmetic changes to the licence file. (Tensorflow is Apache-licenced, and I previously checked with UW Comotion to ensure that we can include these headers.)

...