Add sequence labelling output
This commit is contained in:
parent
6106816999
commit
d6865e2aec
4 changed files with 21 additions and 15 deletions
|
|
@ -6,11 +6,6 @@ from .function_metadata import FunctionMetadata
|
|||
from .health_check_response import HealthCheckResponse
|
||||
from .model import Model
|
||||
from .operators import operators
|
||||
from .outputs import (
|
||||
ClassificationOutput,
|
||||
MultiLabelClassificationOutput,
|
||||
RegressionOutput,
|
||||
)
|
||||
from .query import Query
|
||||
from .route_config import RouteConfig
|
||||
from .sort_by import SortBy
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
from .classification_output import ClassificationOutput
|
||||
from .multi_label_classification_output import MultiLabelClassificationOutput
|
||||
from .regression_output import RegressionOutput
|
||||
|
|
@ -1 +1,15 @@
|
|||
# todo
|
||||
from typing import Any, List, Literal, Optional
|
||||
|
||||
from ..hashable_base_model import HashableBaseModel
|
||||
|
||||
|
||||
class LabeledToken(HashableBaseModel):
|
||||
token: str
|
||||
tag: Literal["B", "I", "O", "E", "S"]
|
||||
confidence: float
|
||||
explanation: Optional[Any]
|
||||
|
||||
|
||||
class SequenceLabelingOutput(HashableBaseModel):
|
||||
labeled_tokens: List[LabeledToken]
|
||||
explanation: Optional[Any]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue