Skip to content

Commit

Permalink
remove userwarning
Browse files Browse the repository at this point in the history
  • Loading branch information
Data-Iab committed Nov 17, 2022
1 parent fd8e8c9 commit f8fa0ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aloscene/tensors/augmented_tensor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import torch
import inspect
import warnings
import numpy as np
from typing import *
import copy
Expand All @@ -11,6 +12,10 @@ class AugmentedTensor(torch.Tensor):
# Common dim names that must be aligned to handle label on a Tensor.
COMMON_DIM_NAMES = ["B", "T"]

# Ignore named tansors userwarning.
ERROR_MSG = "Named tensors and all their associated APIs are an experimental feature and subject to change"
warnings.filterwarnings(action='ignore', message=ERROR_MSG)

@staticmethod
def __new__(cls, x, names=None, device=None, *args, **kwargs):
# TODO The following is not optigal yet
Expand Down

0 comments on commit f8fa0ab

Please sign in to comment.