Skip to content

Commit 9251ade

Browse files
authored
Update tests to be compatible with recent keras update. (#6866)
## Motivation for features / changes A recent change in Keras broke these tests. I believe it's related to keras-team/keras#19805, which caused a name change in the names of the nodes in the graph, but not too sure. ## Technical description of changes Updates the affected test, but leaves it commented out, because when this code is imported into the internal repository on our side, before the keras update does, our project would break, as the keras change would not be synced internally yet. Once this is sycned to our internal repo, and keras is able to sync theirs (without breaking us), we can enable the test and it should work fine. ## Screenshots of UI changes (or N/A) N/A ## Detailed steps to verify changes work correctly (as executed by you) Ran tests with keras-nightly before and after the change, and they pass. Then commented out the test for the reason noted above. ## Alternate designs / implementations considered (or N/A) N/A
1 parent f1591d3 commit 9251ade

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tensorboard/plugins/graph/keras_util_test.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -982,12 +982,13 @@ def DISABLED_test_keras_model_to_graph_def_sequential_functional_model(
982982

983983
self.assertGraphDefToModel(expected_proto, model)
984984

985-
def test_keras_model_to_graph_def_functional_multiple_inbound_nodes_from_same_node(
985+
# Enable after next sync to internal repo from Keras team.
986+
def DISABLED_test_keras_model_to_graph_def_functional_multiple_inbound_nodes_from_same_node(
986987
self,
987988
):
988989
expected_proto = """
989990
node {
990-
name: "functional_1/input_layer"
991+
name: "functional/input_layer"
991992
attr {
992993
key: "keras_class"
993994
value {
@@ -1002,8 +1003,8 @@ def test_keras_model_to_graph_def_functional_multiple_inbound_nodes_from_same_no
10021003
}
10031004
}
10041005
node {
1005-
name: "functional_1/__doubling_layer"
1006-
input: "functional_1/input_layer"
1006+
name: "functional/__doubling_layer"
1007+
input: "functional/input_layer"
10071008
attr {
10081009
key: "keras_class"
10091010
value {
@@ -1018,9 +1019,9 @@ def test_keras_model_to_graph_def_functional_multiple_inbound_nodes_from_same_no
10181019
}
10191020
}
10201021
node {
1021-
name: "functional_1/add"
1022-
input: "functional_1/__doubling_layer"
1023-
input: "functional_1/__doubling_layer"
1022+
name: "functional/add"
1023+
input: "functional/__doubling_layer"
1024+
input: "functional/__doubling_layer"
10241025
attr {
10251026
key: "keras_class"
10261027
value {

0 commit comments

Comments
 (0)