MCPcopy Index your code
hub / github.com/huggingface/diffusers / analyze_model_file

Function analyze_model_file

utils/generate_model_tests.py:196–204  ·  view source on GitHub ↗
(filepath: str)

Source from the content-addressed store, hash-verified

194
195
196def analyze_model_file(filepath: str) -> tuple[list[dict], set[str]]:
197 with open(filepath) as f:
198 source = f.read()
199
200 tree = ast.parse(source)
201 analyzer = ModelAnalyzer()
202 analyzer.visit(tree)
203
204 return analyzer.model_classes, analyzer.imports
205
206
207def determine_testers(model_info: dict, include_optional: list[str], imports: set[str]) -> list[str]:

Callers 1

mainFunction · 0.85

Calls 1

ModelAnalyzerClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…