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
> perhaps the following code #731
Comments
While working on PR #728 (a fix to issue #717), I decided to take a closer look at the following section of the code
First of all, the current code does not pass the runtime cache option in the
With the two aforementioned changes, when running the modified simultaneous-fit.py code one gets:
Notice that the before the fit, By making the following changes, ie set the class member
When the modified script is run one gets the expected results:
That is during the fit, I will issue a PR to fix this issue shortly (after I finalize the test). |
I personally don't have a good feel for how the cache code and the setup/teardown methods are meant to interact. Previously I think the cache was only used for models with no free parameters, and then only within the context of a "setup/teardown" call - e.g. as done by a fit call. This is presumably why there is a unilateral "turn off cacheing" in the teardown method, in case it had been turned on by the setup method.
We've now changed things so that cacheing is expected to be on, so turning it off in teardown isn't very useful. However, I am not convinced that always turning it on is a great idea either. My current feeling would be that the teardown method shouldn't change the
_use_caching
attribute. In that case we may also want to remove the "turn on caching if there are no free parameters" logic in the setup method as well (since we expect the cache support to already be on), but I think this is getting to the point that we should be reviewing the cache code.Originally posted by @DougBurke in #678 (comment)
The text was updated successfully, but these errors were encountered: