Skip to content

Complete Google-style docstrings across neural_compressor #2415

Merged
chensuyue merged 16 commits intomasterfrom
copilot/fix-docstrings-in-neural-compressor
Mar 5, 2026
Merged

Complete Google-style docstrings across neural_compressor #2415
chensuyue merged 16 commits intomasterfrom
copilot/fix-docstrings-in-neural-compressor

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

This pull request primarily improves documentation and code clarity across the codebase, especially for the JAX quantization APIs and the core configuration and utility classes. It introduces new API documentation for JAX quantization, adds or enhances docstrings for many methods, and clarifies function signatures and argument types. Additionally, it fixes a typo in a function name and improves the descriptions of configuration and operator handling.

Documentation and API enhancements:

  • Added JAX quantization API documentation to the API docs, including new files jax_quantization_common.rst and jax_quantization_config.rst and corresponding references in the main API index. [1] [2] [3]
  • Added module-level docstrings for JAX quantization algorithm entry points and public API exports (neural_compressor/jax/algorithms/dynamic.py, neural_compressor/jax/algorithms/static.py, neural_compressor/jax/quantization/__init__.py). [1] [2] [3]
  • Expanded or added detailed docstrings to many core methods and classes across configuration, tuning, and utility modules for better clarity and maintainability (e.g., BaseConfig, Evaluator, utility decorators, and logging functions). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]

JAX quantization API and config improvements:

  • Improved function signatures and docstrings for dynamic_quantize and static_quantize to clarify argument types and return values. [1] [2]
  • Enhanced the OperatorConfig class and related config registration methods with more descriptive docstrings and clarified return types in neural_compressor/jax/quantization/config.py. [1] [2] [3] [4]

Bugfixes and minor code improvements:

  • Fixed a typo in the Evaluator class (moldemodel).

These changes collectively improve the usability, maintainability, and clarity of the codebase and documentation, especially for users and developers working with JAX quantization features.

Co-authored-by: chensuyue <51692656+chensuyue@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix and complete docstrings in neural_compressor directory Fix docstrings in neural_compressor directory Mar 3, 2026
@chensuyue
Copy link
Contributor

@copilot you have missing a list of issues such as

split (str, optional): The data split to use. Defaults to None.
is not correct. Need to scan carefully in the path and fix the missing issues.

Co-authored-by: chensuyue <51692656+chensuyue@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot you have missing a list of issues such as https://github.com/intel/neural-compressor/blob/786a2720e1f57f3f8ab09fcaf2ff585bc716a4ab/neural_compressor/torch/algorithms/autoround/a...

Updated autoround.py docstrings to align with actual parameters/defaults in get_dataloader and get_mllm_dataloader (removed non-existent split, corrected batch_size defaults, and documented missing args). Commit: ae3394a.

Copilot AI changed the title Fix docstrings in neural_compressor directory Fix docstrings across neural_compressor including autoround Mar 4, 2026
Copilot AI changed the title Fix docstrings across neural_compressor including autoround Align AutoRound dataloader docstrings with actual signatures Mar 4, 2026
Copilot AI and others added 2 commits March 4, 2026 04:28
Co-authored-by: chensuyue <51692656+chensuyue@users.noreply.github.com>
Co-authored-by: chensuyue <51692656+chensuyue@users.noreply.github.com>
Copilot AI changed the title Align AutoRound dataloader docstrings with actual signatures Align torch FP8 docstrings with Google style Mar 4, 2026
Co-authored-by: chensuyue <51692656+chensuyue@users.noreply.github.com>
Copilot AI changed the title Align torch FP8 docstrings with Google style Complete Google-style docstrings across common/tensorflow/jax modules Mar 4, 2026
Copilot stopped work on behalf of chensuyue due to an error March 4, 2026 14:18
chensuyue and others added 6 commits March 4, 2026 22:29
Co-authored-by: chensuyue <51692656+chensuyue@users.noreply.github.com>
Co-authored-by: chensuyue <51692656+chensuyue@users.noreply.github.com>
Co-authored-by: chensuyue <51692656+chensuyue@users.noreply.github.com>
Co-authored-by: chensuyue <51692656+chensuyue@users.noreply.github.com>
Co-authored-by: chensuyue <51692656+chensuyue@users.noreply.github.com>
Copilot AI changed the title Complete Google-style docstrings across common/tensorflow/jax modules Tighten JAX docstrings across quantization modules Mar 4, 2026
@chensuyue chensuyue marked this pull request as ready for review March 5, 2026 03:31
@chensuyue chensuyue changed the title Tighten JAX docstrings across quantization modules Complete Google-style docstrings across neural_compressor Mar 5, 2026
@chensuyue
Copy link
Contributor

@copilot revert the PR description, need an overall describe, not only just for the last change.

Copy link
Contributor Author

Copilot AI commented Mar 5, 2026

@copilot revert the PR description, need an overall describe, not only just for the last change.

Updated the PR description checklist to reflect the overall JAX docstring work. Commit: 8e8a5e6.

Copilot AI changed the title Complete Google-style docstrings across neural_compressor Complete Google-style docstrings across neural_compressor JAX modules Mar 5, 2026
@chensuyue chensuyue changed the title Complete Google-style docstrings across neural_compressor JAX modules Complete Google-style docstrings across neural_compressor Mar 5, 2026
@chensuyue chensuyue merged commit 60faa41 into master Mar 5, 2026
27 of 29 checks passed
@chensuyue chensuyue deleted the copilot/fix-docstrings-in-neural-compressor branch March 5, 2026 07:44
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.

3 participants