8000 Don't return a PredictionResponse from PredictionRunner.setup by nickstenning · Pull Request #1433 · replicate/cog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Don't return a PredictionResponse from PredictionRunner.setup #1433

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

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

nickstenning
Copy link
Contributor

Returning a PredictionResponse from setup was (I think) a bit of a hack to make the typechecker happy. Unfortunately it's pretty confusing, as PredictionResponse has a whole bunch of fields on it that mean nothing in the context of a setup result.

This commit reduces the confusion by introducing a dedicated SetupResult type and using that where appropriate.

Returning a PredictionResponse from setup was (I think) a bit of a hack
to make the typechecker happy. Unfortunately it's pretty confusing, as
PredictionResponse has a whole bunch of fields on it that mean nothing
in the context of a setup result.

This commit reduces the confusion by introducing a dedicated SetupResult
type and using that where appropriate.

Signed-off-by: Nick Stenning <nick@whiteink.com>
@yorickvP yorickvP merged commit f836066 into main Dec 14, 2023
@yorickvP yorickvP deleted the fix-setup-result-type branch December 14, 2023 15:52
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
0