Skip to content

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

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

Add text support to the Trainer's TensorBoard integration#34418
SunMarc merged 8 commits intohuggingface:mainfrom
JacobLinCool:tensorboard-text-support

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

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