-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: invalid components: schema "Output": extra sibling fields: [titl…
- Loading branch information
Showing
4 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
test-integration/test_integration/fixtures/complex_output_project/cog.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build: | ||
python_version: "3.11" | ||
predict: "predict.py:Predictor" |
17 changes: 17 additions & 0 deletions
17
test-integration/test_integration/fixtures/complex_output_project/predict.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import io | ||
|
||
from cog import BasePredictor, Path | ||
from typing import Optional | ||
from pydantic import BaseModel | ||
|
||
|
||
class ModelOutput(BaseModel): | ||
success: bool | ||
error: Optional[str] | ||
segmentedImage: Optional[Path] | ||
|
||
|
||
class Predictor(BasePredictor): | ||
# setup code | ||
def predict(self, msg: str) -> ModelOutput: | ||
return ModelOutput(success=False, error=msg, segmentedImage=None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters