Skip to content

OpRecord

🛈 DocStrings

What a node stores: the op id plus its (immutable) params.

Source code in src/datacook/engine/ops/base.py
@dataclass(frozen=True, slots=True)
class OpRecord:
    """What a node stores: the op id plus its (immutable) params."""

    op_id: str
    params: Params

    def to_json(self) -> dict[str, Any]:
        return {"op": self.op_id, "params": self.params.model_dump(mode="json")}

:fa-brands-github: Show source on GitHub