compilation output to logs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user