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

Unable to run show or scaffold for predictions I don't own #62

Open
zeke opened this issue Feb 2, 2024 · 1 comment
Open

Unable to run show or scaffold for predictions I don't own #62

zeke opened this issue Feb 2, 2024 · 1 comment

Comments

@zeke
Copy link
Member

zeke commented Feb 2, 2024

TLDR

replicate show and replicate scaffold works for predictions owned by my token, but not for any other predictions, even if they're shared.

I'm not sure if this is a regression, or if it has never worked for non-owners.

Long story

I tried running the scaffold example in the README

I can see that prediction on the web, even in an incognito window: https://replicate.com/p/jpgp263bdekvxileu2ppsy46v4

But when I tried to scaffold from it, I get an error:

$ replicate scaffold https://replicate.com/p/jpgp263bdekvxileu2ppsy46v4 --template=node
Error: failed to get prediction: failed to get prediction: The requested resource could not be found.

Sometimes zsh is a bit finicky about unquoted strings, so I tried quoting the URL:

replicate scaffold "https://replicate.com/p/jpgp263bdekvxileu2ppsy46v4" --template=node
Error: failed to get prediction: failed to get prediction: The requested resource could not be found.

Then I tried just the prediction id, but still no joy:

$ replicate scaffold jpgp263bdekvxileu2ppsy46v4 --template=node  
Error: failed to get prediction: failed to get prediction: The requested resource could not be found.

My own prediction works

So then I thought.. maybe I'm not authenticated?

But I can run the scaffold command for my own predictions, created with my zeke account on Replicate:

$ replicate scaffold 7khq4kzbhoogsnjgcujur7hhgi
Cloning starter repo and installing dependencies...
Cloning into '7khq4kzbhoogsnjgcujur7hhgi'...
...
Done!

A new shared prediction that I don't own doesn't work

Next I created a prediction from one of my orgs (replicate), then shared it: https://replicate.com/p/elqle2bbcval7o53g7w5wpub4u

But using the CLI with my personal token (not the org token), it fails:

$ replicate prediction show elqle2bbcval7o53g7w5wpub4u
Error: failed to get prediction: failed to get prediction: The requested resource could not be found.
$ replicate scaffold elqle2bbcval7o53g7w5wpub4u                            
Error: failed to get prediction: failed to get prediction: The requested resource could not be found.

Version

$ replicate --version
replicate version 0.7.0

cc @replicate/product @replicate/hackers

@zeke
Copy link
Member Author

zeke commented Feb 3, 2024

Turns out this is blocked by the API itself. It's not currently possible to fetched another user's shared prediction via API.

Internal issue to track this: https://linear.app/replicate/issue/PRO-48/get-shared-predictions-via-the-api

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

No branches or pull requests

1 participant