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

Function get_test_output_path

utils/generate_model_tests.py:495–506  ·  view source on GitHub ↗
(model_filepath: str)

Source from the content-addressed store, hash-verified

493
494
495def get_test_output_path(model_filepath: str) -> str:
496 path = Path(model_filepath)
497 model_filename = path.stem
498
499 if "transformers" in path.parts:
500 return f"tests/models/transformers/test_models_{model_filename}.py"
501 elif "unets" in path.parts:
502 return f"tests/models/unets/test_models_{model_filename}.py"
503 elif "autoencoders" in path.parts:
504 return f"tests/models/autoencoders/test_models_{model_filename}.py"
505 else:
506 return f"tests/models/test_models_{model_filename}.py"
507
508
509def main():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…