-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fitting fails/hangs on some fits #2994
Comments
For anyone trying to investigate--I originally thought that #2751 was related (hence the branch 2751-fitting-errors), but I now believe that #2751 has the same surface manifestation (the |
Identified during NIST CNR summer school hence the 6.0.0 label |
Tested in 6.0.0 and 5.0.6. Both versions have the same behavior. If this is a small fix, I would say include it, otherwise, let's move to the next release. |
One obvious check to be added is testing for |
... and addressed in 2994-fitting-failshangs-on-some-fits |
Describe the bug
On some fits, the fitting will hang--i.e. will not return a fit. The fit button will remain in the red "Stop fit" state, the status bar remains as "Fitting started...", and no plots appear. When the
Stop fit
button is clicked, this error will appear:I have done some investigating as to the cause of the bug, and it seems that the Bumps
mpfit
function will hang consistently on step 8 of the fitting process in my specific context (mileage may vary on other data files/fitted parameters). It is unclear to me whether or not fitting parameters are being passed to bumps incorrectly fromFittingWidget.py
or if this is a fundamental error with Bumps. I'll note that this bugged behavior is distinctly different from the normal way Bumps exits a fit, in which the current state of Bumps is returned when the thread is cancelled. In the bug,None
is returned when the thread exits with an error, which is what causes the visible error message upstream:(src/sas/sascalc/fit/BumpsFitting.py,
run_bumps
method):The specific reason why
fitdriver.fit()
returns an error turns out to be what I think is a bug in Bumps, but doesn't seem related to the reason as to why the process hangs (if fixed does not fix the underlying problem):(bumps/mpfit.py)
To Reproduce
TMGel_RT4days_30C.txt
Stop fit
to view errorN.B. The bug can also sometimes be triggered by hitting the 'Fit' and 'Stop fitting' buttons multiple times in rapid succession
NOTE: Only fitting with one parameter selected after selecting the structure factor will result in a correct fit. If you then select the other fitting parameters, fitting will proceed as normal
Expected behavior
SasView to run a fit correctly and allow the user to interrupt the fitting process
Screenshots
Fitting hanging:
Fitting canceled:
SasView version (please complete the following information):
Operating system (please complete the following information):
Additional context | IMPORTANT
Trying to fit with the same parameters but with a different model such as
core_shell_sphere
from start will cause a similar issue, but instead of hanging will automatically return theresults[0][0]
error.The text was updated successfully, but these errors were encountered: