Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try main if tag does not work #322

Merged
merged 1 commit into from
Oct 13, 2022
Merged

try main if tag does not work #322

merged 1 commit into from
Oct 13, 2022

Conversation

lvwerra
Copy link
Member

@lvwerra lvwerra commented Oct 12, 2022

The previous fix #314 ignores the fact that some repos (especially community) might not have tags. We should fall back to main in that case.

@lvwerra lvwerra requested a review from lhoestq October 12, 2022 14:04
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 12, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

good catch ^^

Though if the user explicitly passed revision I don't think we should try main

@lvwerra
Copy link
Member Author

lvwerra commented Oct 12, 2022

The attribute self.revision contains what the users passed and if it's None then we don't try to go for main if the initial attempt failed:

if self.revision is None and os.getenv("HF_SCRIPTS_VERSION", SCRIPTS_VERSION) != "main":

So I think we should never overwrite whatever the user explicitly passed. Does that make sense?

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

Sorry I misread your code, LGTM !

@lvwerra lvwerra merged commit cb2a7f0 into main Oct 13, 2022
@lvwerra lvwerra deleted the fix-hub-versioning-2 branch October 13, 2022 11:50
NimaBoscarino pushed a commit that referenced this pull request Oct 17, 2022
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.

None yet

3 participants