Add Krea2 atlas gap plans
This commit is contained in:
@@ -6884,6 +6884,8 @@ def smoke_krea2_tuning_report_policy() -> None:
|
||||
folder_path = atlas_root / folder
|
||||
folder_path.mkdir()
|
||||
(folder_path / f"{folder}_sample.png").write_bytes(b"")
|
||||
(atlas_root / "custom_pose" / "custom_pose_b.png").write_bytes(b"")
|
||||
(atlas_root / "custom_pose_control" / "custom_pose_control_b.png").write_bytes(b"")
|
||||
atlas_rows = krea2_tuning_report.atlas_folder_rows(atlas_root=atlas_root)
|
||||
atlas_by_folder = {row.get("folder"): row for row in atlas_rows}
|
||||
_expect(atlas_by_folder.get("doggy", {}).get("mapped") is True, "Atlas report should mark catalog folders as mapped")
|
||||
@@ -6896,9 +6898,16 @@ def smoke_krea2_tuning_report_policy() -> None:
|
||||
_expect(atlas_summary.get("pose_folder_count") == 2, "Atlas report should count only pose folders")
|
||||
_expect(atlas_summary.get("mapped_folder_count") == 1, "Atlas report should count mapped pose folders")
|
||||
_expect(atlas_summary.get("unmapped_folders") == ["custom_pose"], "Atlas report should identify unmapped pose folders")
|
||||
gap_plans = krea2_tuning_report.atlas_gap_plans(atlas_root=atlas_root, sample_limit=2)
|
||||
_expect([plan.get("folder") for plan in gap_plans] == ["custom_pose"], "Atlas gap plans should follow unmapped folders")
|
||||
custom_gap = gap_plans[0]
|
||||
_expect(custom_gap.get("suggested_variant_key") == "pov_custom_pose_candidate", "Atlas gap plan should suggest stable variant key")
|
||||
_expect(len(custom_gap.get("sample_images") or []) == 2, "Atlas gap plan should include deterministic sample images")
|
||||
_expect(len(custom_gap.get("control_images") or []) == 2, "Atlas gap plan should include deterministic control images")
|
||||
atlas_markdown = krea2_tuning_report.markdown_report(atlas_root=atlas_root)
|
||||
_expect("Atlas Folder Coverage" in atlas_markdown, "Krea2 tuning report markdown lost atlas coverage section")
|
||||
_expect("custom_pose" in atlas_markdown, "Krea2 tuning report markdown lost unmapped atlas folder")
|
||||
_expect("pov_custom_pose_candidate" in atlas_markdown, "Krea2 tuning report markdown lost suggested gap key")
|
||||
markdown = krea2_tuning_report.markdown_report()
|
||||
_expect("pov_ballsucking_low_head" in markdown, "Krea2 tuning report markdown lost candidate variant")
|
||||
_expect("needs_fixed_seed_tests" in markdown, "Krea2 tuning report markdown lost coverage state")
|
||||
|
||||
Reference in New Issue
Block a user