SasView / sasview

Code for the SasView application.
BSD 3-Clause "New" or "Revised" License
49 stars 41 forks source link

Bumps master branch no longer compatible with SasView #3109

Open krzywon opened 1 week ago

krzywon commented 1 week ago

Describe the bug A recent, major, update has overhauled bumps. This has broken fitting on our end. I am still investigating the underlying issue. @pkienzle would like to keep backwards compatibility, and said he is planning to run old bumps tests against the latest bumps to see what has changed.

Error when running a SasView fit using sasview main branch and bumps master branch:

sas.qtgui.Perspectives.Fitting.FitThread - ERROR - Fitting failed: Traceback (most recent call last): File "sasview\src\sas\qtgui\Perspectives\Fitting\FitThread.py", line 79, in compute result = list(map(map_apply, inputs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "sasview\src\sas\qtgui\Perspectives\Fitting\FitThread.py", line 19, in map_apply return arguments0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "sasview\src\sas\qtgui\Perspectives\Fitting\FitThread.py", line 16, in map_getattr return getattr(classInstance, classFunc)(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "sasview\src\sas\sascalc\fit\BumpsFitting.py", line 260, in fit models.append(SasFitness(model=dataset.get_model(), data=dataset.get_data(), constraints=dataset.constraints, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "sasview\src\sas\sascalc\fit\BumpsFitting.py", line 120, in init self._define_pars() File "sasview\src\sas\sascalc\fit\BumpsFitting.py", line 138, in _define_pars self._pars[k] = parameter.Parameter(value=value, bounds=bounds, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "bumps\bumps\parameter.py", line 595, in init bounds = (float(bounds[0]), float(bounds[1])) ^^^^^^^^^^^^^^^^ TypeError: float() argument must be a string or a real number, not 'NoneType' 14:43:48 - root - ERROR - float() argument must be a string or a real number, not 'NoneType' None 14:43:48 - sas.qtgui.Perspectives.Fitting.FittingWidget - ERROR - Traceback (most recent call last): File "sasview\src\sas\qtgui\Perspectives\Fitting\FittingWidget.py", line 2115, in fitComplete self.chi2 = res.fitness ^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'fitness'

Expected behavior The fit should run without errors.

SasView version (please complete the following information):

Additional context This does not affect the release branch due to the version pin we have there.

krzywon commented 1 week ago

Talking with @pkienzle, the hope was for bumps to be backward compatible. That isn't true at this point.

Issues found so far:

krzywon commented 1 week ago

The bumps build process has changed. setup.py no longer exists, so our build system will have to be modernized.

krzywon commented 1 week ago

Bumps no longer includes the gui package as part of its distribution. Based on discussions with @bmaranville, this was likely an oversight and will be fixed in bumps. I thought of just moving those views into SasView, but the back-end bumps API is likely to change, as related to the dream output, so might have to keep chasing their changes everytime bumps is updated if we go that route.

bmaranville commented 1 week ago

bumps.gui is included in the bumps package as of 88b1fa65e5d235565fc99df2613c3fe34cfea210