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

[Bugfix] Fix 1-indexing for replica_id in MetricsStore #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sicario001
Copy link

Issue
MetricsStore uses 1-indexing for replica_id at several places even though replica_ids are 0-indexed.

Fix
Update 1-indexed usage of replica_id in _replica_memory_usage, _replica_busy_time and _replica_mfu inside MetricsStore to 0-indexed.

@AgrawalAmey
Copy link
Contributor

@nitinkedia7 can you please take a look, thanks!

@nitinkedia7 nitinkedia7 self-requested a review September 6, 2024 08:27
@nitinkedia7
Copy link
Collaborator

@sicario001 Please look at the comments I have left and also accept the Contributor License Agreement (without which the PR cannot be merged).

@sicario001
Copy link
Author

@microsoft-github-policy-service agree

@AgrawalAmey
Copy link
Contributor

@sicario001 @nitinkedia7 are we good to merge?

@@ -699,9 +698,9 @@ def on_replica_stage_schedule(
if not self._config.store_utilization_metrics:
return

self._replica_busy_time[replica_id - 1][stage_id - 1].put(time, 100)
self._replica_busy_time[replica_id][stage_id - 1].put(time, 100)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we align statge_id also along with replica_id to be 0-indexed? This will help in uniformity.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also while printing the metrics in _store_utilization_metrics we can remove the + 1 from the plot names.

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