From 53eb6940f7c55d7d57b90b1f1af92fdc2cc2b660 Mon Sep 17 00:00:00 2001 From: bobby Date: Fri, 31 Mar 2023 19:21:21 -0400 Subject: [PATCH] No need for OrderedDict, default dictionary has been in order for a while https://realpython.com/python-ordereddict/ for more info or look at Python changelings. --- .../projects/timelines/scripts/models/earlybird/metrics.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/python/twitter/deepbird/projects/timelines/scripts/models/earlybird/metrics.py b/src/python/twitter/deepbird/projects/timelines/scripts/models/earlybird/metrics.py index 6919914f8..a6309bd80 100644 --- a/src/python/twitter/deepbird/projects/timelines/scripts/models/earlybird/metrics.py +++ b/src/python/twitter/deepbird/projects/timelines/scripts/models/earlybird/metrics.py @@ -1,6 +1,5 @@ # checkstyle: noqa import tensorflow.compat.v1 as tf -from collections import OrderedDict from .constants import EB_SCORE_IDX from .lolly.data_helpers import get_lolly_scores @@ -35,7 +34,7 @@ def get_multi_binary_class_metric_fn(metrics, classes=None, class_dim=1): # Added to support per engagement metrics for both TF and Lolly scores. labels = tf.tile(labels, [1, 2]) - eval_metric_ops = OrderedDict() + eval_metric_ops = dict() preds = graph_output['output']