Skip to content

[docs] fix auto-add release dates#46283

Merged
zucchini-nlp merged 6 commits into
huggingface:mainfrom
zucchini-nlp:add-dates-fix
Jun 1, 2026
Merged

[docs] fix auto-add release dates#46283
zucchini-nlp merged 6 commits into
huggingface:mainfrom
zucchini-nlp:add-dates-fix

Conversation

@zucchini-nlp
Copy link
Copy Markdown
Member

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 docs

Also 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 with make fix-repo

Comment thread utils/add_dates.py
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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part will trigger CI to fail whenever docs are changed and a paper-link is added. Was not triggering previously

@zucchini-nlp zucchini-nlp requested a review from stevhliu May 29, 2026 08:48
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nice, thanks for the fix!

@zucchini-nlp zucchini-nlp added this pull request to the merge queue Jun 1, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 1, 2026
@zucchini-nlp zucchini-nlp enabled auto-merge June 1, 2026 08:33
@zucchini-nlp zucchini-nlp added this pull request to the merge queue Jun 1, 2026
Merged via the queue into huggingface:main with commit 3ceb0e1 Jun 1, 2026
39 checks passed
@zucchini-nlp zucchini-nlp deleted the add-dates-fix branch June 1, 2026 08:59
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants