Skip to content

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

Description

@zeke

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions