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

Add min_bler and callback to sim_ber #257

Merged
merged 3 commits into from
Nov 13, 2023
Merged

Add min_bler and callback to sim_ber #257

merged 3 commits into from
Nov 13, 2023

Conversation

nbecker
Copy link
Contributor

@nbecker nbecker commented Nov 8, 2023

Description

This adds 2 features to sim_ber function.

  1. Add min_bler stopping feature. Similar to early_stop, if the BLER on the previous ebno step was less than some value then stop. This is useful if, for example, you only want to simulate down to 1e-5.
  2. Add callback. This will call a callback function at each iteration, which can be used for logging, for example.
  • Fixes a bug?

Describe what was wrong, and explain the solution in detail.

  • Adds a new feature?

Yes

Describe the new feature, ensure that it is properly documented. Note that for new features unit tests are required.

  • Introduces API changes?
    No

Address in detail why it is needed. Explain and describe the consequences, does it break older code? Note that API changes might be delayed until a major bump release for inclusion.

This is a non-breaking addition which will help with long-running simulations.

  • Other contributions

Please detail the nature of the submission.

Checklist

[x ] Detailed description
[ ] Added references to issues and discussions
[ ] Added / modified documentation as needed
[ ] Added / modified unit tests as needed
[ ] Passes all tests
[ ] Lint the code
[ ] Performed a self review
[ x] Ensure you Signed-off the commits. Required to accept contributions!
[ ] Co-authored with someone? Add Co-authored-by: user@domain and ensure they signed off their commits too.

@SebastianCa
Copy link
Collaborator

Thank you for the PR. We will review the code in the next days and provide feedback.

…sim_ber

Signed-off-by: Neal Becker <ndbecker2@gmail.com>
@nbecker nbecker changed the title Add min_ber and callback to sim_ber Add min_bler and callback to sim_ber Nov 8, 2023
@SebastianCa
Copy link
Collaborator

We have reviewed the PR and added some functions for early stopping via callbacks.
Please note that we have removed the min_bler parameter as this has been already internally integrated in the next release of Sionna.

The PR is ready to be merged.

@SebastianCa
Copy link
Collaborator

And of course thank again for your contribution to Sionna.

@nbecker
Copy link
Contributor Author

nbecker commented Nov 10, 2023

Note that although callback might be used for early stopping that was not my purpose for it, I added it to do logging to see incremental results while sim is running, to be able to produce plots from running sims.

@SebastianCa
Copy link
Collaborator

That's correct, but there is no harm in having the additional possibility of advanced early stopping. One example could be stopping the simulation after a certain time or when the error variance is below a certain threshold.

@gmarcusm gmarcusm merged commit 105a6fe into NVlabs:main Nov 13, 2023
4 checks passed
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