Skip to content

Add progress property to Prediction #155

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

Merged
merged 3 commits into from
Sep 17, 2023
Merged

Add progress property to Prediction #155

merged 3 commits into from
Sep 17, 2023

Conversation

mattt
Copy link
Contributor

@mattt mattt commented Sep 17, 2023

Resolves #152

When a prediction is running, models log progress in a predictable format. By parsing these log lines, we can get a structured representation of the current number of items processed, the total number, and the percentage completed.

This PR defines a Prediction.Progress dataclass and a progress property on Prediction that returns an optional value of that type.

Signed-off-by: Mattt Zmuda <mattt@replicate.com>
@mattt mattt force-pushed the mattt/prediction-progress branch from 3fa37dc to e7358c4 Compare September 17, 2023 15:48
Signed-off-by: Mattt Zmuda <mattt@replicate.com>
Signed-off-by: Mattt Zmuda <mattt@replicate.com>
@mattt mattt merged commit a9fbfa6 into main Sep 17, 2023
@mattt mattt deleted the mattt/prediction-progress branch September 17, 2023 16:10
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.

How to get progress status of API calls?
1 participant