Skip to content

Commit

Permalink
Fix collections.Iterable -> typing.Iterable to fix crash in python 3.…
Browse files Browse the repository at this point in the history
…10 (Deci-AI#1178)
  • Loading branch information
BloodAxe authored and LHBuilder committed Jun 25, 2023
1 parent b557f8e commit cd3a624
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/super_gradients/training/utils/utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import collections
import math
import os
import random
import re
import tarfile
import time
import inspect
import typing
from functools import lru_cache, wraps
from importlib import import_module
from itertools import islice
Expand Down Expand Up @@ -592,7 +592,7 @@ def ensure_is_tuple_of_two(inputs: Union[Any, Iterable[Any], None]) -> Union[Tup
if inputs is None:
return None

if isinstance(inputs, collections.Iterable) and not isinstance(inputs, str):
if isinstance(inputs, typing.Iterable) and not isinstance(inputs, str):
a, b = inputs
return a, b

Expand Down

0 comments on commit cd3a624

Please sign in to comment.