Skip to content

Commit

Permalink
fix random.sample for python312
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Aug 26, 2024
1 parent 1104f1b commit 021af94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/common/quantization/mock_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def get_randomly_connected_model_graph(op_name_keys: Set[str]) -> nx.DiGraph:
graph_len = len(op_name_keys)
mock_graph = nx.generators.gnc_graph(graph_len, None, 0)

shuffled_op_names = random.sample(op_name_keys, len(op_name_keys))
shuffled_op_names = random.sample(sorted(op_name_keys), len(op_name_keys))
for idx, (_, node) in enumerate(mock_graph.nodes.items()):
op_name = shuffled_op_names[idx]
node[NNCFNode.NODE_NAME_ATTR] = get_node_name(shuffled_op_names[idx])
Expand Down

0 comments on commit 021af94

Please sign in to comment.