compilation output to logs

This commit is contained in:
2026-07-31 12:52:04 +02:00
parent 22e9a0386c
commit a38d461a36
4 changed files with 26 additions and 4 deletions

View File

@@ -13,13 +13,15 @@ class CompiledModel:
model_name: str
executable: str
working_directory: str
output: str = ""
errors: str = ""
@classmethod
def from_data(cls, data: Mapping[str, Any]) -> CompiledModel:
return cls(model_name=str(data["model_name"]), executable=str(data["executable"]), working_directory=str(data["working_directory"]))
return cls(model_name=str(data["model_name"]), executable=str(data["executable"]), working_directory=str(data["working_directory"]), output=str(data.get("output", "")), errors=str(data.get("errors", "")))
def to_data(self) -> dict[str, Any]:
return {"model_name": self.model_name, "executable": self.executable, "working_directory": self.working_directory}
return {"model_name": self.model_name, "executable": self.executable, "working_directory": self.working_directory, "output": self.output, "errors": self.errors}
@dataclass