Skip to content

Conversation

@yonigozlan
Copy link
Member

As the title says, we used to fetch the repo with upstream/main, which doesn't work if the repo is not forked (?).
This way should be more robust

@HuggingFaceDocBuilderDev

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.

Comment on lines +77 to +84
except Exception as e:
# Handle all other errors (network issues, timeouts, etc.)
print(
f"Warning: Could not verify file existence on GitHub: {url}\n"
f"Error: {e}\n"
f"Assuming file exists and continuing with local git history."
)
return True
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure I understand, if there's a timeout or anything we assume file exists anyways?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes that's the conservative fallback, instead of always overriding with today's date (which is what happens when the file isn't found) when there's an error

Copy link
Member

Choose a reason for hiding this comment

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

isn't it going to err out later when we try to get the first commit adding the (maybe non-existent?) model

Copy link
Member Author

Choose a reason for hiding this comment

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

It will use the local git history for this so it should be alright

@yonigozlan yonigozlan merged commit 703da86 into huggingface:main Dec 16, 2025
15 checks passed
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.

4 participants