MCPcopy Create free account
hub / github.com/ModalityDance/Omni-R1 / get_model_classes

Function get_model_classes

src/transformers/utils/get_test_info.py:94–102  ·  view source on GitHub ↗

Get all model classes that appear in `all_model_classes` attributes in a model test file.

(test_file)

Source from the content-addressed store, hash-verified

92
93
94def get_model_classes(test_file):
95 """Get all model classes that appear in `all_model_classes` attributes in a model test file."""
96 test_classes = get_test_classes(test_file)
97 model_classes = set()
98 for test_class in test_classes:
99 model_classes.update(test_class.all_model_classes)
100
101 # sort with class names
102 return sorted(model_classes, key=lambda x: x.__name__)
103
104
105def get_model_tester_from_test_class(test_class):

Callers 2

Calls 2

get_test_classesFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected