Skip to content

Instantly share code, notes, and snippets.

@tiran
Created September 27, 2025 19:01
Show Gist options
  • Select an option

  • Save tiran/946efacb8fcda04c244abe6eef5c667c to your computer and use it in GitHub Desktop.

Select an option

Save tiran/946efacb8fcda04c244abe6eef5c667c to your computer and use it in GitHub Desktop.
llama-stack-test-graph with my MR 763
[
  [
    "flit-core==3.12.0",
    "milvus-lite==2.5.1",
    "pdm-backend==2.4.5",
    "poetry-core==2.1.3",
    "setuptools==80.3.1"
  ],
  [
    "aiohappyeyeballs==2.6.1",
    "aiosignal==1.4.0",
    "aiosqlite==0.21.0",
    "autoevals==0.0.129",
    "braintrust-core==0.0.59",
    "calver==2025.4.17",
    "certifi==2025.8.3",
    "chardet==5.2.0",
    "chevron==0.14.0",
    "click==8.2.2",
    "coherent-licensed==0.5.2",
    "cycler==0.12.1",
    "cython==3.0.12",
    "cython==3.0.5",
    "cython==3.1.3",
    "datasets==4.0.0",
    "decorator==5.2.1",
    "dill==0.3.8",
    "dill==0.4.0",
    "distro==1.9.0",
    "durationpy==0.10",
    "ecdsa==0.19.1",
    "fastapi==0.116.1",
    "fonttools==4.59.1",
    "gast==0.6.0",
    "google-auth==2.40.3",
    "googleapis-common-protos==1.70.0",
    "greenlet==3.2.4",
    "grpcio==1.74.0",
    "h11==0.16.0",
    "huggingface-hub==0.34.4",
    "idna==3.10",
    "ipython-pygments-lexers==1.1.1",
    "ipython==9.4.0",
    "jedi==0.19.2",
    "joblib==1.5.1",
    "kubernetes==33.1.0",
    "llama-stack-provider-lmeval==0.2.1",
    "llama-stack==0.2.17",
    "markdown-it-py==4.0.0",
    "markupsafe==3.0.2",
    "matplotlib-inline==0.1.7",
    "mdurl==0.1.2",
    "mpmath==1.3.0",
    "multidict==6.6.4",
    "multiprocess==0.70.16",
    "networkx==3.5",
    "nltk==3.9.1",
    "oauthlib==3.3.1",
    "packaging==25.0",
    "parso==0.8.4",
    "pathspec==0.12.1",
    "pexpect==4.9.0",
    "pillow==11.3.0",
    "pip==25.2",
    "pkgconfig==1.5.5",
    "ply==3.11",
    "polyleven==0.9.0",
    "prompt-toolkit==3.0.51",
    "protobuf==6.32.0",
    "psutil==7.0.0",
    "psycopg2-binary==2.9.10",
    "ptyprocess==0.7.0",
    "pyaml==25.7.0",
    "pyasn1-modules==0.4.2",
    "pyasn1==0.6.1",
    "pycparser==2.22",
    "pyparsing==3.2.3",
    "pypdf==6.0.0",
    "pyproject-hooks==1.2.0",
    "python-dotenv==1.1.1",
    "pytz==2025.2",
    "regex==2025.7.34",
    "requests-oauthlib==2.0.0",
    "rich==14.1.0",
    "rsa==4.9.1",
    "semantic-version==2.10.0",
    "six==1.17.0",
    "smmap==5.0.2",
    "sse-starlette==3.0.2",
    "threadpoolctl==3.6.0",
    "tomlkit==0.13.3",
    "transformers==4.55.3",
    "typing-extensions==4.14.1",
    "versioneer==0.29",
    "wcwidth==0.2.13",
    "websocket-client==1.8.0",
    "xxhash==3.5.0"
  ],
  [
    "aiohttp==3.12.15",
    "beniget==0.4.2.post1",
    "build==1.3.0",
    "cffi==1.17.1",
    "dunamai==1.25.0",
    "gitdb==4.0.12",
    "jinja2==3.1.6",
    "pyproject-metadata==0.9.1",
    "setuptools-scm==7.1.0",
    "setuptools-scm==8.3.1",
    "setuptools-scm==9.2.0",
    "sqlalchemy==2.0.43",
    "sympy==1.14.0",
    "trove-classifiers==2025.8.6.13",
    "wheel==0.46.1"
  ],
  [
    "anyio==4.10.0",
    "asttokens==3.0.0",
    "astunparse==1.6.3",
    "asyncpg==0.30.0",
    "cachetools==5.5.2",
    "charset-normalizer==3.4.3",
    "cppy==1.3.1",
    "debugpy==1.8.16",
    "executing==2.2.0",
    "fire==0.7.1",
    "gitpython==3.1.45",
    "httpx-sse==0.4.1",
    "importlib-metadata==8.7.0",
    "llama-stack-provider-trustyai-fms==0.2.0",
    "meson==1.2.1",
    "meson==1.8.4",
    "nest-asyncio==1.6.0",
    "pluggy==1.6.0",
    "pure-eval==0.2.3",
    "pybind11==2.13.6",
    "python-dateutil==2.9.0.post0",
    "python-jose==3.5.0",
    "pyyaml==6.0.2",
    "sentence-transformers==5.1.0",
    "sentencepiece==0.2.1",
    "setuptools-rust==1.11.1",
    "sniffio==1.3.1",
    "stack-data==0.6.3",
    "tornado==6.5.2",
    "tqdm==4.67.1",
    "tzdata==2025.2",
    "ujson==5.11.0",
    "zipp==3.23.0"
  ],
  [
    "hatchling==1.26.3",
    "hatchling==1.27.0",
    "kiwisolver==1.4.9",
    "maturin==1.9.3",
    "meson-python==0.13.1",
    "pymilvus==2.6.0",
    "tiktoken==0.11.0"
  ],
  [
    "annotated-types==0.7.0",
    "comm==0.2.3",
    "cryptography==45.0.6",
    "dnspython==2.7.0",
    "expandvars==1.1.1",
    "hatch-fancy-pypi-readme==25.1.0",
    "hatch-requirements-txt==0.4.1",
    "hatch-vcs==0.5.0",
    "hf-xet==1.1.8",
    "jiter==0.10.0",
    "opentelemetry-api==1.36.0",
    "opentelemetry-exporter-otlp-proto-common==1.36.0",
    "opentelemetry-exporter-otlp-proto-grpc==1.36.0",
    "opentelemetry-exporter-otlp-proto-http==1.36.0",
    "opentelemetry-exporter-otlp==1.36.0",
    "opentelemetry-proto==1.36.0",
    "opentelemetry-sdk==1.36.0",
    "opentelemetry-semantic-conventions==0.57b0",
    "pydantic-core==2.33.2",
    "pydantic-settings==2.10.1",
    "pygments==2.19.2",
    "python-multipart==0.0.20",
    "redis==6.4.0",
    "rpds-py==0.27.0",
    "safetensors==0.6.2",
    "starlette==0.47.2",
    "tokenizers==0.21.4",
    "traitlets==5.14.3",
    "typing-inspection==0.4.1",
    "uv-dynamic-versioning==0.10.0",
    "uvicorn==0.35.0"
  ],
  [
    "attrs==25.3.0",
    "filelock==3.19.1",
    "frozenlist==1.7.0",
    "fsspec==2024.6.1",
    "httpcore==1.0.9",
    "httpx==0.28.1",
    "jsonschema-specifications==2025.4.1",
    "jsonschema==4.25.1",
    "llama-api-client==0.2.0",
    "llama-stack-client==0.2.18",
    "mcp==1.13.0",
    "openai==1.100.2",
    "platformdirs==4.3.8",
    "propcache==0.3.2",
    "pydantic==2.11.7",
    "pymongo==4.14.1",
    "referencing==0.36.2",
    "scikit-build-core==0.11.5",
    "scikit-build==0.18.1",
    "termcolor==3.1.0",
    "urllib3==2.5.0",
    "yarl==1.20.1"
  ],
  [
    "jupyter-core==5.8.1",
    "ninja==1.11.1.1",
    "patchelf==0.18.0.0",
    "pybind11==3.0.0",
    "pyzmq==27.0.2",
    "requests==2.32.5"
  ],
  [
    "jupyter-client==8.6.3",
    "meson-python==0.15.0",
    "meson-python==0.16.0",
    "meson-python==0.18.0"
  ],
  [
    "contourpy==1.3.3",
    "ipykernel==6.30.1",
    "matplotlib==3.10.5",
    "numpy==1.26.4",
    "numpy==2.2.6",
    "numpy==2.3.2"
  ],
  [
    "pandas==2.2.1",
    "pyarrow==20.0.0",
    "pythran==0.17.0",
    "torch==2.7.0"
  ],
  [
    "scipy==1.15.3",
    "scipy==1.16.1",
    "torchvision==0.22.0"
  ],
  [
    "scikit-learn==1.7.1"
  ]
]
def test() -> None:
    import graphlib
    import json
    import sys

    graph = DependencyGraph.from_file(sys.argv[1])
    topo: graphlib.TopologicalSorter[DependencyNode] = graphlib.TopologicalSorter()
    for node in graph.get_all_nodes():
        if node.canonicalized_name == ROOT:
            continue
        topo.add(node, *node.iter_build_requirements())
    topo.prepare()
    steps: list[list[str]] = []
    while topo.is_active():
        ready = topo.get_ready()
        steps.append(sorted(node.key for node in ready))
        topo.done(*ready)
    print(json.dumps(steps, indent=2))


if __name__ == "__main__":
    test()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment