Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[async] Fix cog predict running file outputs #2043

Open
wants to merge 1 commit into
base: async
Choose a base branch
from

Conversation

aron
Copy link
Contributor

@aron aron commented Nov 4, 2024

This commit backports some of the changes to pkg/cli/predict.go from main as of 3e0dc79 to fix a nil pointer exception that occurs when trying to run cog predict on a model that outputs a File type.

The panic occurs in predictIndividualInputs() trying to decode the data URL returned by the model. Giving the error:

panic: runtime error: invalid memory address or nil pointer dereference

@aron aron changed the base branch from main to async November 4, 2024 13:43
This commit backports some of the changes to pkg/cli/predict.go from
main as of 3e0dc79 to fix a nil pointer exception that occurs when
trying to run `cog predict` on a model that outputs a `File` type.

The panic occurs in predictIndividualInputs() trying to decode the
data URL returned by the model. Giving the error:

    panic: runtime error: invalid memory address or nil pointer dereference
@aron aron force-pushed the async-fixup-predict branch from 0bfbc41 to 1e2465b Compare November 4, 2024 13:44
@aron aron changed the title async fixup predict [async] Fix cog predict running file outputs Nov 4, 2024
@aron aron marked this pull request as ready for review November 19, 2024 21:36
Copy link
Contributor

@8W9aG 8W9aG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only thing I might suggest here is to make an integration test on cog predict that surfaces the file issue you are running into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants