INNER CODE UNIT · Python
architectures_block
gokayfem/awesome-vlm-architectures · scripts/build_release_timeline.py:513
def architectures_block(sections: list[dict[str, object]]) -> str:
panels = "\n\n".join(str(section["raw"]).strip() for section in sections)
return f"## Architectures\n\n{panels}\n\n"
def validate(text: str) -> None:
sections = parse_sections(text)
labels = [str(section["label"]) for section in sections]
duplicates = sorted({label for label in labels if labels.count(label) > 1})
if duplicates:
raise ValueError(f"duplicate architecture labels: {duplicates}")
dates = [release_date(section) for section in sections]
if dates != sorted(dates, reverse=True):
raise ValueError("architecture panels are not newest-first")
models_start = text.index("## Models")
models_end = text.index("## Release Timeline", models_start)
model_links = re.findall(r"\[[^]]+]\(#([^)]+)\)", text[models_start:models_end])