Document visualization workflow for lab 5 report
This commit is contained in:
34
lab5/generate_report_figures.py
Normal file
34
lab5/generate_report_figures.py
Normal file
@@ -0,0 +1,34 @@
|
||||
"""Utility script to regenerate visualization frames for the LaTeX report."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def _import_run_for_dimension():
|
||||
base_dir = Path(__file__).resolve().parent
|
||||
sys.path.insert(0, str(base_dir))
|
||||
try:
|
||||
from main import run_for_dimension as fn # type: ignore[import-not-found]
|
||||
finally:
|
||||
sys.path.pop(0)
|
||||
return fn
|
||||
|
||||
|
||||
def main() -> None:
|
||||
base_dir = Path(__file__).resolve().parent
|
||||
results_dir = base_dir / "report" / "img" / "results"
|
||||
|
||||
run_for_dimension = _import_run_for_dimension()
|
||||
|
||||
run_for_dimension(
|
||||
2,
|
||||
results_dir=str(results_dir),
|
||||
save_generations=[1, 2, 3, 5, 7, 9, 10, 15, 19],
|
||||
log=False,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user