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

Check for zero-valued alpha parameter #3

Closed
eirrgang opened this issue Feb 11, 2021 · 2 comments
Closed

Check for zero-valued alpha parameter #3

eirrgang opened this issue Feb 11, 2021 · 2 comments

Comments

@eirrgang
Copy link
Contributor

It doesn't make sense for alpha to be zero unless a developer is testing a restraint that should not apply forces. However, under some circumstances, run_brer could accidentally set alpha=0. We should check for this and either issue a warning or raise an error that can be optionally disabled.

@eirrgang
Copy link
Contributor Author

eirrgang commented Jun 8, 2021

There are two places we can deal with this, and I suggest we use both.

  1. The Builder for the BRER restraint plugin instance does not accept an initialization argument for alpha (or alpha_prev or alpha_max).
    At

    double alpha{0};
    they are all (always) initialized to 0. We could choose a small but sensible alternative value. (1.0?)

  2. In run_brer, before https://github.com/kassonlab/run_brer/blob/07872e26abcb3e9357efa7acd70ff395f03a8c11/run_brer/plugin_configs.py#L118 or https://github.com/kassonlab/run_brer/blob/07872e26abcb3e9357efa7acd70ff395f03a8c11/run_brer/plugin_configs.py#L147 we can check for a zero-valued alpha and raise a warning or error. (We could make the error conditionally fatal, checking for sys.flags.debug.)

update Option 3: Don't report alpha until the potential is reporting that it has completed training. I think this is logically a separate (but related) issue / feature.

@eirrgang
Copy link
Contributor Author

eirrgang commented Jun 7, 2022

run_brer now checks for zero-valued alpha and raises an exception.

It is reasonable to initialize the struct with alpha{0}.

If anything, we could add a check to the plugin interface that requires an explicit alpha and checks whether it is zero.

But none of us seem to think this is necessary, given the updated checks in run_brer and the ability to retrieve the alpha value from the plugin instance.

@eirrgang eirrgang closed this as completed Jun 7, 2022
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

No branches or pull requests

1 participant