From 1c4c3b6dad03fbf2529a1a1aa21a016a35767615 Mon Sep 17 00:00:00 2001
From: Neta Zmora <neta.zmora@intel.com>
Date: Sat, 18 Jan 2020 17:10:25 +0200
Subject: [PATCH] ranked_structures_pruner.py: fix error message

Fix the formatting of a ValueError raised when a module is missing
an attribute, when collecting activation statistics.
---
 distiller/pruning/ranked_structures_pruner.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/distiller/pruning/ranked_structures_pruner.py b/distiller/pruning/ranked_structures_pruner.py
index 4691ede..629df73 100755
--- a/distiller/pruning/ranked_structures_pruner.py
+++ b/distiller/pruning/ranked_structures_pruner.py
@@ -348,7 +348,7 @@ class ActivationRankedFilterPruner(_RankedStructureParameterPruner):
             raise ValueError("Could not find a layer named %s in the model."
                              "\nMake sure to use assign_layer_fq_names()" % fq_name)
         if not hasattr(module, self.activation_rank_criterion):
-            raise ValueError("Could not find attribute \"{}\" in module %s"
+            raise ValueError("Could not find attribute \"{}\" in module {}"
                              "\nMake sure to use SummaryActivationStatsCollector(\"{}\")".
                              format(self.activation_rank_criterion, fq_name, self.activation_rank_criterion))
 
-- 
GitLab