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

Should topology health check be part of the run method? #2622

Open
ma-sadeghi opened this issue Nov 10, 2022 · 2 comments
Open

Should topology health check be part of the run method? #2622

ma-sadeghi opened this issue Nov 10, 2022 · 2 comments

Comments

@ma-sadeghi
Copy link
Member

I've noticed that a significant portion of Transport's run time (somewhere between 40% to 70% depending on network size) is spent in _validate_topology_health. Do we really need it?

@jgostick
Copy link
Member

We'll this is basically the same as checking to make sure the coefficient matrix won't produce a singular matrix. But perhaps we should add a check_algorithm_health function which users can call on demand instead of making it mandatory.

@ma-sadeghi
Copy link
Member Author

Yeah, making it a public method which users can call on demand sounds like a good idea.

To back up, I think if the matrix is ill-conditioned, the matrix solver fails to converge, especially the direct ones, so it's kind of already covered by the solver. Iterative solvers are different though, but if a user is advanced enough to pass their own solver to the run method, they might as well learn how to do diagnostics (i.e., call check_algorithm_health, etc.).

On the other hand, these are all performance optimizations the only become relevant when the network becomes large enough. You could argue that for most use cases, it's not noticeable.

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

2 participants