Skip to content

Commit

Permalink
chore: add warning
Browse files Browse the repository at this point in the history
Signed-off-by: ktro2828 <[email protected]>
  • Loading branch information
ktro2828 committed Dec 9, 2024
1 parent 33aaaa5 commit a929bb3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions t4_devkit/tier4.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os.path as osp
import time
import warnings
from typing import TYPE_CHECKING

import numpy as np
Expand Down Expand Up @@ -191,6 +192,7 @@ def __make_reverse_index__(self, verbose: bool) -> None:

for record in self.surface_ann:
if record.category_token == "": # NOTE: Some database contains this case
warnings.warn(f"Category token is empty for surface ann: {record.token}")
continue
category: Category = self.get("category", record.category_token)
record.category_name = category.name
Expand Down

0 comments on commit a929bb3

Please sign in to comment.