ModelResult
类型: 类
领域: Graph、序列化与重放
推荐导入: from cadflow import ModelResult
签名
class ModelResult(value: 'Any', session: 'GraphSession', result_node_ids: 'Tuple[str, ...]', model_json: 'str', session_json: 'str', artifact_paths: 'Mapping[str, Path]' = <factory>) -> None
功能说明
ModelResult 是 CadFlow Graph、序列化与重放领域的公共类。
原始 API 说明
The value and durable graph artifacts produced by @model.
参数
| 名称 | 类型 | 必需 | 默认值 | 源码说明 |
|---|---|---|---|---|
value | 'Any' | 是 | - | 源码 Docstring 未单独说明。 |
session | 'GraphSession' | 是 | - | 源码 Docstring 未单独说明。 |
result_node_ids | 'Tuple[str, ...]' | 是 | - | 源码 Docstring 未单独说明。 |
model_json | 'str' | 是 | - | 源码 Docstring 未单独说明。 |
session_json | 'str' | 是 | - | 源码 Docstring 未单独说明。 |
artifact_paths | 'Mapping[str, Path]' | 否 | <factory> | 源码 Docstring 未单独说明。 |
返回值
类型: None
源码 Docstring 未声明更多返回语义。
异常
源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。
数据字段
| 名称 | 类型 | 默认值 |
|---|---|---|
value | 'Any' | required |
session | 'GraphSession' | required |
result_node_ids | 'Tuple[str, ...]' | required |
model_json | 'str' | required |
session_json | 'str' | required |
artifact_paths | 'Mapping[str, Path]' | factory |
公共成员
| 成员 | 类型 | 签名 | 说明 |
|---|---|---|---|
export_artifacts | method | (self, *, output_dir: 'str | Path') -> "'ModelResult'" | Write one self-contained Scene ZIP for the captured model. |
replay | method | (self, *, strict: 'bool' = True) -> 'List[Any]' | Replay the captured canonical model result. |
行为与约束
- 实例是不可变 dataclass 值;更新式工作流会返回替代值。
导入检查
from cadflow import ModelResult