Skip to content

Commit

Permalink
Remove typeguard checks
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Nov 26, 2024
1 parent 20a6abd commit 77898ba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ ignore = [
"E501", # Line too long.
"E721", # Do not compare types, use `isinstance()`.
"F722", # Forward annotation false positive from jaxtyping. Should be caught by pyright.
"F731", # Do not assign a lambda expression, use a def.
"F821", # Forward annotation false positive from jaxtyping. Should be caught by pyright.
"PLR2004", # Magic value used in comparison.
"PLR0915", # Too many statements.
Expand Down
4 changes: 1 addition & 3 deletions src/egoallo/data/dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
import numpy as np
import torch
import torch.utils.data
import typeguard
from jaxtyping import Bool, Float, jaxtyped
from jaxtyping import Bool, Float
from torch import Tensor

from .. import fncsmpl, fncsmpl_extensions
from .. import transforms as tf
from ..tensor_dataclass import TensorDataclass


@jaxtyped(typechecker=typeguard.typechecked)
class EgoTrainingData(TensorDataclass):
"""Dictionary of tensors we use for EgoAllo training."""

Expand Down
7 changes: 1 addition & 6 deletions src/egoallo/fncsmpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@

import numpy as np
import torch
import typeguard
from einops import einsum
from jaxtyping import Float, Int, jaxtyped
from jaxtyping import Float, Int
from torch import Tensor

from .tensor_dataclass import TensorDataclass
from .transforms import SE3, SO3


@jaxtyped(typechecker=typeguard.typechecked)
class SmplhModel(TensorDataclass):
"""A human body model from the SMPL family."""

Expand Down Expand Up @@ -118,7 +116,6 @@ def with_shape(self, betas: Float[Tensor, "*#batch n_betas"]) -> SmplhShaped:
)


@jaxtyped(typechecker=typeguard.typechecked)
class SmplhShaped(TensorDataclass):
"""The SMPL-H body model with a body shape applied."""

Expand Down Expand Up @@ -183,7 +180,6 @@ def with_pose(
)


@jaxtyped(typechecker=typeguard.typechecked)
class SmplhShapedAndPosed(TensorDataclass):
shaped_model: SmplhShaped
"""Underlying shaped body model."""
Expand Down Expand Up @@ -266,7 +262,6 @@ def lbs(self) -> SmplMesh:
)


@jaxtyped(typechecker=typeguard.typechecked)
class SmplMesh(TensorDataclass):
"""Outputs from the SMPL-H model."""

Expand Down

0 comments on commit 77898ba

Please sign in to comment.