Open
Description
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.