[check_config_docstrings.py] improve diagnostics (#25012)

* [check_config_docstrings.py] improve diagnostics

* style

* rephrase

* fix
This commit is contained in:
Stas Bekman
2023-07-23 21:17:26 -07:00
committed by GitHub
parent b257c46a07
commit c9a82be592

View File

@@ -85,7 +85,12 @@ def check_config_docstrings_have_checkpoints():
if len(configs_without_checkpoint) > 0:
message = "\n".join(sorted(configs_without_checkpoint))
raise ValueError(f"The following configurations don't contain any valid checkpoint:\n{message}")
raise ValueError(
f"The following configurations don't contain any valid checkpoint:\n{message}\n\n"
"The requirement is to include a link pointing to one of the models of this architecture in the "
"docstring of the config classes listed above. The link should have be a markdown format like "
"[myorg/mymodel](https://huggingface.co/myorg/mymodel)."
)
if __name__ == "__main__":