-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create standard/schema for a
Model
(#130)
* refactor `Model` with mkstd * remove constraint column (constraints aren't implemented yet) * update test cases 1-8 expected models * refactor to remove `PetabMixin` * predecessor_model now always set to virtual or real model; update candidate_space.py * model subspace: require explicit parameter definitions; implement `can_fix_all` * fix 0009 expected yaml * add schema; add to RTD --------- Co-authored-by: Daniel Weindl <[email protected]>
- Loading branch information
Showing
34 changed files
with
1,179 additions
and
1,323 deletions.
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
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
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 @@ | ||
from petab_select.model import ModelStandard | ||
|
||
ModelStandard.save_schema("model.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,67 @@ | ||
$defs: | ||
ModelHash: | ||
type: string | ||
description: "A model.\n\nSee :class:`ModelBase` for the standardized attributes.\ | ||
\ Additional\nattributes are available in ``Model`` to improve usability.\n\nAttributes:\n\ | ||
\ _model_subspace_petab_problem:\n The PEtab problem of the model subspace\ | ||
\ of this model.\n If not provided, this is reconstructed from\n :attr:`model_subspace_petab_yaml`." | ||
properties: | ||
model_subspace_id: | ||
title: Model Subspace Id | ||
type: string | ||
model_subspace_indices: | ||
items: | ||
type: integer | ||
title: Model Subspace Indices | ||
type: array | ||
criteria: | ||
additionalProperties: | ||
type: number | ||
title: Criteria | ||
type: object | ||
model_hash: | ||
$ref: '#/$defs/ModelHash' | ||
default: null | ||
model_subspace_petab_yaml: | ||
anyOf: | ||
- format: path | ||
type: string | ||
- type: 'null' | ||
title: Model Subspace Petab Yaml | ||
estimated_parameters: | ||
anyOf: | ||
- additionalProperties: | ||
type: number | ||
type: object | ||
- type: 'null' | ||
default: null | ||
title: Estimated Parameters | ||
iteration: | ||
anyOf: | ||
- type: integer | ||
- type: 'null' | ||
default: null | ||
title: Iteration | ||
model_id: | ||
default: null | ||
title: Model Id | ||
type: string | ||
parameters: | ||
additionalProperties: | ||
anyOf: | ||
- type: number | ||
- type: integer | ||
- const: estimate | ||
type: string | ||
title: Parameters | ||
type: object | ||
predecessor_model_hash: | ||
$ref: '#/$defs/ModelHash' | ||
default: null | ||
required: | ||
- model_subspace_id | ||
- model_subspace_indices | ||
- model_subspace_petab_yaml | ||
- parameters | ||
title: Model | ||
type: object |
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
Oops, something went wrong.