text stringlengths 0 251 |
|---|
"omitted_channel": "", |
**row, |
} |
for row in reference["curvature_candidates"] |
], |
*[ |
{ |
"record_type": "leave_one_out", |
**row, |
} |
for row in reference["curvature_loo"] |
], |
] |
assert len(submitted_profile) == len(expected_profile) |
for actual_row, expected_row in zip( |
submitted_profile, |
expected_profile, |
strict=True, |
): |
> assert ( |
actual_row["record_type"] |
== expected_row["record_type"] |
) |
E AssertionError: assert 'candidate' == 'profile' |
E |
E - profile |
E + candidate |
test_outputs.py:2098: AssertionError |
_________ test_scientific_figure_matches_submitted_series_fit_and_band _________ |
def test_scientific_figure_matches_submitted_series_fit_and_band() -> None: |
_analysis, _slope_rows, _report = load_submission() |
reference = independent_reference() |
> image, manifest = load_figure() |
^^^^^^^^^^^^^ |
test_outputs.py:2298: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
test_outputs.py:1501: in load_figure |
manifest = normalize_figure_manifest(raw_manifest) |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
manifest = {'height_px': 500, 'image_file': 'spectrum_figure.png', 'manifest': {'description': 'Three-panel electron energy spect...2.783059855787728, 'spectral_index_above': -2.006957865809967, 'spectral_index_below': -1.643885722022037}, ...}], ...} |
def normalize_figure_manifest( |
manifest: dict[str, object], |
) -> dict[str, object]: |
image = manifest.get( |
"image", |
manifest.get("image_pixel_dimensions"), |
) |
if image is None and ( |
"image_width_px" in manifest |
or "image_height_px" in manifest |
): |
image = { |
"width_px": manifest.get("image_width_px"), |
"height_px": manifest.get("image_height_px"), |
} |
> assert isinstance(image, dict), ( |
"figure manifest must declare image pixel dimensions") |
E AssertionError: figure manifest must declare image pixel dimensions |
E assert False |
E + where False = isinstance(None, dict) |
test_outputs.py:1456: AssertionError |
________________ test_adversarial_figure_shortcuts_are_rejected ________________ |
def test_adversarial_figure_shortcuts_are_rejected() -> None: |
reference = independent_reference() |
> image, manifest = load_figure() |
^^^^^^^^^^^^^ |
test_outputs.py:2564: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
test_outputs.py:1501: in load_figure |
manifest = normalize_figure_manifest(raw_manifest) |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
manifest = {'height_px': 500, 'image_file': 'spectrum_figure.png', 'manifest': {'description': 'Three-panel electron energy spect...2.783059855787728, 'spectral_index_above': -2.006957865809967, 'spectral_index_below': -1.643885722022037}, ...}], ...} |
def normalize_figure_manifest( |
manifest: dict[str, object], |
) -> dict[str, object]: |
image = manifest.get( |
"image", |
manifest.get("image_pixel_dimensions"), |
) |
if image is None and ( |
"image_width_px" in manifest |
or "image_height_px" in manifest |
): |
image = { |
"width_px": manifest.get("image_width_px"), |
"height_px": manifest.get("image_height_px"), |
} |
> assert isinstance(image, dict), ( |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.