Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Add length of truncation to logs #3508

Merged
merged 6 commits into from
Mar 16, 2021
Merged

Add length of truncation to logs #3508

merged 6 commits into from
Mar 16, 2021

Conversation

spencerp
Copy link
Contributor

Patch description
It seems useful to know the average number of tokens truncated when they are truncated. This can't be reliably gleaned from the current metrics, since avg(original_context_length) can be below the truncation length any time context_truncate is below 0.5.

Testing steps
Used this in a training run -> Verified the metric showed up in tensorboard

@dexterju27
Copy link
Contributor

LGTM, could you expend the test in test in test_torch_agent.py :

def test_truncate_metrics(self):

Copy link
Contributor

@dexterju27 dexterju27 left a comment

Choose a reason for hiding this comment

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

add this to the test plz and you are good to go.

Copy link
Contributor

@stephenroller stephenroller left a comment

Choose a reason for hiding this comment

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

Can you hold until I land the Tensor diff?

@spencerp
Copy link
Contributor Author

Can you hold until I land the Tensor diff?

Sure! This one, right? #3389

@spencerp spencerp merged commit 333ab04 into master Mar 16, 2021
@spencerp spencerp deleted the trun-len branch March 16, 2021 22:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants