Finds all models that have been modified in the diff. Returns: A set containing the names of the models that have been modified (e.g. {'llama', 'whisper'}).
()
| 124 | |
| 125 | |
| 126 | def get_models_in_diff(): |
| 127 | """ |
| 128 | Finds all models that have been modified in the diff. |
| 129 | |
| 130 | Returns: |
| 131 | A set containing the names of the models that have been modified (e.g. {'llama', 'whisper'}). |
| 132 | """ |
| 133 | modified_files = _get_modified_files() |
| 134 | |
| 135 | # Matches both modelling files and tests |
| 136 | relevant_modified_files = [x for x in modified_files if "/models/" in x and x.endswith(".py")] |
| 137 | model_names = set() |
| 138 | for file_path in relevant_modified_files: |
| 139 | model_name = file_path.split("/")[-2] |
| 140 | model_names.add(model_name) |
| 141 | return model_names |
| 142 | |
| 143 | |
| 144 | def converter_changed_in_diff(): |
no test coverage detected