Skip to content

docs: Fix docstring lint errors in torch/distributed/fsdp/_flat_param.py & torch/distributed/fsdp/_init_utils.py #113358

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

Closed
wants to merge 2 commits into from

Conversation

bjhargrave
Copy link
Contributor

@bjhargrave bjhargrave commented Nov 9, 2023

@pytorch-bot pytorch-bot bot added the release notes: distributed (fsdp) release notes category label Nov 9, 2023
Copy link

pytorch-bot bot commented Nov 9, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/113358

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit a5de469 with merge base 2cd8c05 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@bjhargrave
Copy link
Contributor Author

Before:

(pytorch-dev) ➜  pytorch git:(issues/113189) ✗ pydocstyle --count torch/distributed/fsdp/_flat_param.py
torch/distributed/fsdp/_flat_param.py:100 in public class `HandleShardingStrategy`:
        D101: Missing docstring in public class
torch/distributed/fsdp/_flat_param.py:192 in public class `FlatParameter`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:192 in public class `FlatParameter`:
        D400: First line should end with a period (not 's')
torch/distributed/fsdp/_flat_param.py:340 in public method `__new__`:
        D102: Missing docstring in public method
torch/distributed/fsdp/_flat_param.py:363 in private method `_init_metadata`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:363 in private method `_init_metadata`:
        D400: First line should end with a period (not 's')
torch/distributed/fsdp/_flat_param.py:363 in private method `_init_metadata`:
        D401: First line should be in imperative mood (perhaps 'Initialize', not 'Initializes')
torch/distributed/fsdp/_flat_param.py:429 in public class `FlatParamHandle`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:429 in public class `FlatParamHandle`:
        D400: First line should end with a period (not 's')
torch/distributed/fsdp/_flat_param.py:460 in public method `__init__`:
        D107: Missing docstring in __init__
torch/distributed/fsdp/_flat_param.py:567 in private method `_init_flat_param_and_metadata`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:567 in private method `_init_flat_param_and_metadata`:
        D400: First line should end with a period (not 'h')
torch/distributed/fsdp/_flat_param.py:708 in private method `_validate_tensors_to_flatten`:
        D200: One-line docstring should fit on one line with quotes (found 3)
torch/distributed/fsdp/_flat_param.py:708 in private method `_validate_tensors_to_flatten`:
        D401: First line should be in imperative mood (perhaps 'Validate', not 'Validates')
torch/distributed/fsdp/_flat_param.py:751 in public method `flatten_tensors`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:751 in public method `flatten_tensors`:
        D400: First line should end with a period (not 'g')
torch/distributed/fsdp/_flat_param.py:794 in public method `flatten_tensors_into_flat_param`:
        D102: Missing docstring in public method
torch/distributed/fsdp/_flat_param.py:808 in private method `_init_param_reduce_dtypes`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:808 in private method `_init_param_reduce_dtypes`:
        D400: First line should end with a period (not 's')
torch/distributed/fsdp/_flat_param.py:841 in public method `shard`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:841 in public method `shard`:
        D400: First line should end with a period (not 'r')
torch/distributed/fsdp/_flat_param.py:876 in private method `_init_shard_metadata`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:876 in private method `_init_shard_metadata`:
        D400: First line should end with a period (not 't')
torch/distributed/fsdp/_flat_param.py:876 in private method `_init_shard_metadata`:
        D401: First line should be in imperative mood (perhaps 'Initialize', not 'Initializes')
torch/distributed/fsdp/_flat_param.py:918 in private method `_get_shard_metadata`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:918 in private method `_get_shard_metadata`:
        D400: First line should end with a period (not 'd')
torch/distributed/fsdp/_flat_param.py:918 in private method `_get_shard_metadata`:
        D401: First line should be in imperative mood (perhaps 'Compute', not 'Computes')
torch/distributed/fsdp/_flat_param.py:981 in private method `_get_unpadded_shard`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:981 in private method `_get_unpadded_shard`:
        D400: First line should end with a period (not 'n')
torch/distributed/fsdp/_flat_param.py:981 in private method `_get_unpadded_shard`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_flat_param.py:1008 in private method `_get_shard`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1008 in private method `_get_shard`:
        D400: First line should end with a period (not 'd')
torch/distributed/fsdp/_flat_param.py:1008 in private method `_get_shard`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_flat_param.py:1025 in private method `_get_sharded_size`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1025 in private method `_get_sharded_size`:
        D400: First line should end with a period (not 's')
torch/distributed/fsdp/_flat_param.py:1025 in private method `_get_sharded_size`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_flat_param.py:1039 in private method `_get_flat_param_offsets`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1039 in private method `_get_flat_param_offsets`:
        D400: First line should end with a period (not 'd')
torch/distributed/fsdp/_flat_param.py:1039 in private method `_get_flat_param_offsets`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_flat_param.py:1054 in public method `shard_metadata`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1054 in public method `shard_metadata`:
        D400: First line should end with a period (not 'e')
torch/distributed/fsdp/_flat_param.py:1054 in public method `shard_metadata`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_flat_param.py:1091 in public method `init_flat_param_attributes`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1091 in public method `init_flat_param_attributes`:
        D401: First line should be in imperative mood; try rephrasing (found 'This')
torch/distributed/fsdp/_flat_param.py:1177 in public method `pre_unshard`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_flat_param.py:1212 in private method `_use_low_precision_shard`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1212 in private method `_use_low_precision_shard`:
        D400: First line should end with a period (not 'd')
torch/distributed/fsdp/_flat_param.py:1231 in public method `unshard`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1231 in public method `unshard`:
        D400: First line should end with a period (not 'r')
torch/distributed/fsdp/_flat_param.py:1231 in public method `unshard`:
        D401: First line should be in imperative mood (perhaps 'Run', not 'Runs')
torch/distributed/fsdp/_flat_param.py:1255 in public method `needs_unshard`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_flat_param.py:1266 in private method `_alloc_padded_unsharded_flat_param`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1266 in private method `_alloc_padded_unsharded_flat_param`:
        D400: First line should end with a period (not 'd')
torch/distributed/fsdp/_flat_param.py:1280 in private method `_get_padded_unsharded_flat_param`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1280 in private method `_get_padded_unsharded_flat_param`:
        D400: First line should end with a period (not 'n')
torch/distributed/fsdp/_flat_param.py:1280 in private method `_get_padded_unsharded_flat_param`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_flat_param.py:1312 in private method `_all_gather_flat_param`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1312 in private method `_all_gather_flat_param`:
        D400: First line should end with a period (not 'n')
torch/distributed/fsdp/_flat_param.py:1359 in private method `_use_unsharded_flat_param`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1359 in private method `_use_unsharded_flat_param`:
        D400: First line should end with a period (not 'a')
torch/distributed/fsdp/_flat_param.py:1388 in public method `post_unshard`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1388 in public method `post_unshard`:
        D400: First line should end with a period (not 'n')
torch/distributed/fsdp/_flat_param.py:1388 in public method `post_unshard`:
        D401: First line should be in imperative mood (perhaps 'Run', not 'Runs')
torch/distributed/fsdp/_flat_param.py:1413 in public method `unshard_grad`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1413 in public method `unshard_grad`:
        D400: First line should end with a period (not 'e')
torch/distributed/fsdp/_flat_param.py:1466 in public method `reshard_grad`:
        D102: Missing docstring in public method
torch/distributed/fsdp/_flat_param.py:1475 in public method `prepare_gradient_for_backward`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1475 in public method `prepare_gradient_for_backward`:
        D400: First line should end with a period (not 'd')
torch/distributed/fsdp/_flat_param.py:1475 in public method `prepare_gradient_for_backward`:
        D401: First line should be in imperative mood (perhaps 'Prepare', not 'Prepares')
torch/distributed/fsdp/_flat_param.py:1540 in public method `prepare_gradient_for_optim`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1540 in public method `prepare_gradient_for_optim`:
        D400: First line should end with a period (not 'd')
torch/distributed/fsdp/_flat_param.py:1540 in public method `prepare_gradient_for_optim`:
        D401: First line should be in imperative mood (perhaps 'Prepare', not 'Prepares')
torch/distributed/fsdp/_flat_param.py:1588 in public method `to_cpu`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1588 in public method `to_cpu`:
        D400: First line should end with a period (not 't')
torch/distributed/fsdp/_flat_param.py:1588 in public method `to_cpu`:
        D401: First line should be in imperative mood (perhaps 'Move', not 'Moves')
torch/distributed/fsdp/_flat_param.py:1635 in public method `reshard`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1635 in public method `reshard`:
        D400: First line should end with a period (not 't')
torch/distributed/fsdp/_flat_param.py:1635 in public method `reshard`:
        D401: First line should be in imperative mood (perhaps 'Run', not 'Runs')
torch/distributed/fsdp/_flat_param.py:1651 in public method `post_reshard`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1651 in public method `post_reshard`:
        D400: First line should end with a period (not 't')
torch/distributed/fsdp/_flat_param.py:1651 in public method `post_reshard`:
        D401: First line should be in imperative mood (perhaps 'Run', not 'Runs')
torch/distributed/fsdp/_flat_param.py:1670 in private method `_free_unsharded_flat_param`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1670 in private method `_free_unsharded_flat_param`:
        D400: First line should end with a period (not 's')
torch/distributed/fsdp/_flat_param.py:1742 in private method `_get_unflat_views_unaligned`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1742 in private method `_get_unflat_views_unaligned`:
        D400: First line should end with a period (not 't')
torch/distributed/fsdp/_flat_param.py:1742 in private method `_get_unflat_views_unaligned`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_flat_param.py:1768 in private method `_get_unflat_views_aligned`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1768 in private method `_get_unflat_views_aligned`:
        D400: First line should end with a period (not '`')
torch/distributed/fsdp/_flat_param.py:1768 in private method `_get_unflat_views_aligned`:
        D401: First line should be in imperative mood; try rephrasing (found 'This')
torch/distributed/fsdp/_flat_param.py:1795 in private method `_use_unsharded_views`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1795 in private method `_use_unsharded_views`:
        D400: First line should end with a period (not 'l')
torch/distributed/fsdp/_flat_param.py:1884 in private method `_use_unsharded_grad_views`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1884 in private method `_use_unsharded_grad_views`:
        D400: First line should end with a period (not 'e')
torch/distributed/fsdp/_flat_param.py:1952 in public method `unflatten_as_params`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1952 in public method `unflatten_as_params`:
        D400: First line should end with a period (not ',')
torch/distributed/fsdp/_flat_param.py:1967 in private method `_use_sharded_views`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:1967 in private method `_use_sharded_views`:
        D400: First line should end with a period (not 'o')
torch/distributed/fsdp/_flat_param.py:1967 in private method `_use_sharded_views`:
        D401: First line should be in imperative mood (perhaps 'Set', not 'Sets')
torch/distributed/fsdp/_flat_param.py:2022 in private method `_use_sharded_grad_views`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:2022 in private method `_use_sharded_grad_views`:
        D400: First line should end with a period (not 'd')
torch/distributed/fsdp/_flat_param.py:2022 in private method `_use_sharded_grad_views`:
        D401: First line should be in imperative mood (perhaps 'Set', not 'Sets')
torch/distributed/fsdp/_flat_param.py:2082 in private method `_writeback_orig_params`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:2082 in private method `_writeback_orig_params`:
        D400: First line should end with a period (not 's')
torch/distributed/fsdp/_flat_param.py:2082 in private method `_writeback_orig_params`:
        D401: First line should be in imperative mood (perhaps 'Iterate', not 'Iterates')
torch/distributed/fsdp/_flat_param.py:2249 in private method `_writeback_tensor`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:2249 in private method `_writeback_tensor`:
        D400: First line should end with a period (not ',')
torch/distributed/fsdp/_flat_param.py:2249 in private method `_writeback_tensor`:
        D401: First line should be in imperative mood (perhaps 'Write', not 'Writes')
torch/distributed/fsdp/_flat_param.py:2291 in private method `_reset_flat_param_grad_info_if_needed`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:2291 in private method `_reset_flat_param_grad_info_if_needed`:
        D400: First line should end with a period (not ':')
torch/distributed/fsdp/_flat_param.py:2329 in public method `flat_param_to`:
        D401: First line should be in imperative mood (perhaps 'Wrap', not 'Wraps')
torch/distributed/fsdp/_flat_param.py:2339 in private method `_get_modules`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:2339 in private method `_get_modules`:
        D400: First line should end with a period (not 'd')
torch/distributed/fsdp/_flat_param.py:2339 in private method `_get_modules`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_flat_param.py:2348 in public method `is_sharded`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:2348 in public method `is_sharded`:
        D400: First line should end with a period (not 'e')
torch/distributed/fsdp/_flat_param.py:2348 in public method `is_sharded`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_flat_param.py:2361 in public method `param_module_names`:
        D102: Missing docstring in public method
torch/distributed/fsdp/_flat_param.py:2377 in public method `shared_param_module_names`:
        D102: Missing docstring in public method
torch/distributed/fsdp/_flat_param.py:2434 in private method `_reset_is_grad_none`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:2434 in private method `_reset_is_grad_none`:
        D400: First line should end with a period (not 'e')
torch/distributed/fsdp/_flat_param.py:2434 in private method `_reset_is_grad_none`:
        D401: First line should be in imperative mood (perhaps 'Reset', not 'Resets')
torch/distributed/fsdp/_flat_param.py:2523 in public method `uses_sharded_strategy`:
        D102: Missing docstring in public method
torch/distributed/fsdp/_flat_param.py:2547 in private method `_skipped_use_sharded_views`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_flat_param.py:2547 in private method `_skipped_use_sharded_views`:
        D400: First line should end with a period (not 'r')
124
(pytorch-dev) ➜  pytorch git:(issues/113189) pydocstyle --count torch/distributed/fsdp/_init_utils.py
torch/distributed/fsdp/_init_utils.py:216 in private function `_init_intra_node_process_group`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:216 in private function `_init_intra_node_process_group`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_init_utils.py:234 in private function `_init_inter_node_process_group`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:234 in private function `_init_inter_node_process_group`:
        D400: First line should end with a period (not 's')
torch/distributed/fsdp/_init_utils.py:234 in private function `_init_inter_node_process_group`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_init_utils.py:269 in private function `_init_intra_and_inter_node_groups`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:269 in private function `_init_intra_and_inter_node_groups`:
        D400: First line should end with a period (not 'g')
torch/distributed/fsdp/_init_utils.py:269 in private function `_init_intra_and_inter_node_groups`:
        D401: First line should be in imperative mood (perhaps 'Initialize', not 'Initializes')
torch/distributed/fsdp/_init_utils.py:334 in private function `_check_ignored_states`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:334 in private function `_check_ignored_states`:
        D400: First line should end with a period (not 'y')
torch/distributed/fsdp/_init_utils.py:334 in private function `_check_ignored_states`:
        D401: First line should be in imperative mood (perhaps 'Check', not 'Checks')
torch/distributed/fsdp/_init_utils.py:370 in private function `_init_device_handle`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:370 in private function `_init_device_handle`:
        D400: First line should end with a period (not ',')
torch/distributed/fsdp/_init_utils.py:370 in private function `_init_device_handle`:
        D401: First line should be in imperative mood (perhaps 'Determine', not 'Determines')
torch/distributed/fsdp/_init_utils.py:543 in private function `_init_param_handle_from_module`:
        D200: One-line docstring should fit on one line with quotes (found 3)
torch/distributed/fsdp/_init_utils.py:543 in private function `_init_param_handle_from_module`:
        D401: First line should be in imperative mood (perhaps 'Initialize', not 'Initializes')
torch/distributed/fsdp/_init_utils.py:634 in private function `_get_ignored_modules`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:634 in private function `_get_ignored_modules`:
        D400: First line should end with a period (not 't')
torch/distributed/fsdp/_init_utils.py:634 in private function `_get_ignored_modules`:
        D401: First line should be in imperative mood (perhaps 'Check', not 'Checks')
torch/distributed/fsdp/_init_utils.py:691 in private function `_get_ignored_params`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:691 in private function `_get_ignored_params`:
        D400: First line should end with a period (not 'd')
torch/distributed/fsdp/_init_utils.py:691 in private function `_get_ignored_params`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_init_utils.py:723 in private function `_get_ignored_buffer_names`:
        D200: One-line docstring should fit on one line with quotes (found 3)
torch/distributed/fsdp/_init_utils.py:723 in private function `_get_ignored_buffer_names`:
        D400: First line should end with a period (not '`')
torch/distributed/fsdp/_init_utils.py:723 in private function `_get_ignored_buffer_names`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_init_utils.py:751 in private function `_get_buffer_names`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:751 in private function `_get_buffer_names`:
        D400: First line should end with a period (not 'y')
torch/distributed/fsdp/_init_utils.py:751 in private function `_get_buffer_names`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_init_utils.py:765 in private function `_check_single_device_module`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:765 in private function `_check_single_device_module`:
        D400: First line should end with a period (not ',')
torch/distributed/fsdp/_init_utils.py:765 in private function `_check_single_device_module`:
        D401: First line should be in imperative mood (perhaps 'Raise', not 'Raises')
torch/distributed/fsdp/_init_utils.py:793 in private function `_get_device_from_device_id`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:793 in private function `_get_device_from_device_id`:
        D400: First line should end with a period (not 'r')
torch/distributed/fsdp/_init_utils.py:793 in private function `_get_device_from_device_id`:
        D401: First line should be in imperative mood (perhaps 'Process', not 'Processes')
torch/distributed/fsdp/_init_utils.py:820 in private function `_need_to_materialize_module`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:820 in private function `_need_to_materialize_module`:
        D400: First line should end with a period (not 's')
torch/distributed/fsdp/_init_utils.py:820 in private function `_need_to_materialize_module`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_init_utils.py:919 in private function `_move_module_to_device`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:919 in private function `_move_module_to_device`:
        D400: First line should end with a period (not 't')
torch/distributed/fsdp/_init_utils.py:919 in private function `_move_module_to_device`:
        D401: First line should be in imperative mood (perhaps 'Move', not 'Moves')
torch/distributed/fsdp/_init_utils.py:971 in private function `_move_states_to_device`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:971 in private function `_move_states_to_device`:
        D400: First line should end with a period (not 'd')
torch/distributed/fsdp/_init_utils.py:1013 in private function `_get_compute_device`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:1013 in private function `_get_compute_device`:
        D400: First line should end with a period (not 's')
torch/distributed/fsdp/_init_utils.py:1013 in private function `_get_compute_device`:
        D401: First line should be in imperative mood (perhaps 'Determine', not 'Determines')
torch/distributed/fsdp/_init_utils.py:1049 in private function `_sync_module_params_and_buffers`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:1049 in private function `_sync_module_params_and_buffers`:
        D400: First line should end with a period (not 'l')
torch/distributed/fsdp/_init_utils.py:1049 in private function `_sync_module_params_and_buffers`:
        D401: First line should be in imperative mood (perhaps 'Synchronize', not 'Synchronizes')
torch/distributed/fsdp/_init_utils.py:1108 in private function `_get_orig_params`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:1108 in private function `_get_orig_params`:
        D400: First line should end with a period (not 'g')
torch/distributed/fsdp/_init_utils.py:1108 in private function `_get_orig_params`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
torch/distributed/fsdp/_init_utils.py:1128 in private function `_check_orig_params_flattened`:
        D205: 1 blank line required between summary line and description (found 0)
torch/distributed/fsdp/_init_utils.py:1128 in private function `_check_orig_params_flattened`:
        D400: First line should end with a period (not 'e')
torch/distributed/fsdp/_init_utils.py:1128 in private function `_check_orig_params_flattened`:
        D401: First line should be in imperative mood (perhaps 'Check', not 'Checks')
54

After:

(pytorch-dev) ➜  pytorch git:(issues/113189) pydocstyle --count torch/distributed/fsdp/_flat_param.py
torch/distributed/fsdp/_flat_param.py:100 in public class `HandleShardingStrategy`:
        D101: Missing docstring in public class
torch/distributed/fsdp/_flat_param.py:341 in public method `__new__`:
        D102: Missing docstring in public method
torch/distributed/fsdp/_flat_param.py:461 in public method `__init__`:
        D107: Missing docstring in __init__
torch/distributed/fsdp/_flat_param.py:797 in public method `flatten_tensors_into_flat_param`:
        D102: Missing docstring in public method
torch/distributed/fsdp/_flat_param.py:1487 in public method `reshard_grad`:
        D102: Missing docstring in public method
torch/distributed/fsdp/_flat_param.py:2394 in public method `param_module_names`:
        D102: Missing docstring in public method
torch/distributed/fsdp/_flat_param.py:2410 in public method `shared_param_module_names`:
        D102: Missing docstring in public method
torch/distributed/fsdp/_flat_param.py:2558 in public method `uses_sharded_strategy`:
        D102: Missing docstring in public method
8
(pytorch-dev) ➜  pytorch git:(issues/113189) pydocstyle --count torch/distributed/fsdp/_init_utils.py
0

@bjhargrave
Copy link
Contributor Author

@pytorchbot label "docathon-h2-2023"

@svekars svekars added the medium Label for medium docathon tasks label Nov 9, 2023
@svekars svekars requested review from weifengpy and awgu and removed request for weifengpy November 9, 2023 21:44
Copy link
Contributor

@svekars svekars left a comment

Choose a reason for hiding this comment

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

Some suggestions. Thank you!

@albanD albanD added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Nov 10, 2023
@kit1980
Copy link
Contributor

kit1980 commented Nov 10, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 10, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@bjhargrave bjhargrave deleted the issues/113189 branch November 13, 2023 20:13
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request medium Label for medium docathon tasks Merged module: fsdp open source release notes: distributed (fsdp) release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix docstring errors in _init_utils.py, flat_param.py
6 participants