Skip to content

Commit

Permalink
fixed task name for native parser
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 committed Jan 14, 2025
1 parent 2df74e6 commit 8de4ad0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions luxonis_ml/data/parsers/base_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ def _add_task(self, generator: DatasetIterator) -> DatasetIterator:
task_name = self.task_name or ""
for item in generator:
if isinstance(item, dict):
item["task"] = task_name
else:
if "task" not in item:
item["task"] = task_name
elif not item.task:
item.task = task_name
yield item

0 comments on commit 8de4ad0

Please sign in to comment.