From c9a82be592ca305180a7ab6a36e884bca1d426b8 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Sun, 23 Jul 2023 21:17:26 -0700 Subject: [PATCH] [check_config_docstrings.py] improve diagnostics (#25012) * [check_config_docstrings.py] improve diagnostics * style * rephrase * fix --- utils/check_config_docstrings.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/check_config_docstrings.py b/utils/check_config_docstrings.py index b92a2e559d..02ec510bab 100644 --- a/utils/check_config_docstrings.py +++ b/utils/check_config_docstrings.py @@ -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__":