mct-nightly 2.3.0.20250218.513__py3-none-any.whl → 2.3.0.20250219.507__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: mct-nightly
3
- Version: 2.3.0.20250218.513
3
+ Version: 2.3.0.20250219.507
4
4
  Summary: A Model Compression Toolkit for neural networks
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: Apache Software License
@@ -1,4 +1,4 @@
1
- model_compression_toolkit/__init__.py,sha256=L4EkNtR-te33w9SEvsB2NdnEnI240JVQctspC0VdZxc,1557
1
+ model_compression_toolkit/__init__.py,sha256=6qHWokQ4krL43UsjNfvQ5uY-9B0iFBWOC0aw4_zvQYI,1557
2
2
  model_compression_toolkit/constants.py,sha256=i_R6uXBfO1ph_X6DNJych2x59SUojfJbn7dNjs_mZnc,3846
3
3
  model_compression_toolkit/defaultdict.py,sha256=LSc-sbZYXENMCw3U9F4GiXuv67IKpdn0Qm7Fr11jy-4,2277
4
4
  model_compression_toolkit/logger.py,sha256=L3q7tn3Uht0i_7phnlOWMR2Te2zvzrt2HOz9vYEInts,4529
@@ -32,7 +32,7 @@ model_compression_toolkit/core/common/fusion/__init__.py,sha256=Rf1RcYmelmdZmBV5
32
32
  model_compression_toolkit/core/common/fusion/graph_fuser.py,sha256=b41_4rL_Adiza4vpWlmmqgvkpUmWVdfdx0nEIB0p2n8,6195
33
33
  model_compression_toolkit/core/common/fusion/layer_fusing.py,sha256=-2fnjyC9q2RPw9st6RxROW-gdtT2mSRz0QZ_Gz1KDz4,5579
34
34
  model_compression_toolkit/core/common/graph/__init__.py,sha256=Xr-Lt_qXMdrCnnOaUS_OJP_3iTTGfPCLf8_vSrQgCs0,773
35
- model_compression_toolkit/core/common/graph/base_graph.py,sha256=WDyN45Y_wdBR3d5nb-3AX2tsrPxeUtc6GE98xZA-0mY,37818
35
+ model_compression_toolkit/core/common/graph/base_graph.py,sha256=0zsiEldkV_wjDoTjaGtL8DOMGEv2yQqhajwEAnFgqR8,37819
36
36
  model_compression_toolkit/core/common/graph/base_node.py,sha256=_SJBlDIwq5Kt2HLYWIT6POJFnUfrtcOFlOLxTbadJ1w,33058
37
37
  model_compression_toolkit/core/common/graph/edge.py,sha256=buoSEUZwilWBK3WeBKpJ-GeDaUA1SDdOHxDpxU_bGpk,3784
38
38
  model_compression_toolkit/core/common/graph/functional_node.py,sha256=GH5wStmw8SoAj5IdT_-ItN1Meo_P5NUTt_5bgJC4fak,3935
@@ -275,7 +275,7 @@ model_compression_toolkit/core/pytorch/quantizer/lut_fake_quant.py,sha256=uyeBtN
275
275
  model_compression_toolkit/core/pytorch/reader/__init__.py,sha256=Rf1RcYmelmdZmBV5qOKvKWF575ofc06JFQSq83Jz99A,696
276
276
  model_compression_toolkit/core/pytorch/reader/graph_builders.py,sha256=RBNhPuz02kstVVIDibHUES_Skn9feg3gOGbQylM8h-A,19547
277
277
  model_compression_toolkit/core/pytorch/reader/node_holders.py,sha256=7XNc7-l1MZPJGcOESvtAwfIMxrU6kvt3YjF5B7qOqK4,1048
278
- model_compression_toolkit/core/pytorch/reader/reader.py,sha256=GEJE0QX8XJFWbYCkbRBtzttZtmmuoACLx8gw9KyAQCE,6015
278
+ model_compression_toolkit/core/pytorch/reader/reader.py,sha256=Me6nqJpmQBg13dXYiUsmfYr148BYySBZqxHRDba5Tuk,6228
279
279
  model_compression_toolkit/core/pytorch/statistics_correction/__init__.py,sha256=Rf1RcYmelmdZmBV5qOKvKWF575ofc06JFQSq83Jz99A,696
280
280
  model_compression_toolkit/core/pytorch/statistics_correction/apply_second_moment_correction.py,sha256=VgU24J3jf7QComHH7jonOXSkg6mO4TOch3uFkOthZvM,3261
281
281
  model_compression_toolkit/core/pytorch/statistics_correction/pytorch_compute_activation_bias_correction_of_graph.py,sha256=N-9QaEaQYUsIoya9Lc0ZDoMZ0fkiT2gFpOd4zXHKP34,3096
@@ -523,8 +523,8 @@ model_compression_toolkit/xquant/pytorch/model_analyzer.py,sha256=b93o800yVB3Z-i
523
523
  model_compression_toolkit/xquant/pytorch/pytorch_report_utils.py,sha256=UVN_S9ULHBEldBpShCOt8-soT8YTQ5oE362y96qF_FA,3950
524
524
  model_compression_toolkit/xquant/pytorch/similarity_functions.py,sha256=CERxq5K8rqaiE-DlwhZBTUd9x69dtYJlkHOPLB54vm8,2354
525
525
  model_compression_toolkit/xquant/pytorch/tensorboard_utils.py,sha256=mkoEktLFFHtEKzzFRn_jCnxjhJolK12TZ5AQeDHzUO8,9767
526
- mct_nightly-2.3.0.20250218.513.dist-info/LICENSE.md,sha256=aYSSIb-5AFPeITTvXm1UAoe0uYBiMmSS8flvXaaFUks,10174
527
- mct_nightly-2.3.0.20250218.513.dist-info/METADATA,sha256=UqI_zzn8YEFqY_SRZgaZ5jbXjNqkVUDB_crtLj9j8RI,26933
528
- mct_nightly-2.3.0.20250218.513.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
529
- mct_nightly-2.3.0.20250218.513.dist-info/top_level.txt,sha256=gsYA8juk0Z-ZmQRKULkb3JLGdOdz8jW_cMRjisn9ga4,26
530
- mct_nightly-2.3.0.20250218.513.dist-info/RECORD,,
526
+ mct_nightly-2.3.0.20250219.507.dist-info/LICENSE.md,sha256=aYSSIb-5AFPeITTvXm1UAoe0uYBiMmSS8flvXaaFUks,10174
527
+ mct_nightly-2.3.0.20250219.507.dist-info/METADATA,sha256=ZVA50VereM7vOv8QrrhajAMueKGK81XgfOoIm295pnw,26933
528
+ mct_nightly-2.3.0.20250219.507.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
529
+ mct_nightly-2.3.0.20250219.507.dist-info/top_level.txt,sha256=gsYA8juk0Z-ZmQRKULkb3JLGdOdz8jW_cMRjisn9ga4,26
530
+ mct_nightly-2.3.0.20250219.507.dist-info/RECORD,,
@@ -27,4 +27,4 @@ from model_compression_toolkit import data_generation
27
27
  from model_compression_toolkit import pruning
28
28
  from model_compression_toolkit.trainable_infrastructure.keras.load_model import keras_load_quantized_model
29
29
 
30
- __version__ = "2.3.0.20250218.000513"
30
+ __version__ = "2.3.0.20250219.000507"
@@ -449,7 +449,7 @@ class Graph(nx.MultiDiGraph, GraphSearches):
449
449
  if node_to_remove in self.get_inputs(): # If node is in the graph's inputs, the inputs should be updated
450
450
  if new_graph_inputs is None:
451
451
  Logger.critical(
452
- f'{node_to_remove.name} s among the graph inputs; however, it cannot be removed without providing a new input.') # pragma: no cover
452
+ f'{node_to_remove.name} is among the graph inputs; however, it cannot be removed without providing a new input.') # pragma: no cover
453
453
  self.set_inputs(new_graph_inputs)
454
454
 
455
455
  # Make sure there are no connected edges left to the node before removing it.
@@ -152,5 +152,8 @@ def model_reader(model: torch.nn.Module,
152
152
  logging.info("Start Model Reading...")
153
153
  fx_model = fx_graph_module_generation(model, representative_data_gen, to_tensor)
154
154
  graph = build_graph(fx_model, to_numpy)
155
+ disconnected_inputs = [n.name for n in graph.get_inputs() if not graph.out_edges(n)]
156
+ if disconnected_inputs:
157
+ raise ValueError(f'The network contains disconnected input(s): {disconnected_inputs}.')
155
158
  graph = remove_broken_nodes_from_graph(graph)
156
159
  return graph