Skip to main content

review.runs.failing_evaluations

review.runs.failing_evaluations(text)

Parse the block of failing evaluations of an evaluations-<n>.txt.

The block opens with the line SUMMARY (the last one counts) and holds lines FAILED <nodeid> or ERROR <nodeid>, each followed by indented crash lines.

Parameters

Name Type Description Default
text str The content of evaluations-<n>.txt. required

Returns

Name Type Description
tuple[Failure, …] tuple[Failure, …]: The failures in the order printed; empty if there is no block.

Examples

from babregen.review.runs import failing_evaluations

text = "babregen: failing evaluations\nERROR t.py\n    ImportError: no module\n"
print(failing_evaluations(text)[0].crash)
('ImportError: no module',)