INNER CODE UNIT · Python

validate

gokayfem/awesome-vlm-architectures · scripts/build_release_timeline.py:518

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])
    expected_links = [github_anchor(str(section["heading"])) for section in sections]
    if len(expected_links) != len(set(expected_links)):
        raise ValueError("duplicate GitHub heading anchors in architecture panels")
    if model_links != expected_links:
        raise ValueError(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…