Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes two bugs. The first was reported here: #486, and was related to the parameter label management when using parameter interposers. Previously the behavior in the
OpModel
method_rebuild_paramvec
resulted in the model's parameter label vector being set to the output of_ops_paramlbls_to_model_paramlbls
. What would happen though is that on subsequent calls to_rebuild_paramvec
that same output would get passed through the same method (growing larger in size each time) until the size of the labels exploded and memory ran out. The changes the behavior of the parameter label management and makes it so that the value of the internal_paramlbls
vector is always that of the operations (modulo any parameter collection). When querying the value of theparameter_labels
property forOpModel
we now call_ops_paramlbls_to_model_paramlbls
on the fly and return that value, so to the end-user they should see the same thing they are used to (but there may still be edge cases).Unrelated to that bug, in the same context where the bug above arose I ran into another related to json serializing
GSTGaugeOptSuite
objects when the 'none' gauge optimization suite option was used, which should be fixed with this patch.