Skip to content

Commit

Permalink
Fix notebooks after tpc refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
liord committed Dec 3, 2024
1 parent 28b461b commit 15e7466
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@
"\n",
" # Create the quantization configuration options and model\n",
" default_configuration_options = tp.QuantizationConfigOptions([default_config])\n",
" tp_model = tp.TargetPlatformModel(default_configuration_options)\n",
" tp_model = tp.TargetPlatformModel(default_configuration_options,\n",
" tpc_minor_version=1,\n",
" tpc_patch_version=0,\n",
" tpc_platform_type=\"custom_pruning_notebook_tpc\")\n",
"\n",
" # Return the target platform capabilities\n",
" tpc = tp.TargetPlatformCapabilities(tp_model)\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@
},
"outputs": [],
"source": [
"from model_compression_toolkit.target_platform_capabilities.schema.mct_current_schema import Signedness, AttributeQuantizationConfig\n",
"from model_compression_toolkit import DefaultDict\n",
"from model_compression_toolkit.target_platform_capabilities.target_platform.op_quantization_config import AttributeQuantizationConfig, Signedness\n",
"from model_compression_toolkit.constants import FLOAT_BITWIDTH\n",
"from model_compression_toolkit.target_platform_capabilities.constants import KERNEL_ATTR, KERAS_KERNEL, BIAS_ATTR, BIAS\n",
"\n",
Expand Down Expand Up @@ -254,7 +254,10 @@
" # Set default QuantizationConfigOptions in new TargetPlatformModel to be used when no other\n",
" # QuantizationConfigOptions is set for an OperatorsSet.\n",
" default_configuration_options = tp.QuantizationConfigOptions([default_config])\n",
" tp_model = tp.TargetPlatformModel(default_configuration_options)\n",
" tp_model = tp.TargetPlatformModel(default_configuration_options,\n",
" tpc_minor_version=1,\n",
" tpc_patch_version=0,\n",
" tpc_platform_type=\"custom_qat_notebook_tpc\")\n",
" with tp_model:\n",
" default_qco = tp.get_default_quantization_config_options()\n",
" # Group of OperatorsSets that should not be quantized.\n",
Expand Down

0 comments on commit 15e7466

Please sign in to comment.