intel / neural-compressor

SOTA low-bit LLM quantization (INT8/FP8/INT4/FP4/NF4) & sparsity; leading model compression techniques on TensorFlow, PyTorch, and ONNX Runtime
https://intel.github.io/neural-compressor/
Apache License 2.0
2.18k stars 252 forks source link

Add docstring for `common` module #1905

Closed yiliu30 closed 2 months ago

yiliu30 commented 2 months ago

Type of Change

documentation API changed or not: None

Description

pydocstyle  --convention=google  ./neural_compressor/common/ 

How has this PR been tested?

Pre-CI

Dependency Change?

None

github-actions[bot] commented 2 months ago

⚡ Required checks status: All passing 🟢

Groups summary

🟢 Code Scan Tests workflow | Check ID | Status | Error details | | | -------- | ------ | ---- | --- | | [Code-Scan](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32318) | success | | ✅ | | [Code-Scan (Bandit Code Scan Bandit)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32318&view=logs&jobId=343c57fa-283e-589b-e772-0a0553c93e53) | success | | ✅ | | [Code-Scan (DocStyle Code Scan DocStyle)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32318&view=logs&jobId=c1e234ec-db76-5d40-e8f0-e1ad3ef905a3) | success | | ✅ | | [Code-Scan (Pylint Code Scan Pylint)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32318&view=logs&jobId=454075da-6b11-57a5-edf2-4c5947924fa8) | success | | ✅ | These checks are required after the changes to `neural_compressor/common/__init__.py`, `neural_compressor/common/base_config.py`, `neural_compressor/common/base_tuning.py`, `neural_compressor/common/tuning_param.py`, `neural_compressor/common/utils/__init__.py`, `neural_compressor/common/utils/constants.py`, `neural_compressor/common/utils/logger.py`, `neural_compressor/common/utils/save_load.py`, `neural_compressor/common/utils/utility.py`.
🟢 Model Tests 3x workflow | Check ID | Status | Error details | | | -------- | ------ | ---- | --- | | [Model-Test-3x](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32322) | success | | ✅ | | [Model-Test-3x (Generate Report GenerateReport)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32322&view=logs&jobId=131b5a5d-c16f-50a4-e704-41ef17f1e502) | success | | ✅ | | [Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32322&view=logs&jobId=755e7e04-6394-5b90-5620-e4f7caa2e662) | success | | ✅ | | [Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4_dq_bnb)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32322&view=logs&jobId=955dfdfb-3694-57d2-1533-613736b0ac49) | success | | ✅ | | [Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4_dq_ggml)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32322&view=logs&jobId=919e49eb-e265-548b-eaa7-50d75ec3f230) | success | | ✅ | These checks are required after the changes to `neural_compressor/common/__init__.py`, `neural_compressor/common/base_config.py`, `neural_compressor/common/base_tuning.py`, `neural_compressor/common/tuning_param.py`, `neural_compressor/common/utils/__init__.py`, `neural_compressor/common/utils/constants.py`, `neural_compressor/common/utils/logger.py`, `neural_compressor/common/utils/save_load.py`, `neural_compressor/common/utils/utility.py`.
🟢 Unit Tests 3x-TensorFlow workflow | Check ID | Status | Error details | | | -------- | ------ | ---- | --- | | [UT-3x-TensorFlow](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32320) | success | | ✅ | | [UT-3x-TensorFlow (Coverage Compare CollectDatafiles)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32320&view=logs&jobId=71384379-497b-5787-1f51-cc2e0f831d78) | success | | ✅ | | [UT-3x-TensorFlow (Unit Test 3x TensorFlow Unit Test 3x TensorFlow)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32320&view=logs&jobId=45daf969-8bc5-5011-3358-6610c803470a) | success | | ✅ | | [UT-3x-TensorFlow (Unit Test 3x TensorFlow baseline Unit Test 3x TensorFlow baseline)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32320&view=logs&jobId=acbfe8aa-f0a9-5aa1-b544-bdcc7f0e36c4) | success | | ✅ | These checks are required after the changes to `neural_compressor/common/__init__.py`, `neural_compressor/common/base_config.py`, `neural_compressor/common/base_tuning.py`, `neural_compressor/common/tuning_param.py`, `neural_compressor/common/utils/__init__.py`, `neural_compressor/common/utils/constants.py`, `neural_compressor/common/utils/logger.py`, `neural_compressor/common/utils/save_load.py`, `neural_compressor/common/utils/utility.py`.
🟢 Unit Tests 3x-PyTorch workflow | Check ID | Status | Error details | | | -------- | ------ | ---- | --- | | [UT-3x-Torch](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32319) | success | | ✅ | | [UT-3x-Torch (Coverage Compare CollectDatafiles)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32319&view=logs&jobId=71384379-497b-5787-1f51-cc2e0f831d78) | success | | ✅ | | [UT-3x-Torch (Unit Test 3x Torch Unit Test 3x Torch)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32319&view=logs&jobId=ce119872-54c8-5686-93fc-b763560515d2) | success | | ✅ | | [UT-3x-Torch (Unit Test 3x Torch baseline Unit Test 3x Torch baseline)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32319&view=logs&jobId=337dfcaa-e49a-58ed-d835-0606580c9539) | success | | ✅ | These checks are required after the changes to `neural_compressor/common/__init__.py`, `neural_compressor/common/base_config.py`, `neural_compressor/common/base_tuning.py`, `neural_compressor/common/tuning_param.py`, `neural_compressor/common/utils/__init__.py`, `neural_compressor/common/utils/constants.py`, `neural_compressor/common/utils/logger.py`, `neural_compressor/common/utils/save_load.py`, `neural_compressor/common/utils/utility.py`.
🟢 Unit Tests 3x-ONNXRT workflow | Check ID | Status | Error details | | | -------- | ------ | ---- | --- | | [UT-3x-ONNXRT](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32321) | success | | ✅ | | [UT-3x-ONNXRT (Coverage Compare CollectDatafiles)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32321&view=logs&jobId=71384379-497b-5787-1f51-cc2e0f831d78) | success | | ✅ | | [UT-3x-ONNXRT (Unit Test 3x ONNXRT Unit Test 3x ONNXRT)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32321&view=logs&jobId=3db173ea-5f83-5cb0-6129-41ce50acfd9a) | success | | ✅ | | [UT-3x-ONNXRT (Unit Test 3x ONNXRT baseline Unit Test 3x ONNXRT baseline)](https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_build/results?buildId=32321&view=logs&jobId=407ef47f-0b06-5cf4-d454-c19419fc5d45) | success | | ✅ | These checks are required after the changes to `neural_compressor/common/__init__.py`, `neural_compressor/common/base_config.py`, `neural_compressor/common/base_tuning.py`, `neural_compressor/common/tuning_param.py`, `neural_compressor/common/utils/__init__.py`, `neural_compressor/common/utils/constants.py`, `neural_compressor/common/utils/logger.py`, `neural_compressor/common/utils/save_load.py`, `neural_compressor/common/utils/utility.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.