mct-nightly 2.0.0.20240508.122218__py3-none-any.whl → 2.0.0.20240508.145132__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.1
2
2
  Name: mct-nightly
3
- Version: 2.0.0.20240508.122218
3
+ Version: 2.0.0.20240508.145132
4
4
  Summary: A Model Compression Toolkit for neural networks
5
5
  Home-page: UNKNOWN
6
6
  License: UNKNOWN
@@ -1,5 +1,5 @@
1
- model_compression_toolkit/__init__.py,sha256=UwOX-ld2fBD1wK2ssmJUlOZGDaW6NDVqN1PQO_5RR6A,1573
2
- model_compression_toolkit/constants.py,sha256=yIJyJ-e1WrDeKD9kG15qkqfYnoj7J1J2CxnJDt008ik,3756
1
+ model_compression_toolkit/__init__.py,sha256=VXDzBcslSjNtnHoWxwAGbaG2mDN1wSX2K74Js3jUdZA,1573
2
+ model_compression_toolkit/constants.py,sha256=b63Jk_bC7VXEX3Qn9TZ3wUvrNKD8Mkz8zIuayoyF5eU,3828
3
3
  model_compression_toolkit/defaultdict.py,sha256=LSc-sbZYXENMCw3U9F4GiXuv67IKpdn0Qm7Fr11jy-4,2277
4
4
  model_compression_toolkit/logger.py,sha256=3DByV41XHRR3kLTJNbpaMmikL8icd9e1N-nkQAY9oDk,4567
5
5
  model_compression_toolkit/metadata.py,sha256=IyoON37lBv3TI0rZGCP4K5t3oYI4TOmYy-LRXOwHGpE,1136
@@ -292,7 +292,7 @@ model_compression_toolkit/data_generation/pytorch/constants.py,sha256=QWyreMImcf
292
292
  model_compression_toolkit/data_generation/pytorch/image_pipeline.py,sha256=6g7OpOuO3cU4TIuelaRjBKpCPgiMbe1a3iy9bZtdZUo,6617
293
293
  model_compression_toolkit/data_generation/pytorch/model_info_exctractors.py,sha256=sO9tA03nIaeYnzOL4Egec5sVcSGU8H8k9-nNjhaLEbk,9690
294
294
  model_compression_toolkit/data_generation/pytorch/optimization_utils.py,sha256=AjYsO-lm06JOUMoKkS6VbyF4O_l_ffWXrgamqJm1ofE,19085
295
- model_compression_toolkit/data_generation/pytorch/pytorch_data_generation.py,sha256=rZ-4YAcgEc9qZEs5FrK0OJaNtSsQC57Y61UdbXbQcE4,20937
295
+ model_compression_toolkit/data_generation/pytorch/pytorch_data_generation.py,sha256=UGX0J0lU1bY4ZI6qE1K0AnFWsDFs3clYPBC4GZf9KxA,21219
296
296
  model_compression_toolkit/data_generation/pytorch/optimization_functions/__init__.py,sha256=huHoBUcKNB6BnY6YaUCcFvdyBtBI172ZoUD8ZYeNc6o,696
297
297
  model_compression_toolkit/data_generation/pytorch/optimization_functions/batchnorm_alignment_functions.py,sha256=dMc4zz9XfYfAT4Cxns57VgvGZWPAMfaGlWLFyCyl8TA,1968
298
298
  model_compression_toolkit/data_generation/pytorch/optimization_functions/bn_layer_weighting_functions.py,sha256=i3ePEI8xDE3xZEtmzT5lCkLn9wpObUi_OgqnVDf7nj8,2597
@@ -483,8 +483,8 @@ model_compression_toolkit/trainable_infrastructure/keras/quantize_wrapper.py,sha
483
483
  model_compression_toolkit/trainable_infrastructure/keras/quantizer_utils.py,sha256=MVwXNymmFRB2NXIBx4e2mdJ1RfoHxRPYRgjb1MQP5kY,1797
484
484
  model_compression_toolkit/trainable_infrastructure/pytorch/__init__.py,sha256=huHoBUcKNB6BnY6YaUCcFvdyBtBI172ZoUD8ZYeNc6o,696
485
485
  model_compression_toolkit/trainable_infrastructure/pytorch/base_pytorch_quantizer.py,sha256=MxylaVFPgN7zBiRBy6WV610EA4scLgRJFbMucKvvNDU,2896
486
- mct_nightly-2.0.0.20240508.122218.dist-info/LICENSE.md,sha256=aYSSIb-5AFPeITTvXm1UAoe0uYBiMmSS8flvXaaFUks,10174
487
- mct_nightly-2.0.0.20240508.122218.dist-info/METADATA,sha256=la_dJPFTwsLA7eYayNIaXNrtV6umEQjM8O7uyHz45Aw,18798
488
- mct_nightly-2.0.0.20240508.122218.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
489
- mct_nightly-2.0.0.20240508.122218.dist-info/top_level.txt,sha256=gsYA8juk0Z-ZmQRKULkb3JLGdOdz8jW_cMRjisn9ga4,26
490
- mct_nightly-2.0.0.20240508.122218.dist-info/RECORD,,
486
+ mct_nightly-2.0.0.20240508.145132.dist-info/LICENSE.md,sha256=aYSSIb-5AFPeITTvXm1UAoe0uYBiMmSS8flvXaaFUks,10174
487
+ mct_nightly-2.0.0.20240508.145132.dist-info/METADATA,sha256=XeMm-8c8Jr0j54SBWQ3c6-2sy71tIFY3oQSUoD8JFes,18798
488
+ mct_nightly-2.0.0.20240508.145132.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
489
+ mct_nightly-2.0.0.20240508.145132.dist-info/top_level.txt,sha256=gsYA8juk0Z-ZmQRKULkb3JLGdOdz8jW_cMRjisn9ga4,26
490
+ mct_nightly-2.0.0.20240508.145132.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.0.0.20240508.122218"
30
+ __version__ = "2.0.0.20240508.145132"
@@ -20,6 +20,7 @@ TENSORFLOW = 'tensorflow'
20
20
  PYTORCH = 'pytorch'
21
21
  FOUND_TF = importlib.util.find_spec(TENSORFLOW) is not None
22
22
  FOUND_TORCH = importlib.util.find_spec("torch") is not None
23
+ FOUND_TORCHVISION = importlib.util.find_spec("torchvision") is not None
23
24
  FOUND_ONNX = importlib.util.find_spec("onnx") is not None
24
25
  FOUND_ONNXRUNTIME = importlib.util.find_spec("onnxruntime") is not None
25
26
  FOUND_SONY_CUSTOM_LAYERS = importlib.util.find_spec('sony_custom_layers') is not None
@@ -17,7 +17,7 @@ from typing import Callable, Any, Tuple, List
17
17
 
18
18
  from tqdm import tqdm
19
19
 
20
- from model_compression_toolkit.constants import FOUND_TORCH
20
+ from model_compression_toolkit.constants import FOUND_TORCH, FOUND_TORCHVISION
21
21
  from model_compression_toolkit.core.pytorch.utils import set_model
22
22
  from model_compression_toolkit.data_generation.common.constants import DEFAULT_N_ITER, DEFAULT_DATA_GEN_BS
23
23
  from model_compression_toolkit.data_generation.common.data_generation import get_data_generation_classes
@@ -44,7 +44,7 @@ from model_compression_toolkit.data_generation.pytorch.optimization_functions.sc
44
44
  from model_compression_toolkit.data_generation.pytorch.optimization_utils import PytorchImagesOptimizationHandler
45
45
  from model_compression_toolkit.logger import Logger
46
46
 
47
- if FOUND_TORCH:
47
+ if FOUND_TORCH and FOUND_TORCHVISION:
48
48
  # Importing necessary libraries
49
49
  import torch
50
50
  from torch import Tensor
@@ -354,10 +354,9 @@ else:
354
354
  # If torch is not installed,
355
355
  # we raise an exception when trying to use these functions.
356
356
  def get_pytorch_data_generation_config(*args, **kwargs):
357
- Logger.critical('PyTorch must be installed to use get_pytorch_data_generation_config. '
358
- "The 'torch' package is missing.") # pragma: no cover
359
-
357
+ msg = f"torch and torchvision must be installed to use get_pytorch_data_generation_config. " + ("" if FOUND_TORCH else "'torch' package is missing. ") + ("" if FOUND_TORCHVISION else "'torchvision' package is missing. ") # pragma: no cover
358
+ Logger.critical(msg) # pragma: no cover
360
359
 
361
360
  def pytorch_data_generation_experimental(*args, **kwargs):
362
- Logger.critical("PyTorch must be installed to use 'pytorch_data_generation_experimental'. "
363
- "The 'torch' package is missing.") # pragma: no cover
361
+ msg = f"torch and torchvision must be installed to use pytorch_data_generation_experimental. " + ("" if FOUND_TORCH else "'torch' package is missing. ") + ("" if FOUND_TORCHVISION else "'torchvision' package is missing. ") # pragma: no cover
362
+ Logger.critical(msg) # pragma: no cover