-
Notifications
You must be signed in to change notification settings - Fork 0
Description
When writing a stack for the metric computation, I faced the following situation:
layer network_split:
create a network_analyzer object with the model received from previous layer:
net_analyzer = network_analyzer(model) #This is kinda slow...and do some modifications:
net_analyzer.do_something() #Modifs that split the network into feedersand finally returns:
return network_analyzer.modellayer compute_metrics
Receives the model from the network_split layer, but has to re-create an instance of network_analyzer to compute the metrics:
net_analyzer = network_analyzer(model) #This is (again) kinda slow...
net_analyzer.compute_metrics()
net_analyzer.export()This means that we end up doing something slow twice when running the stack.
A quick and dirty fix I made was to allow the metric computation to happen in the network_split layer (see bd5e8f5), but it'd be nice to have a cleaner solution. Especially since we need to have a layer dedicated to the metric computation itself. It looks like being able to pass the network_analyzer from one layer to another through the stack (like what is done with the model) would solve this.
I an unsure about the feasibility and complexity of such a change though. And even if possible, this might be something that we don't want to allow.
Thoughts??