Skip to content

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

Merged
SunMarc merged 8 commits into
huggingface:mainfrom
JacobLinCool:tensorboard-text-support
Nov 4, 2024
Merged

SunMarc merged 8 commits into
huggingface:mainfrom
JacobLinCool:tensorboard-text-support

Conversation

@JacobLinCool

@JacobLinCool JacobLinCool commented Oct 25, 2024 •

Copy link
Copy Markdown
Contributor

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

@SunMarc SunMarc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks a lot ! LGMT

Comment thread src/transformers/trainer_callback.py Resolved
@SunMarc
SunMarc requested a review from LysandreJik October 28, 2024 02:05

@LysandreJik LysandreJik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@LysandreJik

Copy link
Copy Markdown
Member

Feel free to merge when good @SunMarc

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@SunMarc SunMarc left a comment

Copy link
Copy Markdown
Member

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