Skip to content

Commit 47d23c9

Browse files
committed
add a todo comment
1 parent 37a558a commit 47d23c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bioimageio/spec/model/v0_5.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,6 +1236,14 @@ def validate_output_axes(
12361236
parent: Optional[LinkedModel] = None
12371237
"""The model from which this model is derived, e.g. by fine-tuning the weights."""
12381238

1239+
# todo: add parent self check once we have `id`
1240+
# @model_validator(mode="after")
1241+
# def validate_parent_is_not_self(self) -> Self:
1242+
# if self.parent is not None and self.parent == self.id:
1243+
# raise ValueError("The model may not reference itself as parent model")
1244+
1245+
# return self
1246+
12391247
run_mode: Annotated[
12401248
Optional[RunMode], warn(None, "Run mode '{value}' has limited support across consumer softwares.")
12411249
] = None

0 commit comments

Comments
 (0)