Result that can be pickled and sent between processes
| 48 | |
| 49 | @dataclass |
| 50 | class SerializableResult: |
| 51 | """Result that can be pickled and sent between processes""" |
| 52 | |
| 53 | # Dictionary representation of the child program (Program objects might not pickle well if they contain complex locks) |
| 54 | child_program_dict: Optional[Dict[str, Any]] = None |
| 55 | # ID of the parent program |
| 56 | parent_id: Optional[str] = None |
| 57 | # Time taken for the iteration |
| 58 | iteration_time: float = 0.0 |
| 59 | # Prompt used for generation |
| 60 | prompt: Optional[Dict[str, str]] = None |
| 61 | # Raw LLM response |
| 62 | llm_response: Optional[str] = None |
| 63 | # Artifacts generated (images, logs, library docs) |
| 64 | artifacts: Optional[Dict[str, Any]] = None |
| 65 | # The iteration number |
| 66 | iteration: int = 0 |
| 67 | # Error message if something went wrong |
| 68 | error: Optional[str] = None |
| 69 | |
| 70 | |
| 71 | def _worker_init(config_dict: dict, evaluation_file: str, parent_env: dict = None) -> None: |
no outgoing calls
no test coverage detected