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

Issue 3530 custom termination #3596

Merged
merged 17 commits into from
Dec 8, 2023
Merged

Conversation

valentinsulzer
Copy link
Member

Description

Adds ability to create custom termination events, using any variable, for an experiment step

First part of #3530 (second part is using custom steps, not just terminations)

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@valentinsulzer valentinsulzer mentioned this pull request Dec 6, 2023
5 tasks
Copy link
Contributor

@rtimms rtimms left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

Not for this issue, but the mixed step/string definitions of experiments is a little weird. I think users like the string experiments and dropping them would be a mistake.

@valentinsulzer
Copy link
Member Author

Not for this issue, but the mixed step/string definitions of experiments is a little weird. I think users like the string experiments and dropping them would be a mistake.

Yeah there are good reasons to keep both, what are you suggesting?

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (32fad00) 99.58% compared to head (3468e08) 99.59%.
Report is 36 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3596   +/-   ##
========================================
  Coverage    99.58%   99.59%           
========================================
  Files          257      258    +1     
  Lines        20708    20755   +47     
========================================
+ Hits         20623    20670   +47     
  Misses          85       85           

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

@rtimms
Copy link
Contributor

rtimms commented Dec 8, 2023

Yeah there are good reasons to keep both, what are you suggesting?

Nothing for now, but I'm just conscious it may be confusing for new users to see both ways of doing things within the same experiment definition.

Copy link
Sponsor Member

@brosaplanella brosaplanella left a comment

Choose a reason for hiding this comment

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

Looks good, happy to merge once coverage and tests are fixed! About the interface, I think it should be OK to maintain the string option for a subset of functionality.

@valentinsulzer valentinsulzer merged commit 4ad2853 into develop Dec 8, 2023
35 checks passed
@valentinsulzer valentinsulzer deleted the issue-3530-custom-termination branch December 8, 2023 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants