Skip to content

Commit

Permalink
removed dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 committed Aug 28, 2024
1 parent 77f7735 commit f62f896
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions luxonis_train/utils/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,7 @@ def from_missing_task(cls, task: str, present_tasks: list[str], class_name: str)
class BaseProtocol(BaseModel):
class Config:
arbitrary_types_allowed = True

@classmethod
def get_task(cls) -> str:
if len(cls.__annotations__) == 1:
return list(cls.__annotations__)[0]
raise ValueError(
"Protocol must have exactly one field for automatic task inference. "
"Implement custom `prepare` method in your attached module."
)
extra = "forbid"


class FeaturesProtocol(BaseProtocol):
Expand Down

0 comments on commit f62f896

Please sign in to comment.