From aeaf8389f53cb955fe460ae828d96de4d0c51bdc Mon Sep 17 00:00:00 2001 From: Jonas Frey Date: Fri, 1 Mar 2024 18:30:23 +0100 Subject: [PATCH] run black --- hitchhiking_rotations/__init__.py | 4 ++-- hitchhiking_rotations/cfgs/__init__.py | 4 ++-- .../cfgs/cfg_cube_image_to_pose.py | 4 ++-- hitchhiking_rotations/cfgs/cfg_pcd_to_pose.py | 4 ++-- .../cfgs/cfg_pose_to_cube_image.py | 4 ++-- .../cfgs/cfg_pose_to_fourier.py | 4 ++-- hitchhiking_rotations/datasets/__init__.py | 4 ++-- .../datasets/cube_data_generator.py | 4 ++-- hitchhiking_rotations/datasets/cube_dataset.py | 4 ++-- .../datasets/fourier_dataset.py | 4 ++-- .../datasets/pointcloud_dataset.py | 4 ++-- hitchhiking_rotations/models/__init__.py | 4 ++-- hitchhiking_rotations/models/models.py | 4 ++-- hitchhiking_rotations/utils/__init__.py | 4 ++-- hitchhiking_rotations/utils/conversions.py | 4 ++-- hitchhiking_rotations/utils/euler_helper.py | 4 ++-- hitchhiking_rotations/utils/helper.py | 4 ++-- hitchhiking_rotations/utils/loading.py | 4 ++-- hitchhiking_rotations/utils/logger.py | 4 ++-- hitchhiking_rotations/utils/metrics.py | 4 ++-- hitchhiking_rotations/utils/notation.py | 4 ++-- hitchhiking_rotations/utils/trainer.py | 4 ++-- hitchhiking_rotations/utils/training_helper.py | 4 ++-- setup.py | 17 ++++++++++++++++- 24 files changed, 62 insertions(+), 47 deletions(-) diff --git a/hitchhiking_rotations/__init__.py b/hitchhiking_rotations/__init__.py index 7b20534..d381dd1 100644 --- a/hitchhiking_rotations/__init__.py +++ b/hitchhiking_rotations/__init__.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# import os HITCHHIKING_ROOT_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) diff --git a/hitchhiking_rotations/cfgs/__init__.py b/hitchhiking_rotations/cfgs/__init__.py index 4086263..acd0b7f 100644 --- a/hitchhiking_rotations/cfgs/__init__.py +++ b/hitchhiking_rotations/cfgs/__init__.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# from .cfg_cube_image_to_pose import get_cfg_cube_image_to_pose from .cfg_pcd_to_pose import get_cfg_pcd_to_pose from .cfg_pose_to_cube_image import get_cfg_pose_to_cube_image diff --git a/hitchhiking_rotations/cfgs/cfg_cube_image_to_pose.py b/hitchhiking_rotations/cfgs/cfg_cube_image_to_pose.py index f9e338b..65cde46 100644 --- a/hitchhiking_rotations/cfgs/cfg_cube_image_to_pose.py +++ b/hitchhiking_rotations/cfgs/cfg_cube_image_to_pose.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# def get_cfg_cube_image_to_pose(device): shared_trainer_cfg = { "_target_": "hitchhiking_rotations.utils.Trainer", diff --git a/hitchhiking_rotations/cfgs/cfg_pcd_to_pose.py b/hitchhiking_rotations/cfgs/cfg_pcd_to_pose.py index 7affb67..ec50f5d 100644 --- a/hitchhiking_rotations/cfgs/cfg_pcd_to_pose.py +++ b/hitchhiking_rotations/cfgs/cfg_pcd_to_pose.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# def get_cfg_pcd_to_pose(device): shared_trainer_cfg = { "_target_": "hitchhiking_rotations.utils.Trainer", diff --git a/hitchhiking_rotations/cfgs/cfg_pose_to_cube_image.py b/hitchhiking_rotations/cfgs/cfg_pose_to_cube_image.py index e52ed3d..503611f 100644 --- a/hitchhiking_rotations/cfgs/cfg_pose_to_cube_image.py +++ b/hitchhiking_rotations/cfgs/cfg_pose_to_cube_image.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# def get_cfg_pose_to_cube_image(device): cfg = { "_target_": "hitchhiking_rotations.utils.Trainer", diff --git a/hitchhiking_rotations/cfgs/cfg_pose_to_fourier.py b/hitchhiking_rotations/cfgs/cfg_pose_to_fourier.py index 4433911..d3d6d16 100644 --- a/hitchhiking_rotations/cfgs/cfg_pose_to_fourier.py +++ b/hitchhiking_rotations/cfgs/cfg_pose_to_fourier.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# def get_cfg_pose_to_fourier(device, nb, nf): shared_trainer_cfg = { "_target_": "hitchhiking_rotations.utils.Trainer", diff --git a/hitchhiking_rotations/datasets/__init__.py b/hitchhiking_rotations/datasets/__init__.py index e6044a6..2f91732 100644 --- a/hitchhiking_rotations/datasets/__init__.py +++ b/hitchhiking_rotations/datasets/__init__.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# from .cube_dataset import CubeImageToPoseDataset, PoseToCubeImageDataset from .pointcloud_dataset import PointCloudDataset from .fourier_dataset import PoseToFourierDataset diff --git a/hitchhiking_rotations/datasets/cube_data_generator.py b/hitchhiking_rotations/datasets/cube_data_generator.py index 412a3fb..7f9df13 100644 --- a/hitchhiking_rotations/datasets/cube_data_generator.py +++ b/hitchhiking_rotations/datasets/cube_data_generator.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# import mujoco import torch import numpy as np diff --git a/hitchhiking_rotations/datasets/cube_dataset.py b/hitchhiking_rotations/datasets/cube_dataset.py index f86a93a..5fbbf70 100644 --- a/hitchhiking_rotations/datasets/cube_dataset.py +++ b/hitchhiking_rotations/datasets/cube_dataset.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# from hitchhiking_rotations import HITCHHIKING_ROOT_DIR from hitchhiking_rotations.utils import save_pickle, load_pickle import os diff --git a/hitchhiking_rotations/datasets/fourier_dataset.py b/hitchhiking_rotations/datasets/fourier_dataset.py index c2ae048..484b307 100644 --- a/hitchhiking_rotations/datasets/fourier_dataset.py +++ b/hitchhiking_rotations/datasets/fourier_dataset.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# from torch.utils.data import Dataset diff --git a/hitchhiking_rotations/datasets/pointcloud_dataset.py b/hitchhiking_rotations/datasets/pointcloud_dataset.py index 5788f5e..de43e09 100644 --- a/hitchhiking_rotations/datasets/pointcloud_dataset.py +++ b/hitchhiking_rotations/datasets/pointcloud_dataset.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# import torch import numpy as np import os diff --git a/hitchhiking_rotations/models/__init__.py b/hitchhiking_rotations/models/__init__.py index f058740..0d0966b 100644 --- a/hitchhiking_rotations/models/__init__.py +++ b/hitchhiking_rotations/models/__init__.py @@ -1,6 +1,6 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# from .models import MLP, CNN, MLPNetPCD diff --git a/hitchhiking_rotations/models/models.py b/hitchhiking_rotations/models/models.py index dddf915..a3dd05c 100644 --- a/hitchhiking_rotations/models/models.py +++ b/hitchhiking_rotations/models/models.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# import numpy as np import torch from torch import nn diff --git a/hitchhiking_rotations/utils/__init__.py b/hitchhiking_rotations/utils/__init__.py index 29e777e..5160e9f 100644 --- a/hitchhiking_rotations/utils/__init__.py +++ b/hitchhiking_rotations/utils/__init__.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# from .euler_helper import euler_angles_to_matrix, matrix_to_euler_angles from .conversions import * from .metrics import * diff --git a/hitchhiking_rotations/utils/conversions.py b/hitchhiking_rotations/utils/conversions.py index 3d35239..790b5e3 100644 --- a/hitchhiking_rotations/utils/conversions.py +++ b/hitchhiking_rotations/utils/conversions.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# from .euler_helper import euler_angles_to_matrix, matrix_to_euler_angles import roma import torch diff --git a/hitchhiking_rotations/utils/euler_helper.py b/hitchhiking_rotations/utils/euler_helper.py index 9e2be3d..58ca296 100644 --- a/hitchhiking_rotations/utils/euler_helper.py +++ b/hitchhiking_rotations/utils/euler_helper.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# import torch diff --git a/hitchhiking_rotations/utils/helper.py b/hitchhiking_rotations/utils/helper.py index 9befbf9..111d297 100644 --- a/hitchhiking_rotations/utils/helper.py +++ b/hitchhiking_rotations/utils/helper.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# def passthrough(*x): if len(x) == 1: return x[0] diff --git a/hitchhiking_rotations/utils/loading.py b/hitchhiking_rotations/utils/loading.py index e28b88e..5217db3 100644 --- a/hitchhiking_rotations/utils/loading.py +++ b/hitchhiking_rotations/utils/loading.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# import os import yaml import pickle diff --git a/hitchhiking_rotations/utils/logger.py b/hitchhiking_rotations/utils/logger.py index 887e5ee..fbcc6d0 100644 --- a/hitchhiking_rotations/utils/logger.py +++ b/hitchhiking_rotations/utils/logger.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# from .metrics import * available_metrics = { diff --git a/hitchhiking_rotations/utils/metrics.py b/hitchhiking_rotations/utils/metrics.py index bce3478..07054ef 100644 --- a/hitchhiking_rotations/utils/metrics.py +++ b/hitchhiking_rotations/utils/metrics.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# import torch import roma diff --git a/hitchhiking_rotations/utils/notation.py b/hitchhiking_rotations/utils/notation.py index 3b99a69..4748f58 100644 --- a/hitchhiking_rotations/utils/notation.py +++ b/hitchhiking_rotations/utils/notation.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# from enum import Enum diff --git a/hitchhiking_rotations/utils/trainer.py b/hitchhiking_rotations/utils/trainer.py index 233d735..aecb086 100644 --- a/hitchhiking_rotations/utils/trainer.py +++ b/hitchhiking_rotations/utils/trainer.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# import torch diff --git a/hitchhiking_rotations/utils/training_helper.py b/hitchhiking_rotations/utils/training_helper.py index 1b22279..55f3438 100644 --- a/hitchhiking_rotations/utils/training_helper.py +++ b/hitchhiking_rotations/utils/training_helper.py @@ -1,8 +1,8 @@ -# +# # Copyright (c) 2024, MPI-IS, Jonas Frey, Rene Geist, Mikel Zhobro. # All rights reserved. Licensed under the MIT license. # See LICENSE file in the project root for details. -# +# from enum import Enum import numpy as np import argparse diff --git a/setup.py b/setup.py index 350a27a..6205862 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,22 @@ from setuptools import find_packages from distutils.core import setup -INSTALL_REQUIRES = ["numpy", "pip", "scipy", "scikit-learn", "matplotlib", "seaborn", "pytictac", "roma", "black", "pyyaml", "hydra", "omegaconf", "tqdm", "hydra-core"] +INSTALL_REQUIRES = [ + "numpy", + "pip", + "scipy", + "scikit-learn", + "matplotlib", + "seaborn", + "pytictac", + "roma", + "black", + "pyyaml", + "hydra", + "omegaconf", + "tqdm", + "hydra-core", +] setup( name="hitchhiking_rotations",