diff --git a/datasets/OUMVLP/rearrange_OUMVLP.py b/datasets/OUMVLP/rearrange_OUMVLP.py index 7844479..3f68cec 100644 --- a/datasets/OUMVLP/rearrange_OUMVLP.py +++ b/datasets/OUMVLP/rearrange_OUMVLP.py @@ -2,6 +2,7 @@ import argparse import os import shutil from pathlib import Path +from typing import Tuple from tqdm import tqdm @@ -9,7 +10,7 @@ from tqdm import tqdm TOTAL_SUBJECTS = 10307 -def sanitize(name: str) -> (str, str): +def sanitize(name: str) -> Tuple[str, str]: return name.split('_')[1].split('-') diff --git a/opengait/modeling/backbones/__init__.py b/opengait/modeling/backbones/__init__.py index 7c99e5e..ac21357 100644 --- a/opengait/modeling/backbones/__init__.py +++ b/opengait/modeling/backbones/__init__.py @@ -5,13 +5,13 @@ from importlib import import_module # iterate through the modules in the current package package_dir = Path(__file__).resolve().parent -for (_, module_name, _) in iter_modules([package_dir]): +for (_, module_name, _) in iter_modules([str(package_dir)]): # import the module and iterate through its attributes module = import_module(f"{__name__}.{module_name}") for attribute_name in dir(module): attribute = getattr(module, attribute_name) - if isclass(attribute): + if isclass(attribute): # Add the class to this package's variables globals()[attribute_name] = attribute \ No newline at end of file diff --git a/opengait/modeling/losses/__init__.py b/opengait/modeling/losses/__init__.py index 7c99e5e..ac21357 100644 --- a/opengait/modeling/losses/__init__.py +++ b/opengait/modeling/losses/__init__.py @@ -5,13 +5,13 @@ from importlib import import_module # iterate through the modules in the current package package_dir = Path(__file__).resolve().parent -for (_, module_name, _) in iter_modules([package_dir]): +for (_, module_name, _) in iter_modules([str(package_dir)]): # import the module and iterate through its attributes module = import_module(f"{__name__}.{module_name}") for attribute_name in dir(module): attribute = getattr(module, attribute_name) - if isclass(attribute): + if isclass(attribute): # Add the class to this package's variables globals()[attribute_name] = attribute \ No newline at end of file diff --git a/opengait/modeling/models/__init__.py b/opengait/modeling/models/__init__.py index 7c99e5e..ac21357 100644 --- a/opengait/modeling/models/__init__.py +++ b/opengait/modeling/models/__init__.py @@ -5,13 +5,13 @@ from importlib import import_module # iterate through the modules in the current package package_dir = Path(__file__).resolve().parent -for (_, module_name, _) in iter_modules([package_dir]): +for (_, module_name, _) in iter_modules([str(package_dir)]): # import the module and iterate through its attributes module = import_module(f"{__name__}.{module_name}") for attribute_name in dir(module): attribute = getattr(module, attribute_name) - if isclass(attribute): + if isclass(attribute): # Add the class to this package's variables globals()[attribute_name] = attribute \ No newline at end of file