Skip to content

Fixed typo in documentation of LazyModuleMixin#76269

Closed
sugatoray wants to merge 1 commit intopytorch:masterfrom
sugatoray:docs/fix_typo_lazymodules
Closed

Fixed typo in documentation of LazyModuleMixin#76269
sugatoray wants to merge 1 commit intopytorch:masterfrom
sugatoray:docs/fix_typo_lazymodules

Conversation

@sugatoray
Copy link
Contributor

@sugatoray sugatoray commented Apr 23, 2022

  • What changed?
    • On line #92 there was a typo (mlp). Changed it to lazy_mlp.
- >>> lazy_mlp = mlp.cuda().double()
+ >>> lazy_mlp = lazy_mlp.cuda().double()

Closes #76269.

>>> lazy_mlp = LazyMLP()
>>> # transforms the network's device and dtype
>>> # NOTE: these transforms can and should be applied after construction and before any 'dry runs'
>>> lazy_mlp = mlp.cuda().double()
>>> lazy_mlp

The labels should be:

  • release notes: lazy
  • topic: documentation

- was `mlp` --> changed to `lazy_mlp`
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Apr 23, 2022

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 273820b (more details on the Dr. CI page):

Expand to see more

💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@sugatoray
Copy link
Contributor Author

cc: @albanD @jbschlosser

@mrshenli
Copy link
Contributor

@pytorchbot merge this please

@github-actions
Copy link
Contributor

Hey @sugatoray.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@sugatoray
Copy link
Contributor Author

sugatoray commented Apr 25, 2022

@mrshenli I am not sure if this was merged/fixed? Am I supposed to do anything else? I see that @github-actions bot left some notes. I am kind of new to this and so, will be helpful, if you could tell me if I have any action item pending on my part.

Thank you.

@sugatoray
Copy link
Contributor Author

the labels should be:

  • release notes: lazy
  • topic: documentation

@albanD albanD added release notes: nn release notes category topic: docs topic category labels Apr 25, 2022
facebook-github-bot pushed a commit that referenced this pull request Apr 26, 2022
Summary:
- What changed?
	- On line `#92` there was a typo (`mlp`). Changed it to `lazy_mlp`.

```diff
- >>> lazy_mlp = mlp.cuda().double()
+ >>> lazy_mlp = lazy_mlp.cuda().double()
```

- Docs: [`LazyModuleMixin`](https://pytorch.org/docs/1.11/_modules/torch/nn/modules/lazy.html#LazyModuleMixin)

Closes #76269.

https://github.com/pytorch/pytorch/blob/1a7e43be141ce01469d7605075cb1008bf19abd7/torch/nn/modules/lazy.py#L89-L93

Pull Request resolved: #76269
Approved by: https://github.com/mrshenli

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/f980c3c193d576736ab3490d6d02d3c80a6bf7cc

Reviewed By: seemethere

Differential Revision: D35900440

Pulled By: seemethere

fbshipit-source-id: ef8bcacbbee9079fa8992dd5acd16b789cabcbf8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants