Skip to content

Commit

Permalink
Make this code compatible with Python 3.10.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 472742494
  • Loading branch information
yilei authored and tfx-copybara committed Sep 7, 2022
1 parent 5c3ff12 commit 827ed8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tensorflow_model_analysis/eval_saved_model/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ==============================================================================
"""`Exporter` class represents different flavors of model export."""

import collections
from collections import abc
import contextlib
import os
import types
Expand Down Expand Up @@ -273,7 +273,7 @@ def wrapped_call_model_fn(unused_self, features, labels, mode, config):
if mode == tf_estimator.ModeKeys.EVAL:
filtered_eval_metric_ops = {}
for k, v in result.eval_metric_ops.items():
if isinstance(metrics_to_remove, collections.Iterable):
if isinstance(metrics_to_remove, abc.Iterable):
if k in metrics_to_remove:
continue
elif callable(metrics_to_remove):
Expand Down

0 comments on commit 827ed8f

Please sign in to comment.