Skip to content

Make it easier to write good docs for model inputs #1329

Description

@zeke

Have you ever come across a Replicate model input like this one?

Screenshot 2023-10-04 at 6 00 24 PM


🤔 What is "classifier-free guidance"? Surely some experts know, but not me. I'll go look in the README. Hmm it's not in the README. I guess I just won't change that setting! Since I don't know what it will do, It's not worth it to change the value, wait for a prediction, then try find out what effect it had.

If the description looked more like this, I'd be more likely to experiment with changing its value:


Screenshot 2023-10-04 at 6 12 46 PM


Putting more detail in the input description itself means that users see it in lots of useful contexts, like when they're:

  • filling out the web form
  • using "Intellisense" in their $EDITOR
  • referring to a model's API docs

On the other hand, as a model author, the current Python DSL(?) for documenting an input makes writing a long description feel a bit awkward:

def predict(self,
    guidance_scale: float = Input(
        description="I don't want to make this too long because if I do the line will go on forever and push the other inputs out of view and this just feels unholy to write a single-line string this long I guess I could put it in a variable but that would be overkill maybe?", ge=1, le=50, default=7.5
    ),
)

I'm opening this issue to brainstorm on how we can make it easier for model authors to "do the right thing" (write good docs) when creating the interface to the model's (Cog) interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationpapercutSmall issues that build up

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions