From 5347bc1785236c2894095a4db235ea09218172eb Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Mon, 21 Mar 2022 13:16:39 +0000 Subject: [PATCH] Import ABC from collections.abc for Python 3.10 compatibility. --- src/fklearn/metrics/pd_extractors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fklearn/metrics/pd_extractors.py b/src/fklearn/metrics/pd_extractors.py index 0e61031c..c1dbd01b 100644 --- a/src/fklearn/metrics/pd_extractors.py +++ b/src/fklearn/metrics/pd_extractors.py @@ -1,4 +1,4 @@ -import collections +import collections.abc from datetime import datetime from itertools import chain, repeat @@ -74,7 +74,7 @@ def stability_curve_evaluator_extractor(result, base_extractor): @curry def repeat_split_log(split_log, results_len): - if isinstance(split_log, collections.Iterable): + if isinstance(split_log, collections.abc.Iterable): n_repeat = results_len // len(split_log) # The logic below makes [1, 2, 3] into [1, 1, 1, 2, 2, 2, 3, 3, 3] for n_repeat=3 return list(chain.from_iterable(zip(*repeat(split_log, n_repeat))))