Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Closes #146] Simulation/Prediction Ending Strategy #149

Conversation

teubert
Copy link
Contributor

@teubert teubert commented Jul 15, 2024

Add a method of specifying a "strategy" for ending simulation and prediction. This is called the "event_strategy", and can be one of the following:
'first': Stop when the first event of the list is met
'all': Stop when all events in the list are met

Also added tests and added to tutorial.

Note: UTP is setup to only support 'all'. If you specify anything else, it will return an error. #150 opened to eventually add this functionality

@teubert teubert added component: predictors components: simulation enhancement New feature or request project: SWS System Wide Safety Project labels Jul 15, 2024
Copy link

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

  • Reviewer (someone other than author) should look for bugs, efficiency, readability, testing, and coverage in examples (if relevant).
  • Ensure that each PR adding a new feature should include a test verifying that feature.
  • All errors from static analysis must be resolved.
  • Review the test coverage reports (if there is a change) - will be added as comment on PR if there is a change
  • Review the software benchmarking results (if there is a change) - will be added as comment on PR
  • Any added dependencies are included in requirements.txt, setup.py, and dev_guide.rst (this document)
  • All warnings from static analysis must be reviewed and resolved - if deemed appropriate.

@teubert teubert self-assigned this Jul 15, 2024
@teubert teubert requested a review from adam-sweet July 15, 2024 22:19
@teubert teubert linked an issue Jul 15, 2024 that may be closed by this pull request
6 tasks
@teubert teubert requested a review from kkannan7 July 15, 2024 23:32
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 92.72727% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.40%. Comparing base (0980f8c) to head (fe8318d).
Report is 42 commits behind head on dev.

Files Patch % Lines
src/progpy/predictors/monte_carlo.py 81.81% 2 Missing ⚠️
src/progpy/prognostics_model.py 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #149      +/-   ##
==========================================
- Coverage   83.41%   83.40%   -0.01%     
==========================================
  Files         100      100              
  Lines       10462    10601     +139     
==========================================
+ Hits         8727     8842     +115     
- Misses       1735     1759      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@adam-sweet adam-sweet left a comment

Choose a reason for hiding this comment

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

I ran with the SWS model and the shell script driving prog_server. Looks to be working. Thanks for the feature!

@teubert teubert merged commit fdd7640 into dev Jul 24, 2024
29 of 30 checks passed
@teubert teubert deleted the feature/146-add-a-way-to-specify-how-events-end-a-prediction-calculation branch July 24, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a way to specify how events end a prediction calculation
3 participants