{"post_stream":{"posts":[{"id":478923,"name":"Alexander Kurakin","username":"kuraga","avatar_template":"/user_avatar/discuss.pytorch.org/kuraga/{size}/68422_2.png","created_at":"2026-07-13T16:52:28.410Z","cooked":"\u003cp\u003ePytorch 2.13 introduces \u003ca href=\"https://docs.pytorch.org/docs/2.13/generated/torch.nn.LinearCrossEntropyLoss.html\" rel=\"noopener nofollow ugc\"\u003e\u003ccode\u003enn.LinearCrossEntropyLoss\u003c/code\u003e\u003c/a\u003e.\u003cbr\u003e\nSo its documentation \u003cem\u003eisn’t a legacy and is thoroughly reviewed\u003c/em\u003e.\u003c/p\u003e\n\u003cp\u003eThere are some issues I see everywhere (e.g. \u003ca href=\"https://github.com/pytorch/pytorch/pull/146247\" rel=\"noopener nofollow ugc\"\u003ethis unmerged PR\u003c/a\u003e).\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eAttributes should be \u003ccode\u003e:attrs:\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eClasses should be \u003ccode\u003e:class:\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eFunctions should be \u003ccode\u003e:func:\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003ePython constants should be \u003cem\u003edouble-backticked\u003c/em\u003e.\u003c/li\u003e\n\u003cli\u003eValues (and mathematical intervals) should be \u003cem\u003esingle-backticked\u003c/em\u003e or \u003ccode\u003e:math:\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eText (variable names) in math should be \u003ccode\u003e\\text{}\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003e“Expresions” like \u003ccode\u003eoptions=None\u003c/code\u003e, \u003ccode\u003eout_features != ()\u003c/code\u003e, \u003ccode\u003evmap(grad(...))\u003c/code\u003e should be ??.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eWhat do we see in the \u003ca href=\"https://github.com/pytorch/pytorch/blob/v2.13.0/torch/nn/modules/loss.py#L1410\" rel=\"noopener nofollow ugc\"\u003esource\u003c/a\u003e?\u003c/p\u003e\n\u003cp\u003e1-7. \u003cstrong\u003eEvery rule\u003c/strong\u003e can be not implied, without any markup.\u003cbr\u003e\n8. pp. 1-3 can be as p.4.\u003cbr\u003e\n9. pp. 4 and 5 are messed (e.g. in \u003ccode\u003eDefault: \u003c/code\u003e).\u003cbr\u003e\n10. \u003ca href=\"https://github.com/pytorch/pytorch/blob/v2.13.0/torch/nn/modules/loss.py#L1439-L1444\" rel=\"noopener nofollow ugc\"\u003e“Lists”\u003c/a\u003e are not recognized.\u003cbr\u003e\n11. Let’s highlight/separate Defaults?\u003c/p\u003e\n\u003cp\u003eAny thoughts on this?\u003c/p\u003e","post_number":1,"post_type":1,"posts_count":5,"updated_at":"2026-07-13T17:04:49.731Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":1,"reads":6,"readers_count":5,"score":21.2,"yours":false,"topic_id":225171,"topic_slug":"on-documentation-formatting","display_username":"Alexander Kurakin","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":2,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"link_counts":[{"url":"https://github.com/pytorch/pytorch/blob/v2.13.0/torch/nn/modules/loss.py#L1410","internal":false,"reflection":false,"title":"pytorch/torch/nn/modules/loss.py at v2.13.0 · pytorch/pytorch · GitHub","clicks":1},{"url":"https://github.com/pytorch/pytorch/pull/146247","internal":false,"reflection":false,"title":"torch/nn/modules/conv.py: docs: improvements by kuraga · Pull Request #146247 · pytorch/pytorch · GitHub","clicks":1},{"url":"https://docs.pytorch.org/docs/2.13/generated/torch.nn.LinearCrossEntropyLoss.html","internal":false,"reflection":false,"title":"LinearCrossEntropyLoss — PyTorch 2.13 documentation","clicks":0},{"url":"https://github.com/pytorch/pytorch/blob/v2.13.0/torch/nn/modules/loss.py#L1439-L1444","internal":false,"reflection":false,"title":"pytorch/torch/nn/modules/loss.py at v2.13.0 · pytorch/pytorch · GitHub","clicks":0}],"read":true,"user_title":null,"bookmarked":false,"actions_summary":[{"id":2,"count":1}],"moderator":false,"admin":false,"staff":false,"user_id":70673,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/on-documentation-formatting/225171/1","can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null,"can_vote":false},{"id":478924,"name":"Valérian Rey","username":"valerian.rey","avatar_template":"/user_avatar/discuss.pytorch.org/valerian.rey/{size}/74283_2.png","created_at":"2026-07-14T03:30:27.152Z","cooked":"\u003cp\u003eGood catch, I think you could open a PR to fix this!\u003c/p\u003e","post_number":2,"post_type":1,"posts_count":5,"updated_at":"2026-07-14T03:30:27.152Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":0,"reads":6,"readers_count":5,"score":1.2,"yours":false,"topic_id":225171,"topic_slug":"on-documentation-formatting","display_username":"Valérian Rey","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":null,"bookmarked":false,"actions_summary":[],"moderator":false,"admin":false,"staff":false,"user_id":81227,"hidden":false,"trust_level":2,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/on-documentation-formatting/225171/2","can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":478925,"name":"Alexander Kurakin","username":"kuraga","avatar_template":"/user_avatar/discuss.pytorch.org/kuraga/{size}/68422_2.png","created_at":"2026-07-14T07:26:35.589Z","cooked":"\u003cp\u003e\u003ca class=\"mention\" href=\"/u/valerian.rey\"\u003e@valerian.rey\u003c/a\u003e , thanks for reply.\u003c/p\u003e\n\u003cp\u003eBut it is a systematic issue. What about a systematic solution?\u003c/p\u003e\n\u003cp\u003eAnd… \u003cem\u003eThat\u003c/em\u003e PR has not been merged.\u003c/p\u003e","post_number":3,"post_type":1,"posts_count":5,"updated_at":"2026-07-14T07:26:35.589Z","reply_count":1,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":0,"reads":5,"readers_count":4,"score":6.0,"yours":false,"topic_id":225171,"topic_slug":"on-documentation-formatting","display_username":"Alexander Kurakin","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"read":true,"user_title":null,"bookmarked":false,"actions_summary":[],"moderator":false,"admin":false,"staff":false,"user_id":70673,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/on-documentation-formatting/225171/3","can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":478928,"name":"Valérian Rey","username":"valerian.rey","avatar_template":"/user_avatar/discuss.pytorch.org/valerian.rey/{size}/74283_2.png","created_at":"2026-07-14T13:27:40.715Z","cooked":"\u003cblockquote\u003e\n\u003cp\u003eBut it is a systematic issue. What about a systematic solution?\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eThat would be nice yeah. Do you think it’s possible to create a kind of documentation linter to check / fix this? As far as I know, documentation linting libraries are pretty bad in Python. There are projects like \u003ca href=\"https://github.com/PyCQA/docformatter\" class=\"inline-onebox\" rel=\"noopener nofollow ugc\"\u003eGitHub - PyCQA/docformatter: Formats docstrings to follow PEP 257 · GitHub\u003c/a\u003e but it’s not good enough (and it doesnt do anything for text highlighting I think) and not very active. So it’s probably easier to just create you own script for that. But there will always be some ambiguous cases I think, so this script alone cannot fix everything. Maybe AI can also help but it’s gonna be a huge waste of token if it’s regularly run against the whole codebase.\u003c/p\u003e\n\u003cp\u003eBtw to get your PRs reviewed I think you should comment: \u003ccode\u003e@pytorchbot label \"module: docs\"\u003c/code\u003e, which will automatically tag the people responsible for the docs.\u003c/p\u003e","post_number":4,"post_type":1,"posts_count":5,"updated_at":"2026-07-14T13:27:40.715Z","reply_count":0,"reply_to_post_number":3,"quote_count":0,"incoming_link_count":0,"reads":4,"readers_count":3,"score":0.8,"yours":false,"topic_id":225171,"topic_slug":"on-documentation-formatting","display_username":"Valérian Rey","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"link_counts":[{"url":"https://github.com/PyCQA/docformatter","internal":false,"reflection":false,"title":"GitHub - PyCQA/docformatter: Formats docstrings to follow PEP 257 · GitHub","clicks":0}],"read":true,"user_title":null,"reply_to_user":{"id":70673,"username":"kuraga","name":"Alexander Kurakin","avatar_template":"/user_avatar/discuss.pytorch.org/kuraga/{size}/68422_2.png"},"bookmarked":false,"actions_summary":[],"moderator":false,"admin":false,"staff":false,"user_id":81227,"hidden":false,"trust_level":2,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/on-documentation-formatting/225171/4","can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null},{"id":478929,"name":"Alexander Kurakin","username":"kuraga","avatar_template":"/user_avatar/discuss.pytorch.org/kuraga/{size}/68422_2.png","created_at":"2026-07-14T14:19:12.063Z","cooked":"\u003cp\u003eThe second (first?) part is review traditions (on documentation strings).\u003c/p\u003e\n\u003cp\u003eBTW, PyTorch’s \u003ca href=\"https://github.com/pytorch/pytorch/wiki/Docstring-Guidelines\" rel=\"noopener nofollow ugc\"\u003eDocstring Guidelines\u003c/a\u003e lists just \u003cem\u003esome\u003c/em\u003e of those rules.\u003c/p\u003e","post_number":5,"post_type":1,"posts_count":5,"updated_at":"2026-07-14T14:19:12.063Z","reply_count":0,"reply_to_post_number":null,"quote_count":0,"incoming_link_count":0,"reads":3,"readers_count":2,"score":0.6,"yours":false,"topic_id":225171,"topic_slug":"on-documentation-formatting","display_username":"Alexander Kurakin","primary_group_name":null,"flair_name":null,"flair_url":null,"flair_bg_color":null,"flair_color":null,"flair_group_id":null,"badges_granted":[],"version":1,"can_edit":false,"can_delete":false,"can_recover":false,"can_see_hidden_post":false,"can_wiki":false,"link_counts":[{"url":"https://github.com/pytorch/pytorch/wiki/Docstring-Guidelines","internal":false,"reflection":false,"title":"Docstring Guidelines · pytorch/pytorch Wiki · GitHub","clicks":0}],"read":true,"user_title":null,"bookmarked":false,"actions_summary":[],"moderator":false,"admin":false,"staff":false,"user_id":70673,"hidden":false,"trust_level":1,"deleted_at":null,"user_deleted":false,"edit_reason":null,"can_view_edit_history":true,"wiki":false,"post_url":"/t/on-documentation-formatting/225171/5","can_accept_answer":false,"can_unaccept_answer":false,"accepted_answer":false,"topic_accepted_answer":null}],"stream":[478923,478924,478925,478928,478929]},"timeline_lookup":[[1,1],[4,0]],"suggested_topics":[{"fancy_title":"JFI:SSI_with_physisical_AI","id":221949,"title":"JFI:SSI_with_physisical_AI","slug":"jfi-ssi-with-physisical-ai","posts_count":1,"reply_count":0,"highest_post_number":1,"image_url":null,"created_at":"2025-07-30T12:08:35.281Z","last_posted_at":"2025-07-30T12:08:35.319Z","bumped":true,"bumped_at":"2025-07-30T12:08:35.319Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"like_count":0,"views":51,"category_id":1,"featured_link":null,"op_like_count":0,"has_accepted_answer":false,"posters":[{"extras":"latest single","description":"Original Poster, Most Recent Poster","user":{"id":85297,"username":"Anand_Gupta","name":"Anand Gupta","avatar_template":"/user_avatar/discuss.pytorch.org/anand_gupta/{size}/77830_2.png","trust_level":0}}]},{"fancy_title":"Ignore specific GPU with pytorch in Anaconda","id":222746,"title":"Ignore specific GPU with pytorch in Anaconda","slug":"ignore-specific-gpu-with-pytorch-in-anaconda","posts_count":4,"reply_count":2,"highest_post_number":4,"image_url":null,"created_at":"2025-08-29T15:35:12.554Z","last_posted_at":"2025-08-29T22:46:24.736Z","bumped":true,"bumped_at":"2025-08-29T22:46:24.736Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"like_count":0,"views":380,"category_id":1,"featured_link":null,"op_like_count":0,"has_accepted_answer":true,"posters":[{"extras":"latest","description":"Original Poster, Most Recent Poster, Accepted Answer","user":{"id":85685,"username":"Asmaron","name":"","avatar_template":"/user_avatar/discuss.pytorch.org/asmaron/{size}/74608_2.png","trust_level":1}},{"extras":null,"description":"Frequent Poster","user":{"id":18088,"username":"KFrank","name":"K. Frank","avatar_template":"/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png","trust_level":2}}]},{"fancy_title":"Cleanup for multiprocess DataLoader","id":222303,"title":"Cleanup for multiprocess DataLoader","slug":"cleanup-for-multiprocess-dataloader","posts_count":1,"reply_count":0,"highest_post_number":1,"image_url":null,"created_at":"2025-08-13T00:47:22.595Z","last_posted_at":"2025-08-13T00:47:22.649Z","bumped":true,"bumped_at":"2025-08-13T00:47:22.649Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"like_count":0,"views":66,"category_id":1,"featured_link":null,"op_like_count":0,"has_accepted_answer":false,"posters":[{"extras":"latest single","description":"Original Poster, Most Recent Poster","user":{"id":23169,"username":"markl","name":"","avatar_template":"/user_avatar/discuss.pytorch.org/markl/{size}/16511_2.png","trust_level":2}}]},{"fancy_title":"Help \u0026lsquo;NoneType\u0026rsquo; object has no attribute \u0026lsquo;shape\u0026rsquo;","id":222795,"title":"Help 'NoneType' object has no attribute 'shape'","slug":"help-nonetype-object-has-no-attribute-shape","posts_count":2,"reply_count":0,"highest_post_number":2,"image_url":"https://discuss.pytorch.org/uploads/default/optimized/3X/0/1/018eae771de1f32886c63e9a627adb04bed356d7_2_1024x326.png","created_at":"2025-09-01T02:05:44.512Z","last_posted_at":"2025-09-01T04:49:41.923Z","bumped":true,"bumped_at":"2025-09-01T04:49:41.923Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"like_count":0,"views":74,"category_id":1,"featured_link":null,"op_like_count":0,"has_accepted_answer":false,"posters":[{"extras":null,"description":"Original Poster","user":{"id":85702,"username":"kdxcj","name":null,"avatar_template":"/letter_avatar_proxy/v4/letter/k/e47774/{size}.png","trust_level":0}},{"extras":"latest","description":"Most Recent Poster","user":{"id":67276,"username":"Arunprakash-A","name":"Arun Prakash A","avatar_template":"/user_avatar/discuss.pytorch.org/arunprakash-a/{size}/78115_2.png","trust_level":2}}]},{"fancy_title":"Mm() implementation in pytorch for CPU","id":223461,"title":"Mm() implementation in pytorch for CPU","slug":"mm-implementation-in-pytorch-for-cpu","posts_count":1,"reply_count":0,"highest_post_number":1,"image_url":null,"created_at":"2025-10-04T16:24:31.244Z","last_posted_at":"2025-10-04T16:24:31.299Z","bumped":true,"bumped_at":"2025-10-04T16:24:31.299Z","archetype":"regular","unseen":false,"pinned":false,"unpinned":null,"visible":true,"closed":false,"archived":false,"bookmarked":null,"liked":null,"like_count":0,"views":72,"category_id":1,"featured_link":null,"op_like_count":0,"has_accepted_answer":false,"posters":[{"extras":"latest single","description":"Original Poster, Most Recent Poster","user":{"id":84265,"username":"subhojitdas","name":"Subhojit Das","avatar_template":"/user_avatar/discuss.pytorch.org/subhojitdas/{size}/77001_2.png","trust_level":1}}]}],"fancy_title":"On documentation formatting","id":225171,"title":"On documentation formatting","posts_count":5,"created_at":"2026-07-13T16:52:28.323Z","views":37,"reply_count":1,"like_count":1,"last_posted_at":"2026-07-14T14:19:12.063Z","visible":true,"closed":false,"archived":false,"has_summary":false,"archetype":"regular","slug":"on-documentation-formatting","category_id":1,"word_count":402,"deleted_at":null,"user_id":70673,"featured_link":null,"pinned_globally":false,"pinned_at":null,"pinned_until":null,"image_url":null,"slow_mode_seconds":0,"draft":null,"draft_key":"topic_225171","draft_sequence":null,"unpinned":null,"pinned":false,"current_post_number":1,"highest_post_number":5,"deleted_by":null,"actions_summary":[{"id":4,"count":0,"hidden":false,"can_act":false},{"id":8,"count":0,"hidden":false,"can_act":false},{"id":10,"count":0,"hidden":false,"can_act":false},{"id":7,"count":0,"hidden":false,"can_act":false}],"chunk_size":20,"bookmarked":false,"topic_timer":null,"message_bus_last_id":22,"participant_count":2,"show_read_indicator":false,"thumbnails":null,"slow_mode_enabled_until":null,"can_create_shared_issue":false,"shared_issue_visible":false,"can_vote":false,"vote_count":0,"user_voted":false,"discourse_zendesk_plugin_zendesk_id":null,"discourse_zendesk_plugin_zendesk_url":"https://your-url.zendesk.com/agent/tickets/","details":{"can_edit":false,"notification_level":1,"participants":[{"id":70673,"username":"kuraga","name":"Alexander Kurakin","avatar_template":"/user_avatar/discuss.pytorch.org/kuraga/{size}/68422_2.png","post_count":3,"primary_group_name":null,"flair_name":null,"flair_url":null,"flair_color":null,"flair_bg_color":null,"flair_group_id":null,"trust_level":1},{"id":81227,"username":"valerian.rey","name":"Valérian Rey","avatar_template":"/user_avatar/discuss.pytorch.org/valerian.rey/{size}/74283_2.png","post_count":2,"primary_group_name":null,"flair_name":null,"flair_url":null,"flair_color":null,"flair_bg_color":null,"flair_group_id":null,"trust_level":2}],"created_by":{"id":70673,"username":"kuraga","name":"Alexander Kurakin","avatar_template":"/user_avatar/discuss.pytorch.org/kuraga/{size}/68422_2.png"},"last_poster":{"id":70673,"username":"kuraga","name":"Alexander Kurakin","avatar_template":"/user_avatar/discuss.pytorch.org/kuraga/{size}/68422_2.png"},"links":[{"url":"https://github.com/pytorch/pytorch/blob/v2.13.0/torch/nn/modules/loss.py#L1410","title":"pytorch/torch/nn/modules/loss.py at v2.13.0 · pytorch/pytorch · GitHub","internal":false,"attachment":false,"reflection":false,"clicks":1,"user_id":70673,"domain":"github.com","root_domain":"github.com"},{"url":"https://github.com/pytorch/pytorch/pull/146247","title":"torch/nn/modules/conv.py: docs: improvements by kuraga · Pull Request #146247 · pytorch/pytorch · GitHub","internal":false,"attachment":false,"reflection":false,"clicks":1,"user_id":70673,"domain":"github.com","root_domain":"github.com"}]},"bookmarks":[]}