Skip to content

Replicate predictions API doesn't return the model name #123

Description

@simonw

Spotted this while working on:

This API endpoint here: https://replicate.com/docs/reference/http#predictions.get

{
  "id": "rrr4z55ocneqzikepnug6xezpe",
  "version": "be04660a5b93ef2aff61e3668dedb4cbeb14941e62a3fd5998364a32d613e35e",
  "urls": {
    "get": "https://api.replicate.com/v1/predictions/rrr4z55ocneqzikepnug6xezpe",
    "cancel": "https://api.replicate.com/v1/predictions/rrr4z55ocneqzikepnug6xezpe/cancel"
  },
  "created_at": "2022-09-13T22:54:18.578761Z",
  "started_at": "2022-09-13T22:54:19.438525Z",
  "completed_at": "2022-09-13T22:54:23.236610Z",
  "source": "api",
  "status": "succeeded",
  "input": {
    "prompt": "oak tree with boletus growing on its branches"
  },
  "output": [
    "https://replicate.com/api/models/stability-ai/stable-diffusion/files/9c3b6fe4-2d37-4571-a17a-83951b1cb120/out-0.png"
  ],
  "error": null,
  "logs": "Using seed: 36941...",
  "metrics": {
    "predict_time": 4.484541
  }
}

Doesn't include a field telling you the owner and name of the model.

(Reporting it here because I couldn't find a relevant repo for reporting API issues.)

Activity

  1. simonw commented on Jul 20, 2023

    @simonw
    ContributorAuthor

    I shipped a tool for recording predictions to a SQLite database here:

    https://github.com/simonw/llm-replicate/blob/0.3/README.md#fetching-all-replicate-predictions

    That tool will automatically record any future additions to the JSON, so if you add a model_owner and model_name field my tool can start recording those as well.

  2. changed the title [-]Replicate permissions API doesn't return the model name[/-] [+]Replicate predictions API doesn't return the model name[/+] on Nov 10, 2023
  3. mattt commented on Nov 16, 2023

    @mattt

    Hi @simonw. I'm happy to report that Prediction objects now provide this information in the model field. See #199 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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