From f4554210c8ca9e102aac5882f04b47797a1638ee Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 02:02:24 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- omnigibson/controllers/null_joint_controller.py | 2 +- omnigibson/robots/articulated_trunk_robot.py | 3 ++- omnigibson/robots/behavior_robot.py | 2 +- omnigibson/utils/python_utils.py | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/omnigibson/controllers/null_joint_controller.py b/omnigibson/controllers/null_joint_controller.py index eea678a0a..9cc192cd3 100644 --- a/omnigibson/controllers/null_joint_controller.py +++ b/omnigibson/controllers/null_joint_controller.py @@ -1,5 +1,5 @@ -from omnigibson.controllers.controller_base import _controller_backend as cb from omnigibson.controllers import JointController +from omnigibson.controllers.controller_base import _controller_backend as cb class NullJointController(JointController): diff --git a/omnigibson/robots/articulated_trunk_robot.py b/omnigibson/robots/articulated_trunk_robot.py index d4906c65f..a182a8762 100644 --- a/omnigibson/robots/articulated_trunk_robot.py +++ b/omnigibson/robots/articulated_trunk_robot.py @@ -1,6 +1,7 @@ -import torch as th from functools import cached_property +import torch as th + from omnigibson.robots.manipulation_robot import ManipulationRobot from omnigibson.utils.python_utils import classproperty from omnigibson.utils.usd_utils import ControllableObjectViewAPI diff --git a/omnigibson/robots/behavior_robot.py b/omnigibson/robots/behavior_robot.py index 7d3693412..b1eebd3de 100644 --- a/omnigibson/robots/behavior_robot.py +++ b/omnigibson/robots/behavior_robot.py @@ -1,9 +1,9 @@ import itertools -from functools import cached_property import math import os from abc import ABC from collections import OrderedDict +from functools import cached_property from typing import Iterable, List, Literal, Tuple import torch as th diff --git a/omnigibson/utils/python_utils.py b/omnigibson/utils/python_utils.py index f9c4c8a8a..9f1e96bbe 100644 --- a/omnigibson/utils/python_utils.py +++ b/omnigibson/utils/python_utils.py @@ -786,6 +786,7 @@ def recursively_convert_to_torch(state): def recursively_convert_from_torch(state): # For all the lists in state dict, convert from torch tensor -> numpy array import numpy as np + for key, value in state.items(): if isinstance(value, dict): state[key] = recursively_convert_from_torch(value)