Skip to content

Commit fc9e750

Browse files
committed
fix
1 parent f5bb03c commit fc9e750

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

petab/v2/core.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
__all__ = [
6262
"Problem",
6363
"ProblemConfig",
64+
"SciMLConfig",
6465
"Observable",
6566
"ObservableTable",
6667
"NoiseDistribution",
@@ -1114,7 +1115,7 @@ class Hybridization(BaseModel):
11141115
#: The target ID.
11151116
target_id: str = Field(alias=C.TARGET_ID)
11161117
#: The target value.
1117-
target_val: sp.Basic = Field(alias=C.TARGET_VALUE)
1118+
target_value: sp.Basic = Field(alias=C.TARGET_VALUE)
11181119

11191120
#: :meta private:
11201121
model_config = ConfigDict(
@@ -1124,7 +1125,7 @@ class Hybridization(BaseModel):
11241125
validate_assignment=True,
11251126
)
11261127

1127-
@field_validator("target_val", mode="before")
1128+
@field_validator("target_value", mode="before")
11281129
@classmethod
11291130
def _sympify(cls, v):
11301131
if v is None or isinstance(v, sp.Basic):
@@ -1214,7 +1215,7 @@ def __init__(
12141215

12151216
self.config = config
12161217
self.models: list[Model] = models or []
1217-
if config.extensions and config.extensions[C.SCIML]:
1218+
if config and config.extensions and config.extensions[C.SCIML]:
12181219
self.validation_tasks: list[ValidationTask] = (
12191220
sciml_validation_tasks.copy()
12201221
)
@@ -2787,7 +2788,7 @@ def to_yaml(self, filename: str | Path):
27872788
if ext_id == C.SCIML:
27882789
# convert Paths to strings
27892790
for key in ("array_files", "hybridization_files"):
2790-
d_ext[key] = list(map(str, data[key]))
2791+
d_ext[key] = list(map(str, d_ext[key]))
27912792
for nn in d_ext["neural_nets"]:
27922793
d_ext["neural_nets"][nn][C.MODEL_LOCATION] = str(
27932794
d_ext["neural_nets"][nn][C.MODEL_LOCATION]

0 commit comments

Comments
 (0)