Skip to content

Commit

Permalink
Fix openapi schema (#1947)
Browse files Browse the repository at this point in the history
Generating the OpenAPI schema was broken under the circumstances:

- train.py#train had an enum-type input
- cog was running with --x-mode=train

I've verified that this change fixes it.  The current code is obviously wrong in
any case.
  • Loading branch information
philandstuff authored Sep 12, 2024
1 parent ac53c32 commit 9d16cfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/cog/server/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def train(

@app.put(
"/trainings/{training_id}",
response_model=PredictionResponse,
response_model=TrainingResponse,
response_model_exclude_unset=True,
)
def train_idempotent(
Expand Down

0 comments on commit 9d16cfc

Please sign in to comment.