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

Add text support to the Trainer's TensorBoard integration #34418

Merged
merged 8 commits into from
Nov 4, 2024

Conversation

JacobLinCool
Copy link
Contributor

@JacobLinCool JacobLinCool commented Oct 25, 2024

What does this PR do?

Add text support to TensorBoardCallback so users can see the decoded text generated in compute_metrics in TensorBoard. Sometimes the string is very long, so a max_str_len (defaults to 100) property has also been added to ProgressCallback to prevent polluting the progress log.

Can be used to checkout transcription when fine-tuning ASR models:
截圖 2024-10-26 凌晨2 49 07

Before submitting

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.

@JacobLinCool JacobLinCool changed the title Tensorboard text support Add text support to the Trainer's TensorBoard integration Oct 25, 2024
Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

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

Thanks a lot ! LGMT

src/transformers/trainer_callback.py Outdated Show resolved Hide resolved
@SunMarc SunMarc requested a review from LysandreJik October 28, 2024 02:05
Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

LGTM!

@LysandreJik
Copy link
Member

Feel free to merge when good @SunMarc

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

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

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

Awesome ! Thanks for integrating my suggestion.

@SunMarc SunMarc merged commit 48831b7 into huggingface:main Nov 4, 2024
24 checks passed
2015aroras pushed a commit to 2015aroras/transformers that referenced this pull request Nov 15, 2024
…e#34418)

* feat: add text support to TensorBoardCallback

* feat: ignore long strings in trainer progress

* docs: add docstring for max_str_len

* style: remove trailing whitespace

---------

Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com>
BernardZach pushed a commit to BernardZach/transformers that referenced this pull request Dec 5, 2024
…e#34418)

* feat: add text support to TensorBoardCallback

* feat: ignore long strings in trainer progress

* docs: add docstring for max_str_len

* style: remove trailing whitespace

---------

Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com>
BernardZach pushed a commit to innovationcore/transformers that referenced this pull request Dec 6, 2024
…e#34418)

* feat: add text support to TensorBoardCallback

* feat: ignore long strings in trainer progress

* docs: add docstring for max_str_len

* style: remove trailing whitespace

---------

Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com>
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
  NODES
COMMUNITY 3
innovation 1
Project 5
USERS 5