From 252e6183523d226e50137c06a101df0aa5d4d5d9 Mon Sep 17 00:00:00 2001 From: Reed Wanderman-Milne Date: Mon, 23 Dec 2019 15:43:49 -0800 Subject: [PATCH] Actually fix issubclass error in metrics_serialization_test.py. I tried to fix this in 145e508824ebd5ef017df74d979df8a025f31596, but missed an issubclass call. This time, I actually tested the fix works on Windows. PiperOrigin-RevId: 286952545 Change-Id: Ieb77c0e3e9876e68f4b61cedcc4e630dfc14b095 --- tensorflow/python/keras/saving/metrics_serialization_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/python/keras/saving/metrics_serialization_test.py b/tensorflow/python/keras/saving/metrics_serialization_test.py index 0a15d3e466d..10eee4d4175 100644 --- a/tensorflow/python/keras/saving/metrics_serialization_test.py +++ b/tensorflow/python/keras/saving/metrics_serialization_test.py @@ -220,7 +220,7 @@ class MetricsSerialization(keras_parameterized.TestCase): def get_instance(x): if isinstance(x, str): return x - if issubclass(x, metrics.Metric): + if isinstance(x, type) and issubclass(x, metrics.Metric): return x() return x