-
Notifications
You must be signed in to change notification settings - Fork 2
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
Detect unused parameters #43
Comments
Might also want to check for unused providers. This should probably be an independent flag. |
Maybe we could just extract a graph from the pipeline Something like import networkx as nx
G = nx.Graph()
G.add_nodes_from([1, 2, 3, 4, 5])
G.add_edge(1, 2)
G.add_edge(1, 3)
list(nx.connected_components(G))
# [{1, 2, 3}, {4}, {5}] And then we can easily find all of the disconnected components and do something about them, finding unused params or providers or missing providers etc.... Is there an easy way to retrieve edges and nodes from |
If we implement several diagnostic tools, we should have a way of directly constructing a graph (networkx directly or a custom representation). Going for networkx directly might be the best choice because it gives us access to a lot of tools like @YooSunYoung showed. |
Having the ability to detect parameters that are set but unused would greatly simplify debugging, but also allow for doing "validated" computation, which could raises if a parameter is not used.
As we may want to compute only an intermediate result (which would typically not depend on all parameters) this should not be enforced or enabled by default. That is, provide another helper, or argument.
The text was updated successfully, but these errors were encountered: