- Notifications
You must be signed in to change notification settings - Fork250
PermalinkChoose a base ref {{ refName }}default Choose a head ref {{ refName }}default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also orlearn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also.Learn more about diff comparisons here.
base repository:replicate/replicate-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
Uh oh!
There was an error while loading.Please reload this page.
base:1.0.2
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}defaultLoading
...
head repository:replicate/replicate-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
Uh oh!
There was an error while loading.Please reload this page.
compare:1.0.3
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}defaultLoading
- 2commits
- 3files changed
- 1contributor
Commits on Oct 28, 2024
Fix iterator support for replicate.run() (#383)
Prior to 1.0.0 `replicate.run()` would return an iterator for cog modelsthat output a type of `Iterator[Any]`. This would poll the`predictions.get` endpoint for the in progress prediction and yield anynew output.When implementing the new file interface we introduced two bugs:1. The iterator didn't convert URLs returned by the model into`FileOutput` types making it inconsistent with the non-iteratorinterface. This is controlled by the `use_file_outputs` argument.2. The iterator was returned without checking if we are using the newblocking API introduced by default and controlled by the `wait`argument.This commit fixes these two issues, consistently applying the`transform_output` function to the output of the iterator as well asreturning the polling iterator (`prediciton.output_iterator`) if theblocking API has not successfully returned a completed prediction.The tests have been updated to exercise both of these code paths.
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:git diff 1.0.2...1.0.3
Uh oh!
There was an error while loading.Please reload this page.