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

Apply the change deprecating resume_download param to unchanged lines to be consistent across the source code #31333

Closed

Conversation

unscrew
Copy link

@unscrew unscrew commented Jun 9, 2024

Apply the change deprecating 'resume_download' param to unchanged lines to be consistent across the source code

What does this PR do?

Apply the change made in PR - Respect resume_download deprecation #30620 to the rest of the source code where the param is used.

Follow-up fixes to issue #30618

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Tagging the author of PR - Respect resume_download deprecation #30620 @Wauplin

…es to be consistent across the source code

- Apply the change made in PR huggingface#30620
@unscrew unscrew changed the title Apply the change deprecating 'resume_download' param to unchanged lines to be consistent across the source code Apply the change deprecating resume_download param to unchanged lines to be consistent across the source code Jun 9, 2024
Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Hey @unscrew thanks for pinging me :) I've commented why those changes were not done in #30620. I do think the docstrings should not be updated. For the snippet in examples/ folder, I let the transformers team tell us what's best.

@@ -536,7 +536,7 @@ def from_pretrained(
force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the configuration files and override the cached versions if
they exist.
resume_download:
resume_download (defaults to `None`):
Copy link
Contributor

Choose a reason for hiding this comment

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

It was decided in #30620 (comment) that simply resume_download: is fine in this context given it's a deprecated and unused parameter. It defaults to None but more importantly, it is completely ignored by downstream library.

@@ -182,7 +182,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: str, **kwargs):
def get_config_dict(cls, pretrained_model_name_or_path: str, **kwargs):
cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False)
resume_download = kwargs.pop("resume_download", None)
Copy link
Contributor

Choose a reason for hiding this comment

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

I have been told that usually the examples/ folder is not maintained or updated over time.

@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.

Copy link

github-actions bot commented Jul 9, 2024

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot closed this Jul 17, 2024
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