Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance 3.x common logger and update 3.x torch example #1783

Merged
merged 15 commits into from May 15, 2024

Conversation

yuwenzho
Copy link
Collaborator

@yuwenzho yuwenzho commented May 10, 2024

Type of Change

example
API changed or not: no

Description

Update 3.x torch example and enhance 3.x common logger information.

Smooth quant uses quantize(), others use prepare() + convert()

How has this PR been tested?

CI, extension test

Dependency Change?

no

Signed-off-by: yuwenzho <yuwen.zhou@intel.com>
Copy link

github-actions bot commented May 10, 2024

⛈️ Required checks status: Has failure 🔴

Warning
If you do not have the access to re-run the Probot, please contact XuehaoSun for help. If you push a new commit, all of the workflow will be re-triggered.

Groups summary

🟢 Code Scan Tests workflow
Check ID Status Error details
Code-Scan success
Code-Scan (Bandit Code Scan Bandit) success
Code-Scan (DocStyle Code Scan DocStyle) success
Code-Scan (Pylint Code Scan Pylint) success

These checks are required after the changes to neural_compressor/common/__init__.py, neural_compressor/common/utils/constants.py, neural_compressor/common/utils/logger.py, neural_compressor/common/utils/utility.py, neural_compressor/onnxrt/quantization/autotune.py, neural_compressor/onnxrt/quantization/quantize.py, neural_compressor/tensorflow/quantization/autotune.py, neural_compressor/tensorflow/quantization/quantize.py, neural_compressor/torch/algorithms/base_algorithm.py, neural_compressor/torch/quantization/algorithm_entry.py, neural_compressor/torch/quantization/autotune.py, neural_compressor/torch/quantization/quantize.py, neural_compressor/torch/utils/utility.py.

🔴 Model Tests workflow
Check ID Status Error details
Model-Test failure
Model-Test (Generate Report GenerateReport) no_status
Model-Test (Run ONNX Model resnet50-v1-12) success
Model-Test (Run PyTorch Model resnet18) failure
Model-Test (Run PyTorch Model resnet18_fx) failure
Model-Test (Run TensorFlow Model darknet19) success
Model-Test (Run TensorFlow Model inception_v1) success
Model-Test (Run TensorFlow Model resnet-101) success
Model-Test (Run TensorFlow Model resnet50v1.5) success
Model-Test (Run TensorFlow Model ssd_mobilenet_v1_ckpt) success
Model-Test (Run TensorFlow Model ssd_resnet50_v1) success

These checks are required after the changes to .azure-pipelines/scripts/models/env_setup.sh, .azure-pipelines/scripts/models/run_model_trigger_common.sh, .azure-pipelines/scripts/models/run_pytorch_models_trigger.sh.

🟢 Model Tests 3x workflow
Check ID Status Error details
Model-Test-3x success
Model-Test-3x (Generate Report GenerateReport) success
Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4) success
Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4_dq_bnb) success
Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4_dq_ggml) success

These checks are required after the changes to neural_compressor/common/__init__.py, neural_compressor/common/utils/constants.py, neural_compressor/common/utils/logger.py, neural_compressor/common/utils/utility.py, neural_compressor/torch/algorithms/base_algorithm.py, neural_compressor/torch/quantization/algorithm_entry.py, neural_compressor/torch/quantization/autotune.py, neural_compressor/torch/quantization/quantize.py, neural_compressor/torch/utils/utility.py, examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/llm/run_clm_no_trainer.py, .azure-pipelines/scripts/models/env_setup.sh, .azure-pipelines/scripts/models/run_model_trigger_common.sh, .azure-pipelines/scripts/models/run_pytorch_models_trigger.sh.

🟢 Unit Tests ITREX workflow
Check ID Status Error details
UT-ITREX success

These checks are required after the changes to neural_compressor/onnxrt/quantization/autotune.py, neural_compressor/onnxrt/quantization/quantize.py.

🟢 Unit Tests 3x-TensorFlow workflow
Check ID Status Error details
UT-3x-TensorFlow success
UT-3x-TensorFlow (Coverage Compare CollectDatafiles) success
UT-3x-TensorFlow (Unit Test 3x TensorFlow Unit Test 3x TensorFlow) success
UT-3x-TensorFlow (Unit Test 3x TensorFlow baseline Unit Test 3x TensorFlow baseline) success

These checks are required after the changes to neural_compressor/common/__init__.py, neural_compressor/common/utils/constants.py, neural_compressor/common/utils/logger.py, neural_compressor/common/utils/utility.py, neural_compressor/tensorflow/quantization/autotune.py, neural_compressor/tensorflow/quantization/quantize.py.

🟢 Unit Tests 3x-PyTorch workflow
Check ID Status Error details
UT-3x-Torch success
UT-3x-Torch (Coverage Compare CollectDatafiles) success
UT-3x-Torch (Unit Test 3x Torch Unit Test 3x Torch) success
UT-3x-Torch (Unit Test 3x Torch baseline Unit Test 3x Torch baseline) success

These checks are required after the changes to neural_compressor/common/__init__.py, neural_compressor/common/utils/constants.py, neural_compressor/common/utils/logger.py, neural_compressor/common/utils/utility.py, neural_compressor/torch/algorithms/base_algorithm.py, neural_compressor/torch/quantization/algorithm_entry.py, neural_compressor/torch/quantization/autotune.py, neural_compressor/torch/quantization/quantize.py, neural_compressor/torch/utils/utility.py.

🟢 Unit Tests 3x-ONNXRT workflow
Check ID Status Error details
UT-3x-ONNXRT success
UT-3x-ONNXRT (Coverage Compare CollectDatafiles) success
UT-3x-ONNXRT (Unit Test 3x ONNXRT Unit Test 3x ONNXRT) success
UT-3x-ONNXRT (Unit Test 3x ONNXRT baseline Unit Test 3x ONNXRT baseline) success

These checks are required after the changes to neural_compressor/common/__init__.py, neural_compressor/common/utils/constants.py, neural_compressor/common/utils/logger.py, neural_compressor/common/utils/utility.py, neural_compressor/onnxrt/quantization/autotune.py, neural_compressor/onnxrt/quantization/quantize.py.


Thank you for your contribution! 💜

Note
This comment is automatically generated and will be updates every 180 seconds within the next 6 hours. If you have any other questions, contact chensuyue or XuehaoSun for help.

yuwenzho and others added 6 commits May 10, 2024 20:19
Signed-off-by: yuwenzho <yuwen.zhou@intel.com>
Signed-off-by: yuwenzho <yuwen.zhou@intel.com>
Signed-off-by: yuwenzho <yuwen.zhou@intel.com>
@yuwenzho yuwenzho requested a review from yiliu30 May 13, 2024 03:34
neural_compressor/common/utils/utility.py Outdated Show resolved Hide resolved
@@ -30,7 +30,7 @@ def need_apply(configs_mapping: Dict[Tuple[str, callable], BaseConfig], algo_nam
return any(config.name == algo_name for config in configs_mapping.values())


@log_quant_execution
@log_quant_execution(mode=Mode.QUANTIZE.value)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @chensuyue, please be aware of this change, the quantization process is complete when either the convert or quantize is completed.

yuwenzho and others added 2 commits May 13, 2024 00:08
Signed-off-by: yuwenzho <yuwen.zhou@intel.com>
@yuwenzho yuwenzho changed the title Update 3.x torch example Enhance 3.x common logger and update 3.x torch example May 13, 2024
yuwenzho and others added 6 commits May 13, 2024 00:32
Signed-off-by: yuwenzho <yuwen.zhou@intel.com>
Signed-off-by: yuwenzho <yuwen.zhou@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
@chensuyue chensuyue merged commit 1cb844b into master May 15, 2024
42 of 46 checks passed
@chensuyue chensuyue deleted the yuwenzho/update_pt_example branch May 15, 2024 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants