Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix collections.Iterable -> typing.Iterable to fix crash in python 3.10 #1178

Merged
merged 1 commit into from
Jun 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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