-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy path_inference_node.py
More file actions
26 lines (20 loc) · 925 Bytes
/
_inference_node.py
File metadata and controls
26 lines (20 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""Configuration for the nodes."""
from dataclasses import dataclass
from typing import Any
from autointent.custom_types import NodeType
from ._transformers import CrossEncoderConfig, EmbedderConfig
@dataclass
class InferenceNodeConfig:
"""Configuration for the inference node."""
node_type: NodeType
"""Type of the node. Should be one of the NODE_TYPES"""
module_name: str
"""Type of the module. Should be one of the Module"""
module_config: dict[str, Any]
"""Configuration of the module"""
load_path: str | None = None
"""Path to the module dump. If None, the module will be trained from scratch"""
embedder_config: EmbedderConfig | None = None
"""One can override presaved embedder config while loading from file system."""
cross_encoder_config: CrossEncoderConfig | None = None
"""One can override presaved cross encoder config while loading from file system."""