(self, output_dir: str)
| 536 | ) |
| 537 | |
| 538 | def save(self, output_dir: str) -> None: |
| 539 | # Save the vocabularies. |
| 540 | vocabularies = dict(_flatten_vocabularies(self._vocabularies)) |
| 541 | all_vocabularies = list(vocabularies.values()) |
| 542 | if all(vocabulary == all_vocabularies[0] for vocabulary in all_vocabularies): |
| 543 | vocabularies = {"shared": all_vocabularies[0]} |
| 544 | |
| 545 | for name, tokens in vocabularies.items(): |
| 546 | _save_vocabulary(output_dir, "%s_vocabulary" % name, tokens) |
| 547 | |
| 548 | # Save the rest of the model. |
| 549 | super().save(output_dir) |
| 550 | |
| 551 | |
| 552 | class LanguageModelConfig(ModelConfig): |
nothing calls this directly
no test coverage detected