From fd586884ce9584d2c45b319930ae9426cfb9d1bc Mon Sep 17 00:00:00 2001 From: Naveen Mittal Date: Thu, 7 Dec 2023 11:56:30 +0530 Subject: [PATCH 1/2] Update testing.py there was a change in Python 3.10 and the Mapping class has been moved to the collections.abc module. So, if you're using Python 3.10 or later, you should import the Mapping class from the collections.abc module, not the collections module --- fastreid/evaluation/testing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastreid/evaluation/testing.py b/fastreid/evaluation/testing.py index cf4abc3..5fe82c9 100644 --- a/fastreid/evaluation/testing.py +++ b/fastreid/evaluation/testing.py @@ -2,7 +2,8 @@ import logging import pprint import sys -from collections import Mapping, OrderedDict +from collections import OrderedDict +from collections.abc import Mapping import numpy as np from tabulate import tabulate From 1a4eeb36dc8595983849ce2befb18813a9755b7b Mon Sep 17 00:00:00 2001 From: Naveen Mittal Date: Thu, 7 Dec 2023 11:56:53 +0530 Subject: [PATCH 2/2] Update build.py there was a change in Python 3.10 and the Mapping class has been moved to the collections.abc module. So, if you're using Python 3.10 or later, you should import the Mapping class from the collections.abc module, not the collections module --- fastreid/data/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastreid/data/build.py b/fastreid/data/build.py index 23ac8d6..681bc16 100644 --- a/fastreid/data/build.py +++ b/fastreid/data/build.py @@ -16,7 +16,7 @@ if TORCH_MAJOR == 1 and TORCH_MINOR < 8: else: string_classes = str -from collections import Mapping +from collections.abc import Mapping from fastreid.config import configurable from fastreid.utils import comm