Skip to content

Commit

Permalink
Do relabeling on graph copies
Browse files Browse the repository at this point in the history
  • Loading branch information
vshampor committed Nov 7, 2023
1 parent 7a91ed6 commit ff42f08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nncf/common/utils/dot_file_rw.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import copy
import pathlib
from collections import defaultdict

Expand Down Expand Up @@ -52,6 +52,8 @@ def relabel_graph_for_dot_visualization(nx_graph: nx.Graph, from_reference: bool
:return: NetworkX graph with reserved symbols in nodes keys replaced.
"""

nx_graph = copy.deepcopy(nx_graph)

# .dot format reserves ':' character in node names
if not from_reference:
# dumping to disk
Expand Down

0 comments on commit ff42f08

Please sign in to comment.