Skip to content

Adds use_repr to model_addition_debugger_context #37984

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

Merged
merged 3 commits into from
May 23, 2025

Conversation

RyanMullins
Copy link
Contributor

What does this PR do?

Adds a use_repr: bool option to model_addition_debugger_context to support saving full tensors to disk instead of repr()-ized versions in the JSON file.

Fixes #37983

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.

@molbap @ArthurZucker

@github-actions github-actions bot marked this pull request as draft May 6, 2025 17:05
Copy link
Contributor

github-actions bot commented May 6, 2025

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@RyanMullins RyanMullins marked this pull request as ready for review May 6, 2025 17:55
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

LGTM! 🤗

Copy link
Contributor

@molbap molbap left a comment

Choose a reason for hiding this comment

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

LGTM @RyanMullins , thank you! I left a minor comment, and something valuable would be to update model_debugging_utils.md with the new option (with the large output size disclaimer)

@molbap
Copy link
Contributor

molbap commented May 20, 2025

Hey @RyanMullins - this looks good, do you mind running make fixup to suppress the code quality error? Then I can merge :) else let me know and I can push to this branch

@RyanMullins
Copy link
Contributor Author

Was preparing for and at Google IO today. Will update the PR and send it your way tomorrow.

@RyanMullins RyanMullins force-pushed the 37983-use-repr-option branch from 1891b39 to 4c06540 Compare May 21, 2025 14:44
@RyanMullins RyanMullins force-pushed the 37983-use-repr-option branch from 4c06540 to 079c588 Compare May 21, 2025 14:48
@molbap molbap enabled auto-merge (squash) May 23, 2025 09:22
@molbap molbap merged commit 9eb0a37 into huggingface:main May 23, 2025
11 checks passed
@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.

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.

Support saving tensors to a file in Model addition debuggers
4 participants