[docs] fix auto-add release dates#46283
Merged
Merged
Conversation
zucchini-nlp
commented
May 29, 2026
Comment on lines
+282
to
+295
| file_path = os.path.join(DOCS_PATH, model_card) | ||
| paper_link = get_paper_link(model_card=model_card, path=file_path) | ||
|
|
||
| if paper_link in ("No_paper", "blog"): | ||
| release_date = r"{release_date}" | ||
| else: | ||
| release_date = get_release_date(paper_link) | ||
|
|
||
| if match: | ||
| # Preserve existing release date unless it's a placeholder | ||
| existing_release_date = match.group(1) | ||
| if existing_release_date not in (r"{release_date}", "None"): | ||
| release_date = existing_release_date | ||
|
|
Member
Author
There was a problem hiding this comment.
this part will trigger CI to fail whenever docs are changed and a paper-link is added. Was not triggering previously
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
stevhliu
approved these changes
May 29, 2026
Member
stevhliu
left a comment
There was a problem hiding this comment.
super nice, thanks for the fix!
kashif
pushed a commit
to kashif/transformers
that referenced
this pull request
Jun 1, 2026
* fix it to be more specific * typos * typo * fix repo * new model added
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Branches off from #45827
Changes the wording slightly to be more explicit, and drops off "added on HF papers on {date}" completely if the model isn't found on HF papers. That way we won't have dummy
{release_date}in docsAlso adds a check on "HF papers release date" when running repo-consistency (see
insert_dates). This was reason why we get random unrelated doc changes, CI never complained and it was possible to fix it only withmake fix-repo