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

replenish docstring #1955

Merged
merged 6 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .azure-pipelines/scripts/codeScan/pydocstyle/scan_path.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
/neural-compressor/neural_compressor/strategy
/neural-compressor/neural_compressor/training.py
/neural-compressor/neural_compressor/utils
/neural_compressor/torch/algorithms/mx_quant
/neural-compressor/neural_compressor/torch/algorithms/static_quant
/neural-compressor/neural_compressor/common
/neural-compressor/neural_compressor/tensorflow
/neural-compressor/neural_compressor/torch/algorithms/layer_wise
/neural-compressor/neural_compressor/torch/algorithms/mixed_precision
/neural-compressor/neural_compressor/torch/algorithms/mx_quant
/neural-compressor/neural_compressor/torch/algorithms/pt2e_quant
/neural-compressor/neural_compressor/torch/algorithms/smooth_quant
/neural_compressor/torch/algorithms/pt2e_quant
/neural_compressor/torch/export
/neural_compressor/common
/neural_compressor/torch/algorithms/weight_only
/neural_compressor/torch/algorithms/layer_wise
/neural_compressor/torch/algorithms/mixed_precision
/neural_compressor/tensorflow
/neural-compressor/neural_compressor/torch/algorithms/static_quant
/neural-compressor/neural_compressor/torch/algorithms/weight_only
/neural-compressor/neural_compressor/torch/export
/neural-compressor/neural_compressor/torch/utils
6 changes: 5 additions & 1 deletion neural_compressor/common/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Benchmark API for Intel Neural Compressor."""

import argparse
import os
Expand Down Expand Up @@ -242,7 +243,9 @@ def get_numa_node(core_list, reversed_numa_info):


def set_cores_for_instance(args, numa_info):
"""All use cases are listed below:
"""Set cores for each instance based on the input args.

All use cases are listed below:
Params: a=num_instance; b=num_cores_per_instance; c=cores;
- no a, b, c: a=1, c=numa:0
- no a, b: a=1, c=c
Expand Down Expand Up @@ -357,6 +360,7 @@ def generate_prefix(args, core_list):
Args:
args (argparse): arguments for setting different configurations
core_list: ["node_index", "cpu_index", num_cpu]

Returns:
command_prefix (str): command_prefix with specific core list for Linux or Windows.
"""
Expand Down
2 changes: 2 additions & 0 deletions neural_compressor/common/utils/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ def wrapper(*args, **kwargs):


class ProcessorType(enum.Enum):
"""The processor type."""

Client = "Client"
Server = "Server"

Expand Down
1 change: 1 addition & 0 deletions neural_compressor/torch/algorithms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Intel Neural Compressor PyTorch algorithms."""

from .base_algorithm import Quantizer
1 change: 1 addition & 0 deletions neural_compressor/torch/algorithms/base_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Intel Neural Compressor PyTorch Quantizer API."""

import copy
from abc import ABC, abstractmethod
Expand Down
2 changes: 1 addition & 1 deletion neural_compressor/torch/quantization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Intel Neural Compressor Pytorch quantization API."""
"""Intel Neural Compressor PyTorch quantization API."""

from neural_compressor.torch.quantization.quantize import quantize, prepare, convert
from neural_compressor.torch.quantization.config import (
Expand Down
1 change: 1 addition & 0 deletions neural_compressor/torch/quantization/algorithm_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Intel Neural Compressor PyTorch supported algorithm entries."""

from copy import deepcopy
from types import MethodType
Expand Down
Loading
Loading