nasa / prog_models

The NASA Prognostic Model Package is a Python framework focused on defining and building models for prognostics (computation of remaining useful life) of engineering systems, and provides a set of prognostics models for select components developed within this framework, suitable for use in prognostics applications for these components.
123 stars 50 forks source link

Prog models features/check doctests #568

Closed mstraut closed 1 year ago

mstraut commented 1 year ago

Finished doctests, fixed tuple bug in next_state.py

github-actions[bot] commented 1 year ago

Thank you for opening this PR. Each PR into dev requires a code review. For the code review, look at the following:

github-actions[bot] commented 1 year ago
Benchmarking Results From: Test Time (s)
import main 0.15418529999999997
import thrown object 0.6012857
model initialization 0.17328140000000003
set noise 0.7943167999999998
simulate 0.5650968999999999
simulate with saving 1.6020051
simulate with saving, dt 2.0913494999999998
simulate with printing results, dt 2.6294739000000007
Plot results 17.4464593
Metrics 0.0451882000000019
Surrogate Model Generation 2.5518710999999996
surrogate sim 1.703945000000001
surrogate sim, dt 4.408063499999997
To: Test Time (s)
import main 0.16638660000000005
import thrown object 0.6283313000000001
model initialization 0.1904433000000001
set noise 0.8363347999999999
simulate 0.5739118000000003
simulate with saving 1.6667949000000002
simulate with saving, dt 2.0883240999999995
simulate with printing results, dt 2.5719258
Plot results 17.075954499999998
Metrics 0.0445715999999976
Surrogate Model Generation 2.444673599999998
surrogate sim 1.694036699999998
surrogate sim, dt 4.199688099999996
codecov-commenter commented 1 year ago

Codecov Report

Merging #568 (46a3385) into release/v1.5 (e17cb02) will decrease coverage by 0.86%. The diff coverage is 50.00%.

:exclamation: Current head 46a3385 differs from pull request most recent head 3a7389a. Consider uploading reports for the commit 3a7389a to get more accurate results

@@               Coverage Diff                @@
##           release/v1.5     #568      +/-   ##
================================================
- Coverage         85.41%   84.56%   -0.86%     
================================================
  Files                70       45      -25     
  Lines              8236     3504    -4732     
================================================
- Hits               7035     2963    -4072     
+ Misses             1201      541     -660     
Impacted Files Coverage Δ
prog_model_template.py 68.00% <ø> (ø)
src/prog_models/prognostics_model.py 85.63% <ø> (ø)
src/prog_models/utils/containers.py 87.00% <ø> (-2.00%) :arrow_down:
src/prog_models/visualize.py 61.57% <0.00%> (ø)
src/prog_models/utils/next_state.py 91.66% <100.00%> (ø)

... and 25 files with indirect coverage changes

github-actions[bot] commented 1 year ago
Benchmarking Results [Update] From: Test Time (s)
import main 0.11152600000000001
import thrown object 0.4967437000000001
model initialization 0.15583150000000012
set noise 0.6826726999999999
simulate 0.513782
simulate with saving 1.4497803999999999
simulate with saving, dt 1.8791856000000005
simulate with printing results, dt 2.3165915999999998
Plot results 14.427916800000002
Metrics 0.04285390000000078
Surrogate Model Generation 2.2050576
surrogate sim 1.3922239000000012
surrogate sim, dt 3.785143699999999

To:

Test Time (s)
import main 0.11086489999999993
import thrown object 0.4913377000000001
model initialization 0.1548780999999999
set noise 0.6829005000000001
simulate 0.48655130000000035
simulate with saving 1.3842075999999999
simulate with saving, dt 1.7728539999999997
simulate with printing results, dt 2.211141099999999
Plot results 14.243099200000001
Metrics 0.04172400000000209
Surrogate Model Generation 2.1552135999999997
surrogate sim 1.3407553000000014
surrogate sim, dt 3.632382800000002
github-actions[bot] commented 1 year ago
Benchmarking Results [Update] From: Test Time (s)
import main 0.12774940000000012
import thrown object 0.48853599999999986
model initialization 0.1589414
set noise 0.6642657000000001
simulate 0.4934941000000004
simulate with saving 1.4094921000000005
simulate with saving, dt 1.8057862999999994
simulate with printing results, dt 2.237393
Plot results 15.693203500000001
Metrics 0.03884559999999837
Surrogate Model Generation 2.2028026999999994
surrogate sim 1.4312489
surrogate sim, dt 3.7319077000000007

To:

Test Time (s)
import main 0.12993690000000013
import thrown object 0.5141332999999997
model initialization 0.15777419999999998
set noise 0.6625691000000002
simulate 0.48797310000000005
simulate with saving 1.4217295999999995
simulate with saving, dt 1.7956409000000004
simulate with printing results, dt 2.2212213
Plot results 15.4792039
Metrics 0.0371756000000012
Surrogate Model Generation 2.1953332000000003
surrogate sim 1.4364825000000003
surrogate sim, dt 3.7590487999999986
github-actions[bot] commented 1 year ago
Benchmarking Results [Update] From: Test Time (s)
import main 0.1699767000000001
import thrown object 0.6199669999999999
model initialization 0.18996080000000015
set noise 0.8320143999999998
simulate 0.5766589
simulate with saving 1.6635322999999995
simulate with saving, dt 2.1212731
simulate with printing results, dt 2.6782322999999995
Plot results 17.5057824
Metrics 0.04414420000000163
Surrogate Model Generation 2.5693365999999997
surrogate sim 1.7121801999999953
surrogate sim, dt 4.395801999999996

To:

Test Time (s)
import main 0.1806067
import thrown object 0.6713217999999999
model initialization 0.2032733000000002
set noise 0.8662608999999999
simulate 0.6288871000000005
simulate with saving 1.7827101999999995
simulate with saving, dt 2.2750141999999993
simulate with printing results, dt 2.7225901000000015
Plot results 17.4496027
Metrics 0.04481630000000081
Surrogate Model Generation 2.5211181999999965
surrogate sim 1.6833578999999972
surrogate sim, dt 4.365580399999999
github-actions[bot] commented 1 year ago
Benchmarking Results [Update] From: Test Time (s)
import main 0.15695289999999984
import thrown object 0.6229198
model initialization 0.23432560000000002
set noise 0.8303981999999999
simulate 0.7114458000000004
simulate with saving 2.0728600999999998
simulate with saving, dt 2.6021326999999994
simulate with printing results, dt 3.374912
Plot results 21.2399549
Metrics 0.04901230000000112
Surrogate Model Generation 3.0837760999999944
surrogate sim 2.216170499999997
surrogate sim, dt 5.167447200000005

To:

Test Time (s)
import main 0.15572740000000018
import thrown object 0.6005320000000001
model initialization 0.22547950000000005
set noise 0.8397631000000003
simulate 0.7173718
simulate with saving 2.0194303
simulate with saving, dt 2.4785503
simulate with printing results, dt 3.213751499999999
Plot results 20.976917800000003
Metrics 0.046534100000002354
Surrogate Model Generation 3.1843667999999994
surrogate sim 2.277430299999999
surrogate sim, dt 5.277328300000001
github-actions[bot] commented 1 year ago
Benchmarking Results [Update] From: Test Time (s)
import main 0.1873598999999999
import thrown object 0.6988259000000001
model initialization 0.24685929999999967
set noise 0.9461403000000002
simulate 0.8321219999999996
simulate with saving 2.3607869
simulate with saving, dt 2.9368945
simulate with printing results, dt 3.5115417000000004
Plot results 23.358461500000004
Metrics 0.047076599999996915
Surrogate Model Generation 3.3161897999999965
surrogate sim 2.364935199999998
surrogate sim, dt 5.632863999999998

To:

Test Time (s)
import main 0.1642796999999998
import thrown object 0.6559940000000002
model initialization 0.24524750000000006
set noise 0.8606883000000001
simulate 0.7241624999999998
simulate with saving 2.1243298
simulate with saving, dt 2.6545245999999993
simulate with printing results, dt 3.2961550000000006
Plot results 23.1877486
Metrics 0.04770810000000125
Surrogate Model Generation 3.3265467000000015
surrogate sim 2.312267900000002
surrogate sim, dt 5.542528400000002
github-actions[bot] commented 1 year ago
Benchmarking Results [Update] From: Test Time (s)
import main 0.13011719999999993
import thrown object 0.5158204
model initialization 0.15797970000000006
set noise 0.6541819999999998
simulate 0.4965090999999999
simulate with saving 1.4086796000000001
simulate with saving, dt 1.7939457
simulate with printing results, dt 2.2341486
Plot results 14.686865899999999
Metrics 0.03708599999999862
Surrogate Model Generation 2.1762796999999985
surrogate sim 1.4356407000000004
surrogate sim, dt 3.7222668

To:

Test Time (s)
import main 0.1333257000000001
import thrown object 0.49137319999999995
model initialization 0.15859320000000032
set noise 0.6403575999999997
simulate 0.48784950000000027
simulate with saving 1.4127260999999995
simulate with saving, dt 1.7948692999999993
simulate with printing results, dt 2.2274598999999995
Plot results 14.748991199999999
Metrics 0.03617110000000068
Surrogate Model Generation 2.158930099999999
surrogate sim 1.4312719999999999
surrogate sim, dt 3.716359999999998
github-actions[bot] commented 1 year ago
Benchmarking Results [Update] From: Test Time (s)
import main 0.11766129999999997
import thrown object 0.5059622000000001
model initialization 0.15522259999999988
set noise 0.6818872999999999
simulate 0.49932779999999966
simulate with saving 1.4005567
simulate with saving, dt 1.8152909
simulate with printing results, dt 2.2766536000000004
Plot results 14.125131399999999
Metrics 0.041878900000000385
Surrogate Model Generation 2.170964999999999
surrogate sim 1.3677852000000001
surrogate sim, dt 3.7099633999999995

To:

Test Time (s)
import main 0.1176940999999998
import thrown object 0.5028870999999999
model initialization 0.1559797999999999
set noise 0.6938143000000001
simulate 0.49176189999999975
simulate with saving 1.3965166000000004
simulate with saving, dt 1.7948547000000001
simulate with printing results, dt 2.2516951
Plot results 14.1453998
Metrics 0.042248999999998205
Surrogate Model Generation 2.1546601999999986
surrogate sim 1.3558155999999997
surrogate sim, dt 3.6793504000000006