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

Verbose fit #285

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Verbose fit #285

wants to merge 4 commits into from

Conversation

pckroon
Copy link
Collaborator

@pckroon pckroon commented Nov 25, 2019

Here's an initial mock-up of a FitStatus object that can be used to track convergence. I still need to add tests (and make sure the docs build).
@JohnGoertz would this suit your needs?

Closes #280

@pckroon
Copy link
Collaborator Author

pckroon commented Nov 27, 2019

I also played around with caching the objective evaluations by having Fit.execute wrap self.objective.__call__ in a lru_cache, but that just plain doesn't work (discussion in #280).
I'm completely happy to accept the performance hit one additional objective evaluation incurs per iteration, if someone explicitly asked for verbose feedback.

@pckroon
Copy link
Collaborator Author

pckroon commented Nov 27, 2019

@JohnGoertz
Copy link

That output looks great! Perfect information for slow fits. The "last" vs "avg" iter time will be particularly useful for diagnosing peculiarities. For example, I've recently been trying to fit large systems of ODEs that become "stiff" only for certain parameter values, resulting in massive slowdown. This would help catch that sort of thing.

symfit/core/fit.py Outdated Show resolved Hide resolved
symfit/core/fit.py Outdated Show resolved Hide resolved
symfit/core/fit.py Outdated Show resolved Hide resolved
@tBuLi
Copy link
Owner

tBuLi commented Dec 18, 2019

I like this a lot too, just needs documentation and testing as far as I'm concerned. Other than that it's a good step in this direction, and it also sets a good example for how people could define their own callback for their specific needs.

@pckroon
Copy link
Collaborator Author

pckroon commented Dec 20, 2019

This should address your code issues, and adds tests.
Where would you like the docs? I don't really see a "natural" place.

@pckroon
Copy link
Collaborator Author

pckroon commented Dec 20, 2019

I'm getting unrelated test failures: HadamardProduct is not defined. Do you have any idea what could be causing them?

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.

[Feature Request] Option to print progress updates
3 participants