[PR #1195] [MERGED] progress: fix bar rate #72795

Closed
opened 2026-05-05 04:20:50 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/1195
Author: @mxyng
Created: 11/19/2023
Status: Merged
Merged: 11/28/2023
Merged by: @mxyng

Base: mainHead: mxyng/fix-bar-rate


📝 Commits (1)

📊 Changes

3 files changed (+126 additions, -82 deletions)

View changed files

📝 format/bytes.go (+2 -0)
📝 progress/bar.go (+122 -80)
📝 progress/spinner.go (+2 -2)

📄 Description

implement rate as a rolling average over the last n updates.

the current issue is rate is calculated as an average rate over the lifetime of the progress bar. this reflects the actual progress well if the progress is smooth and flat but that's rarely the case.

the rolling average is a better way to represent changing rates. if more progress is made in the window than before, the rate will go up. if less progress is made, the rate will go down


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/1195 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 11/19/2023 **Status:** ✅ Merged **Merged:** 11/28/2023 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/fix-bar-rate` --- ### 📝 Commits (1) - [`424d53a`](https://github.com/ollama/ollama/commit/424d53ac70d1960770f3bb3a7aa44afea9f2dbeb) progress: fix bar rate ### 📊 Changes **3 files changed** (+126 additions, -82 deletions) <details> <summary>View changed files</summary> 📝 `format/bytes.go` (+2 -0) 📝 `progress/bar.go` (+122 -80) 📝 `progress/spinner.go` (+2 -2) </details> ### 📄 Description implement rate as a rolling average over the last n updates. the current issue is rate is calculated as an average rate over the lifetime of the progress bar. this reflects the actual progress well if the progress is smooth and flat but that's rarely the case. the rolling average is a better way to represent changing rates. if more progress is made in the window than before, the rate will go up. if less progress is made, the rate will go down --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 04:20:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#72795