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

lazy import #546

Closed teubert closed 1 year ago

teubert commented 1 year ago

Update TF to be imported lazily (only if using LSTM from_data). This will not be used by most users, so this speeds up importing prog_models

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.15796410000000005
import thrown object 0.5991237999999999
model initialization 0.1421958000000001
set noise 0.7911999000000001
simulate 0.345815
simulate with saving 1.0816858000000003
simulate with saving, dt 1.1848763999999994
simulate with printing results, dt 1.4432516999999994
Plot results 17.4203707
Metrics 0.04064570000000245
Surrogate Model Generation 3.896658600000002
surrogate sim 1.2674269000000002
surrogate sim, dt 3.4121167999999997
To: Test Time (s)
import main 0.17359619999999998
import thrown object 0.6096934
model initialization 0.1410035999999999
set noise 0.7864733000000004
simulate 0.3473468000000004
simulate with saving 1.0772137999999996
simulate with saving, dt 1.1834284999999998
simulate with printing results, dt 1.4315686999999997
Plot results 17.5247307
Metrics 0.04253710000000055
Surrogate Model Generation 1.8582608
surrogate sim 1.244897299999998
surrogate sim, dt 3.4097162999999995
codecov-commenter commented 1 year ago

Codecov Report

Merging #546 (c3deb0e) into dev (2c77258) will decrease coverage by 2.80%. The diff coverage is n/a.

@@            Coverage Diff             @@
##              dev     #546      +/-   ##
==========================================
- Coverage   82.93%   80.13%   -2.80%     
==========================================
  Files          53       30      -23     
  Lines        6705     2447    -4258     
==========================================
- Hits         5561     1961    -3600     
+ Misses       1144      486     -658     

see 23 files with indirect coverage changes