Skip to content

Commit

Permalink
Remove legacy package (#952)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: reuvenp <[email protected]>
  • Loading branch information
reuvenperetz and reuvenp authored Feb 26, 2024
1 parent 6d05a52 commit eb84737
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 833 deletions.
3 changes: 0 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ auto:exporter:
auto:gptq:
- model_compression_toolkit/gptq/**

auto:legacy:
- model_compression_toolkit/legacy/**

auto:ptq:
- model_compression_toolkit/ptq/**

Expand Down
4 changes: 0 additions & 4 deletions model_compression_toolkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
from model_compression_toolkit.target_platform_capabilities.tpc_models.get_target_platform_capabilities import get_target_platform_capabilities
from model_compression_toolkit import core
from model_compression_toolkit.logger import set_log_folder
from model_compression_toolkit.legacy.keras_quantization_facade import keras_post_training_quantization, keras_post_training_quantization_mixed_precision
from model_compression_toolkit.legacy.pytorch_quantization_facade import pytorch_post_training_quantization, pytorch_post_training_quantization_mixed_precision
from model_compression_toolkit import trainable_infrastructure
from model_compression_toolkit import ptq
from model_compression_toolkit import qat
Expand All @@ -41,8 +39,6 @@
from model_compression_toolkit.logger import set_log_folder
from model_compression_toolkit.core.common.data_loader import FolderImageLoader
from model_compression_toolkit.core.common.framework_info import FrameworkInfo, ChannelAxis
from model_compression_toolkit.legacy.keras_quantization_facade import keras_post_training_quantization, keras_post_training_quantization_mixed_precision
from model_compression_toolkit.legacy.pytorch_quantization_facade import pytorch_post_training_quantization, pytorch_post_training_quantization_mixed_precision
from model_compression_toolkit.core.keras.kpi_data_facade import keras_kpi_data
from model_compression_toolkit.core.pytorch.kpi_data_facade import pytorch_kpi_data
from model_compression_toolkit.gptq.common.gptq_config import GradientPTQConfig
Expand Down
14 changes: 0 additions & 14 deletions model_compression_toolkit/legacy/__init__.py

This file was deleted.

304 changes: 0 additions & 304 deletions model_compression_toolkit/legacy/keras_quantization_facade.py

This file was deleted.

284 changes: 0 additions & 284 deletions model_compression_toolkit/legacy/pytorch_quantization_facade.py

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
MixedPercisionSearchKPI4BitsAvgTest, MixedPercisionSearchKPI2BitsAvgTest, MixedPrecisionActivationDisabled, \
MixedPercisionSearchLastLayerDistanceTest, MixedPercisionSearchActivationKPINonConfNodesTest, \
MixedPercisionSearchTotalKPINonConfNodesTest, MixedPercisionSearchPartWeightsLayersTest, MixedPercisionCombinedNMSTest
from tests.keras_tests.feature_networks_tests.feature_networks.old_api_test import OldApiTest
from tests.keras_tests.feature_networks_tests.feature_networks.matmul_substitution_test import MatmulToDenseSubstitutionTest
from tests.keras_tests.feature_networks_tests.feature_networks.const_representation_test import ConstRepresentationTest, \
ConstRepresentationMultiInputTest, ConstRepresentationMatMulTest
Expand Down Expand Up @@ -744,12 +743,6 @@ def test_qat(self):
QATWrappersMixedPrecisionCfgTest(self).run_test()
QATWrappersMixedPrecisionCfgTest(self,kpi_weights=17920 * 4 / 8, kpi_activation=5408 * 4 / 8, expected_mp_cfg=[0, 4, 1, 1]).run_test()

def test_old_api(self):
OldApiTest(self).run_test()
OldApiTest(self, mp_enable=True).run_test()
OldApiTest(self, mp_enable=True, gptq_enable=True).run_test()
OldApiTest(self, gptq_enable=True).run_test()


if __name__ == '__main__':
unittest.main()
122 changes: 0 additions & 122 deletions tests/pytorch_tests/model_tests/feature_models/old_api_test.py

This file was deleted.

7 changes: 0 additions & 7 deletions tests/pytorch_tests/model_tests/test_feature_models_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
GPTQLearnRateZeroTest
from tests.pytorch_tests.model_tests.feature_models.uniform_activation_test import \
UniformActivationTest
from tests.pytorch_tests.model_tests.feature_models.old_api_test import OldApiTest
from tests.pytorch_tests.model_tests.feature_models.const_representation_test import ConstRepresentationTest, \
ConstRepresentationMultiInputTest
from model_compression_toolkit.target_platform_capabilities.target_platform import QuantizationMethod
Expand Down Expand Up @@ -570,12 +569,6 @@ def test_qat(self):
QuantizationAwareTrainingMixedPrecisionCfgTest(self).run_test()
QuantizationAwareTrainingMixedPrecisionKpiCfgTest(self).run_test()

def test_old_api(self):
OldApiTest(self).run_test()
OldApiTest(self, mp_enable=True).run_test()
OldApiTest(self, mp_enable=True, gptq_enable=True).run_test()
OldApiTest(self, gptq_enable=True).run_test()


if __name__ == '__main__':
unittest.main()

0 comments on commit eb84737

Please sign in to comment.