Skip to content

Document model debugging workflow #296

Open
@andreasjansson

Description

@andreasjansson

The workflow for debugging Cog models isn't properly documented yet. You could just run cog predict [...] repeatedly, but that doesn't work if there are bugs due to state being carried over between predict() invocations.

The following is a workaround:

$ cog run python
>>> from predict import Predictor
>>> predictor = Predictor()
>>> predictor.setup()
>>> predictor.predict(arg1="value1", ...) # or if it's a progressively yielding model: next(predictor.predict())

Ideally the workflow should auto-reload, but that requires an ipython shell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions