Add sequence labelling output
This commit is contained in:
parent
6106816999
commit
d6865e2aec
4 changed files with 21 additions and 15 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
"""GreatAI."""
|
"""GreatAI."""
|
||||||
__version__ = "0.1.4"
|
__version__ = "0.1.5"
|
||||||
|
|
||||||
|
|
||||||
from .context import configure
|
from .context import configure
|
||||||
|
|
@ -22,10 +22,10 @@ from .remote.call_remote_great_ai_async import call_remote_great_ai_async
|
||||||
from .tracing.add_ground_truth import add_ground_truth
|
from .tracing.add_ground_truth import add_ground_truth
|
||||||
from .tracing.delete_ground_truth import delete_ground_truth
|
from .tracing.delete_ground_truth import delete_ground_truth
|
||||||
from .tracing.query_ground_truth import query_ground_truth
|
from .tracing.query_ground_truth import query_ground_truth
|
||||||
from .views import (
|
from .views import RouteConfig, Trace
|
||||||
ClassificationOutput,
|
from .views.outputs.classification_output import ClassificationOutput
|
||||||
|
from .views.outputs.multi_label_classification_output import (
|
||||||
MultiLabelClassificationOutput,
|
MultiLabelClassificationOutput,
|
||||||
RegressionOutput,
|
|
||||||
RouteConfig,
|
|
||||||
Trace,
|
|
||||||
)
|
)
|
||||||
|
from .views.outputs.regression_output import RegressionOutput
|
||||||
|
from .views.outputs.sequence_labeling_output import SequenceLabelingOutput
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,6 @@ from .function_metadata import FunctionMetadata
|
||||||
from .health_check_response import HealthCheckResponse
|
from .health_check_response import HealthCheckResponse
|
||||||
from .model import Model
|
from .model import Model
|
||||||
from .operators import operators
|
from .operators import operators
|
||||||
from .outputs import (
|
|
||||||
ClassificationOutput,
|
|
||||||
MultiLabelClassificationOutput,
|
|
||||||
RegressionOutput,
|
|
||||||
)
|
|
||||||
from .query import Query
|
from .query import Query
|
||||||
from .route_config import RouteConfig
|
from .route_config import RouteConfig
|
||||||
from .sort_by import SortBy
|
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