[go: nahoru, domu]

Skip to content

Commit

Permalink
Update tests to be compatible with recent keras update. (#6866)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
arcra committed Jun 10, 2024
1 parent f1591d3 commit 9251ade
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tensorboard/plugins/graph/keras_util_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,12 +982,13 @@ def DISABLED_test_keras_model_to_graph_def_sequential_functional_model(

self.assertGraphDefToModel(expected_proto, model)

def test_keras_model_to_graph_def_functional_multiple_inbound_nodes_from_same_node(
# Enable after next sync to internal repo from Keras team.
def DISABLED_test_keras_model_to_graph_def_functional_multiple_inbound_nodes_from_same_node(
self,
):
expected_proto = """
node {
name: "functional_1/input_layer"
name: "functional/input_layer"
attr {
key: "keras_class"
value {
Expand All @@ -1002,8 +1003,8 @@ def test_keras_model_to_graph_def_functional_multiple_inbound_nodes_from_same_no
}
}
node {
name: "functional_1/__doubling_layer"
input: "functional_1/input_layer"
name: "functional/__doubling_layer"
input: "functional/input_layer"
attr {
key: "keras_class"
value {
Expand All @@ -1018,9 +1019,9 @@ def test_keras_model_to_graph_def_functional_multiple_inbound_nodes_from_same_no
}
}
node {
name: "functional_1/add"
input: "functional_1/__doubling_layer"
input: "functional_1/__doubling_layer"
name: "functional/add"
input: "functional/__doubling_layer"
input: "functional/__doubling_layer"
attr {
key: "keras_class"
value {
Expand Down

0 comments on commit 9251ade

Please sign in to comment.