Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/petab/parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function save_parameters_table(
net_ids = @. string(_net_ids) * "_ps"
df_nn = DataFrame(
parameterId = net_ids, parameterScale = :lin, lowerBound = "-inf",
upperBound = "inf", nominalValue = "array", estimate = Int(estimate_net_parameters)
upperBound = "inf", nominalValue = "array", estimate = string(estimate_net_parameters)
)

df_save = vcat(df_mech, df_nn, cols = :union)
Expand Down
6 changes: 4 additions & 2 deletions src/petab/yaml.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function save_petab_yaml(
condition_table_id::Symbol
)
yaml_dict = Dict(
:format_version => 2,
:format_version => "2.0.0",
:measurement_files => ["measurements.tsv"],
:experiment_files => ["experiments.tsv"],
:observable_files => ["observables.tsv"],
Expand All @@ -24,7 +24,9 @@ function save_petab_yaml(
ext = Dict(
:hybridization_files => ["hybridization.tsv"],
:neural_nets => Dict(),
:array_files => String[]
:array_files => String[],
:version => "0.1.0",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the petab_sciml format specification have a version yet?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, 0.1.0 will be the first version, but lets wait with that feature until we actually release 0.1

:required => true
)
for (net_id, net_info) in nets_info
ext[:neural_nets][net_id] = Dict(
Expand Down
Binary file modified test_cases/initialization/001/net1_ref.hdf5
Binary file not shown.
10 changes: 5 additions & 5 deletions test_cases/initialization/001/petab/parameters.tsv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameterId parameterScale lowerBound upperBound nominalValue estimate
alpha lin 0.0 15.0 1.3 1
delta lin 0.0 15.0 1.8 1
beta lin 0.0 15.0 0.9 1
net1_layer1 lin -inf inf 0.0 1
net1_ps lin -inf inf array 1
alpha lin 0.0 15.0 1.3 true
delta lin 0.0 15.0 1.8 true
beta lin 0.0 15.0 0.9 true
net1_layer1 lin -inf inf 0.0 true
net1_ps lin -inf inf array true
4 changes: 3 additions & 1 deletion test_cases/initialization/001/petab/problem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ measurement_files:
- "measurements.tsv"
observable_files:
- "observables.tsv"
format_version: 2
format_version: "2.0.0"
experiment_files:
- "experiments.tsv"
parameter_files:
Expand All @@ -17,8 +17,10 @@ extensions:
sciml:
array_files:
- "net1_ps.hdf5"
version: "0.1.0"
hybridization_files:
- "hybridization.tsv"
required: true
neural_nets:
net1:
location: "net1.yaml"
Expand Down
Binary file modified test_cases/initialization/002/net1_ref.hdf5
Binary file not shown.
10 changes: 5 additions & 5 deletions test_cases/initialization/002/petab/parameters.tsv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameterId parameterScale lowerBound upperBound nominalValue estimate
alpha lin 0.0 15.0 1.3 1
delta lin 0.0 15.0 1.8 1
beta lin 0.0 15.0 0.9 1
net1_layer1 lin -inf inf 0.0 1
net1_ps lin -inf inf array 1
alpha lin 0.0 15.0 1.3 true
delta lin 0.0 15.0 1.8 true
beta lin 0.0 15.0 0.9 true
net1_layer1 lin -inf inf 0.0 true
net1_ps lin -inf inf array true
4 changes: 3 additions & 1 deletion test_cases/initialization/002/petab/problem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ measurement_files:
- "measurements.tsv"
observable_files:
- "observables.tsv"
format_version: 2
format_version: "2.0.0"
experiment_files:
- "experiments.tsv"
parameter_files:
Expand All @@ -17,8 +17,10 @@ extensions:
sciml:
array_files:
- "net1_ps.hdf5"
version: "0.1.0"
hybridization_files:
- "hybridization.tsv"
required: true
neural_nets:
net1:
location: "net1.yaml"
Expand Down
Binary file modified test_cases/initialization/003/net1_ref.hdf5
Binary file not shown.
10 changes: 5 additions & 5 deletions test_cases/initialization/003/petab/parameters.tsv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameterId parameterScale lowerBound upperBound nominalValue estimate
alpha lin 0.0 15.0 1.3 1
delta lin 0.0 15.0 1.8 1
beta lin 0.0 15.0 0.9 1
net1_layer1 lin -inf inf 0.0 1
net1_ps lin -inf inf array 1
alpha lin 0.0 15.0 1.3 true
delta lin 0.0 15.0 1.8 true
beta lin 0.0 15.0 0.9 true
net1_layer1 lin -inf inf 0.0 true
net1_ps lin -inf inf array true
4 changes: 3 additions & 1 deletion test_cases/initialization/003/petab/problem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ measurement_files:
- "measurements.tsv"
observable_files:
- "observables.tsv"
format_version: 2
format_version: "2.0.0"
experiment_files:
- "experiments.tsv"
parameter_files:
Expand All @@ -17,8 +17,10 @@ extensions:
sciml:
array_files:
- "net1_ps.hdf5"
version: "0.1.0"
hybridization_files:
- "hybridization.tsv"
required: true
neural_nets:
net1:
location: "net1.yaml"
Expand Down
2 changes: 1 addition & 1 deletion test_cases/sciml_problem_import/001/grad_mech.tsv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameterId value
alpha 2538.780077320352
alpha 2538.7800773211884
delta 573.6670521169216
beta -2188.7753333246887
Binary file modified test_cases/sciml_problem_import/001/grad_net1.hdf5
Binary file not shown.
8 changes: 4 additions & 4 deletions test_cases/sciml_problem_import/001/petab/parameters.tsv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameterId parameterScale lowerBound upperBound nominalValue estimate
alpha lin 0.0 15.0 1.3 1
delta lin 0.0 15.0 1.8 1
beta lin 0.0 15.0 0.9 1
net1_ps lin -inf inf array 1
alpha lin 0.0 15.0 1.3 true
delta lin 0.0 15.0 1.8 true
beta lin 0.0 15.0 0.9 true
net1_ps lin -inf inf array true
4 changes: 3 additions & 1 deletion test_cases/sciml_problem_import/001/petab/problem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ measurement_files:
- "measurements.tsv"
observable_files:
- "observables.tsv"
format_version: 2
format_version: "2.0.0"
experiment_files:
- "experiments.tsv"
parameter_files:
Expand All @@ -17,8 +17,10 @@ extensions:
sciml:
array_files:
- "net1_ps.hdf5"
version: "0.1.0"
hybridization_files:
- "hybridization.tsv"
required: true
neural_nets:
net1:
location: "net1.yaml"
Expand Down
Binary file modified test_cases/sciml_problem_import/002/grad_net1.hdf5
Binary file not shown.
12 changes: 6 additions & 6 deletions test_cases/sciml_problem_import/002/petab/parameters.tsv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameterId parameterScale lowerBound upperBound nominalValue estimate
alpha lin 0.0 15.0 1.3 1
delta lin 0.0 15.0 1.8 1
beta lin 0.0 15.0 0.9 1
net1_input_pre1 lin -inf inf 1.0 0
net1_input_pre2 lin -inf inf 1.0 0
net1_ps lin -inf inf array 1
alpha lin 0.0 15.0 1.3 true
delta lin 0.0 15.0 1.8 true
beta lin 0.0 15.0 0.9 true
net1_input_pre1 lin -inf inf 1.0 false
net1_input_pre2 lin -inf inf 1.0 false
net1_ps lin -inf inf array true
4 changes: 3 additions & 1 deletion test_cases/sciml_problem_import/002/petab/problem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ measurement_files:
- "measurements.tsv"
observable_files:
- "observables.tsv"
format_version: 2
format_version: "2.0.0"
experiment_files:
- "experiments.tsv"
parameter_files:
Expand All @@ -17,8 +17,10 @@ extensions:
sciml:
array_files:
- "net1_ps.hdf5"
version: "0.1.0"
hybridization_files:
- "hybridization.tsv"
required: true
neural_nets:
net1:
location: "net1.yaml"
Expand Down
4 changes: 2 additions & 2 deletions test_cases/sciml_problem_import/003/grad_mech.tsv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameterId value
alpha 1484.100432040707
delta 304.6815498857698
beta -984.3538661871829
delta 304.6815497521852
beta -984.3538661871895
Binary file modified test_cases/sciml_problem_import/003/grad_net1.hdf5
Binary file not shown.
12 changes: 6 additions & 6 deletions test_cases/sciml_problem_import/003/petab/parameters.tsv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameterId parameterScale lowerBound upperBound nominalValue estimate
alpha lin 0.0 15.0 1.3 1
delta lin 0.0 15.0 1.8 1
beta lin 0.0 15.0 0.9 1
net1_input_pre1 lin -inf inf 1.0 0
net1_input_pre2 lin -inf inf 1.0 0
net1_ps lin -inf inf array 1
alpha lin 0.0 15.0 1.3 true
delta lin 0.0 15.0 1.8 true
beta lin 0.0 15.0 0.9 true
net1_input_pre1 lin -inf inf 1.0 false
net1_input_pre2 lin -inf inf 1.0 false
net1_ps lin -inf inf array true
4 changes: 3 additions & 1 deletion test_cases/sciml_problem_import/003/petab/problem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ measurement_files:
- "measurements.tsv"
observable_files:
- "observables.tsv"
format_version: 2
format_version: "2.0.0"
experiment_files:
- "experiments.tsv"
parameter_files:
Expand All @@ -19,8 +19,10 @@ extensions:
sciml:
array_files:
- "net1_ps.hdf5"
version: "0.1.0"
hybridization_files:
- "hybridization.tsv"
required: true
neural_nets:
net1:
location: "net1.yaml"
Expand Down
2 changes: 1 addition & 1 deletion test_cases/sciml_problem_import/004/grad_mech.tsv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameterId value
alpha 1348.3832160092732
delta 398.79444240316656
delta 398.79444240445616
beta -839.2207939522068
gamma 431.5736554673321
Binary file modified test_cases/sciml_problem_import/004/grad_net1.hdf5
Binary file not shown.
10 changes: 5 additions & 5 deletions test_cases/sciml_problem_import/004/petab/parameters.tsv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameterId parameterScale lowerBound upperBound nominalValue estimate
alpha lin 0.0 15.0 1.3 1
delta lin 0.0 15.0 1.8 1
beta lin 0.0 15.0 0.9 1
gamma lin 0.0 15.0 0.8 1
net1_ps lin -inf inf array 1
alpha lin 0.0 15.0 1.3 true
delta lin 0.0 15.0 1.8 true
beta lin 0.0 15.0 0.9 true
gamma lin 0.0 15.0 0.8 true
net1_ps lin -inf inf array true
4 changes: 3 additions & 1 deletion test_cases/sciml_problem_import/004/petab/problem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ measurement_files:
- "measurements.tsv"
observable_files:
- "observables.tsv"
format_version: 2
format_version: "2.0.0"
experiment_files:
- "experiments.tsv"
parameter_files:
Expand All @@ -17,8 +17,10 @@ extensions:
sciml:
array_files:
- "net1_ps.hdf5"
version: "0.1.0"
hybridization_files:
- "hybridization.tsv"
required: true
neural_nets:
net1:
location: "net1.yaml"
Expand Down
4 changes: 2 additions & 2 deletions test_cases/sciml_problem_import/005/grad_mech.tsv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameterId value
alpha 1352.7284608871203
delta 390.6311104263574
alpha 1352.7284608871169
delta 390.6311104716752
beta -827.8898414562375
Binary file modified test_cases/sciml_problem_import/005/grad_net1.hdf5
Binary file not shown.
10 changes: 5 additions & 5 deletions test_cases/sciml_problem_import/005/petab/parameters.tsv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameterId parameterScale lowerBound upperBound nominalValue estimate
alpha lin 0.0 15.0 1.3 1
delta lin 0.0 15.0 1.8 1
beta lin 0.0 15.0 0.9 1
net1_input_pre1 lin -inf inf 1.0 0
net1_ps lin -inf inf array 1
alpha lin 0.0 15.0 1.3 true
delta lin 0.0 15.0 1.8 true
beta lin 0.0 15.0 0.9 true
net1_input_pre1 lin -inf inf 1.0 false
net1_ps lin -inf inf array true
4 changes: 3 additions & 1 deletion test_cases/sciml_problem_import/005/petab/problem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ measurement_files:
- "measurements.tsv"
observable_files:
- "observables.tsv"
format_version: 2
format_version: "2.0.0"
experiment_files:
- "experiments.tsv"
parameter_files:
Expand All @@ -17,8 +17,10 @@ extensions:
sciml:
array_files:
- "net1_ps.hdf5"
version: "0.1.0"
hybridization_files:
- "hybridization.tsv"
required: true
neural_nets:
net1:
location: "net1.yaml"
Expand Down
Binary file modified test_cases/sciml_problem_import/006/grad_net1.hdf5
Binary file not shown.
12 changes: 6 additions & 6 deletions test_cases/sciml_problem_import/006/petab/parameters.tsv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameterId parameterScale lowerBound upperBound nominalValue estimate
alpha lin 0.0 15.0 1.3 1
delta lin 0.0 15.0 1.8 1
beta lin 0.0 15.0 0.9 1
net1_input_pre1 lin -inf inf 1.0 0
net1_input_pre2_est lin -inf inf 1.0 1
net1_ps lin -inf inf array 1
alpha lin 0.0 15.0 1.3 true
delta lin 0.0 15.0 1.8 true
beta lin 0.0 15.0 0.9 true
net1_input_pre1 lin -inf inf 1.0 false
net1_input_pre2_est lin -inf inf 1.0 true
net1_ps lin -inf inf array true
4 changes: 3 additions & 1 deletion test_cases/sciml_problem_import/006/petab/problem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ measurement_files:
- "measurements.tsv"
observable_files:
- "observables.tsv"
format_version: 2
format_version: "2.0.0"
experiment_files:
- "experiments.tsv"
parameter_files:
Expand All @@ -17,8 +17,10 @@ extensions:
sciml:
array_files:
- "net1_ps.hdf5"
version: "0.1.0"
hybridization_files:
- "hybridization.tsv"
required: true
neural_nets:
net1:
location: "net1.yaml"
Expand Down
2 changes: 1 addition & 1 deletion test_cases/sciml_problem_import/007/grad_mech.tsv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameterId value
alpha 1328.8285975146716
delta 390.63111035285544
beta -827.8898414812052
beta -827.8898414813021
gamma 432.5840252762772
Binary file modified test_cases/sciml_problem_import/007/grad_net1.hdf5
Binary file not shown.
14 changes: 7 additions & 7 deletions test_cases/sciml_problem_import/007/petab/parameters.tsv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
parameterId parameterScale lowerBound upperBound nominalValue estimate
alpha lin 0.0 15.0 1.3 1
delta lin 0.0 15.0 1.8 1
beta lin 0.0 15.0 0.9 1
gamma lin 0.0 15.0 0.8 1
net1_input_pre1 lin -inf inf 1.0 0
net1_input_pre2 lin -inf inf 1.0 0
net1_ps lin -inf inf array 1
alpha lin 0.0 15.0 1.3 true
delta lin 0.0 15.0 1.8 true
beta lin 0.0 15.0 0.9 true
gamma lin 0.0 15.0 0.8 true
net1_input_pre1 lin -inf inf 1.0 false
net1_input_pre2 lin -inf inf 1.0 false
net1_ps lin -inf inf array true
4 changes: 3 additions & 1 deletion test_cases/sciml_problem_import/007/petab/problem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ measurement_files:
- "measurements.tsv"
observable_files:
- "observables.tsv"
format_version: 2
format_version: "2.0.0"
experiment_files:
- "experiments.tsv"
parameter_files:
Expand All @@ -17,8 +17,10 @@ extensions:
sciml:
array_files:
- "net1_ps.hdf5"
version: "0.1.0"
hybridization_files:
- "hybridization.tsv"
required: true
neural_nets:
net1:
location: "net1.yaml"
Expand Down
Loading
Loading