Implement `replicate.run()` method for Python client
Closed this issue · 3 comments
zeke commented
replicate.run is a high-level abstraction for running models and getting their output.
We want to support replicate.run in the new Stainless client and maintain feature parity with the legacy client, to minimize the migration cost for users upgrading to the new client.
Reference
Notes
- Use the
predictions.createHTTP API to run "versioned" models. - Use the
models.predictions.createHTTP API to run official models - Support
waitoption - Port tests from old client
- Document the method
zeke commented
@dgellow @dtmeadows where are we with this one?
dgellow commented
- tests have been ported
- docs haven't been ported yet
Use the predictions.create HTTP API to run "versioned" models
Use the models.predictions.create HTTP API to run official models
I believe that's the case, as seen here: https://github.com/replicate/replicate-python-stainless/blob/bda7c30d833b4b7b30fb4716687ffcbbd95e1cd5/src/replicate/lib/_predictions.py#L131-L141
dgellow commented
I believe we are now all done here!