Home / Function/ model_names() — pytorch Function Reference

model_names() — pytorch Function Reference

Architecture documentation for the model_names() function in benchmarks.py from the pytorch codebase.

Entity Profile

Relationship Graph

Source Code

benchmarks/dynamo/benchmarks.py lines 16–29

def model_names(filename: str) -> set[str]:
    names = set()
    with open(filename) as fh:
        lines = fh.readlines()
        lines = [line.rstrip() for line in lines]
        for line in lines:
            line_parts = line.split(" ")
            if len(line_parts) == 1:
                line_parts = line.split(",")
            model_name = line_parts[0]
            if TORCHBENCH_ONLY_MODELS and model_name not in TORCHBENCH_ONLY_MODELS:
                continue
            names.add(model_name)
    return names

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free