Skip to content

Commit 827ed8f

Browse files
yileitfx-copybara
authored andcommitted
Make this code compatible with Python 3.10.
PiperOrigin-RevId: 472742494
1 parent 5c3ff12 commit 827ed8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow_model_analysis/eval_saved_model/exporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# ==============================================================================
1515
"""`Exporter` class represents different flavors of model export."""
1616

17-
import collections
17+
from collections import abc
1818
import contextlib
1919
import os
2020
import types
@@ -273,7 +273,7 @@ def wrapped_call_model_fn(unused_self, features, labels, mode, config):
273273
if mode == tf_estimator.ModeKeys.EVAL:
274274
filtered_eval_metric_ops = {}
275275
for k, v in result.eval_metric_ops.items():
276-
if isinstance(metrics_to_remove, collections.Iterable):
276+
if isinstance(metrics_to_remove, abc.Iterable):
277277
if k in metrics_to_remove:
278278
continue
279279
elif callable(metrics_to_remove):

0 commit comments

Comments
 (0)