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

Prettify and improve download bars during model pulls #521

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

swarajpande5
Copy link
Contributor

@swarajpande5 swarajpande5 commented Dec 22, 2024

This PR prettifies and improves the download bars during model pulls.
Thanks to @ericcurtin for providing the code references from https://github.com/ericcurtin/lm-pull/blob/main/lm-pull.py.

Example run:

(venv) spande-mac:ramalama (prettify-bar) $ ./bin/ramalama pull ollama://tinyllama
  9% |████████                                                                                   |   55.64 MB/ 608.16 MB   3.66 MB/s    2m 30s

Summary by Sourcery

Enhancements:

  • Replace tqdm with a custom progress bar implementation for model downloads.

Copy link
Collaborator

@ericcurtin ericcurtin left a comment

Choose a reason for hiding this comment

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

Merging, it would be nice is we could put File and HttpClient in their own files in a follow on PR.

@ericcurtin
Copy link
Collaborator

We should also remove every reference to tqdm in a follow on PR.

One of the reasons for writing the progress bar from scratch is to eliminate tqdm as a dependency from the project.

@ericcurtin ericcurtin merged commit 56e8955 into containers:main Dec 22, 2024
10 of 11 checks passed
@swarajpande5
Copy link
Contributor Author

@ericcurtin Thanks for merging.
I'll go ahead and create 2 PRs, one for putting File and HttpClient in their own seperate files;
and other one for removing every reference of tqdm.

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.

2 participants