Skip to content

add time units to throughput metrics and also secs_per_step metric. - #3693

Open
ekelsen wants to merge 1 commit into
mainfrom
erich/metric_update
Open

add time units to throughput metrics and also secs_per_step metric.#3693
ekelsen wants to merge 1 commit into
mainfrom
erich/metric_update

Conversation

@ekelsen

@ekelsen ekelsen commented Oct 31, 2024

Copy link
Copy Markdown

What does this PR do?

The time units didn't have units, this makes the units explicit and adds a new secs_per_step metric.

@ekelsen
ekelsen marked this pull request as ready for review November 1, 2024 19:01
@ekelsen
ekelsen requested a review from mvpatel2000 November 1, 2024 19:01

@mvpatel2000 mvpatel2000 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any specific use case for secs_per_step?

Comment on lines 369 to +374
'time/train': train_wct / self.divider,
'time/val': self.total_eval_wct / self.divider,
'time/total': (train_wct + self.total_eval_wct) / self.divider,
f'time_{self.time_unit}/train': train_wct / self.divider,
f'time_{self.time_unit}/val': self.total_eval_wct / self.divider,
f'time_{self.time_unit}/total': (train_wct + self.total_eval_wct) / self.divider,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's just rename time/train -> time/train/hours?

Changing log keys is a little annoying to end user... but duplicate logging is more annoying imo.

@dakinggg dakinggg Nov 1, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mvpatel2000 i was a bit worried that would be a breaking change for any downstream pipelines that process metrics.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Discussed offline, it's better to avoid overwhelming loggers

Comment on lines +364 to +366
secs_per_step = 0
if len(self.history_wct) > 1:
secs_per_step = self.history_wct[-1] - self.history_wct[-2]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should probably average over history_wct as all metrics respect window_size. Something like:
elapsed_wct = (self.history_wct[-1] - self.history_wct[0]) / (len(history-wct)-1)

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.

3 participants