-
Notifications
You must be signed in to change notification settings - Fork 21
Add progress bar for Fine-tuning jobs #406
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
Conversation
| if use_rich: | ||
| return progress | ||
|
|
||
| return re.sub(r"\[/?[^\]]+\]", "", progress) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to produce desired output format directly to avoid regexs?
| ) | ||
| percentage = ratio_filled * 100 | ||
| filled = math.ceil(ratio_filled * _PROGRESS_BAR_WIDTH) | ||
| bar = "█" * filled + "░" * (_PROGRESS_BAR_WIDTH - filled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might there be off-the-shelf libs to use for this?
|
|
||
| elapsed_time = (current_time - update_at).total_seconds() | ||
| ratio_filled = min( | ||
| elapsed_time / finetune_job.progress.seconds_remaining, 1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we get this progress from API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline, we don't
| response.events = None | ||
|
|
||
| click.echo(json.dumps(response.model_dump(exclude_none=True), indent=4)) | ||
| rprint(JSON.from_data(response.model_dump(exclude_none=True))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we switch to rprint in spirit of depreciation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can, yes.
Issue # MOSH-746
Describe your changes
This PR adds progress bar for the FT jobs.