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
This commit is contained in:
parent
7a878701c9
commit
252e618352
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user