Skip to content

Fixed parts of issue #56 #60

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 4 commits into from
Closed

Conversation

swayam0322
Copy link

@swayam0322 swayam0322 commented Jun 5, 2024

Fixed parts of issue #56 under Docathon-24:

  • Add doc for TOR102 torch.load without weights_only parameter is unsafe
  • Add doc for TOR104 Use of non-public function
  • Add doc for TOR201 Find and fix deprecated pretrained parameters in TorchVision models
  • Add doc for TOR202 The transform v2.ToTensor() is deprecated
  • Add doc for TOR203 Consider replacing 'import torchvision.models as models'
  • Add doc for TOR401 Detected DataLoader running with synchronized implementation

@facebook-github-bot
Copy link

Hi @swayam0322!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 5, 2024
@swayam0322 swayam0322 changed the title Add doc for TOR102 torch.load without weights_only parameter is unsafe Fixed parts of issue #56 Jun 5, 2024
Copy link
Contributor

@kit1980 kit1980 left a comment

Choose a reason for hiding this comment

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

Standalone code blocks (with 3 backtics) look out of place, please make them inline or maybe remove.

README.md Outdated
Each boolean input parameter (defaulting to true unless specified) of `sdp_kernel` corresponds to a `SDPBackened`. If the input parameter is true, the corresponding backend should be added to the input list of `sdpa_kernel`.

### TOR102 Unsafe use of function

#### torch.load
Copy link
Contributor

Choose a reason for hiding this comment

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

There should not be a level 3 and level 4 header, as TOR102 is just one item.
See TOR003 for example.

README.md Outdated

For better maintainability and compatibility, please use the public function `torch.utils.data.dataloader.default_collate` instead.

### TOR201 Use of deprecated parameter
Copy link
Contributor

Choose a reason for hiding this comment

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

There should not be a level 3 and level 4 header, as TOR102 is just one item.
See TOR003 for example.

The title should be specific for the issue, not generic.

README.md Outdated
model = SomeModel(weights='<path_or_identifier_to_weights>')
```

### TOR202 Use of deprecated function
Copy link
Contributor

Choose a reason for hiding this comment

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

There should not be a level 3 and level 4 header, as TOR102 is just one item.
See TOR003 for example.

The title should be specific for the issue, not generic.

@swayam0322
Copy link
Author

@kit1980 Made the necessary changes

@swayam0322 swayam0322 requested a review from kit1980 June 7, 2024 21:15
README.md Outdated

Migration Guide:

Explicitly set `weights_only=False` only if you trust the data you load and full pickle functionality is needed,
Copy link
Contributor

Choose a reason for hiding this comment

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

Only part of the sentence?

Copy link
Author

Choose a reason for hiding this comment

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

Added the remaining text

README.md Outdated

### TOR401 Detected DataLoader running with synchronized implementation

Running synchronized implementations on `DataLoader` can lead to loss in data loading performance, especially when dealing with large datasets. A viable solution is to set the `num_workers` parameter to be greater than 0 when initializing the DataLoader class. This would parallelize the loading operations and would significantly increase performance.
## License
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be an empty line before a header.

Minor alterations
@swayam0322 swayam0322 requested a review from kit1980 June 17, 2024 20:02
Each boolean input parameter (defaulting to true unless specified) of `sdp_kernel` corresponds to a `SDPBackened`. If the input parameter is true, the corresponding backend should be added to the input list of `sdpa_kernel`.

Each boolean input parameter (defaulting to true unless specified) of `sdp_kernel` corresponds to a `SDPBackened`.
If the input parameter is true, the corresponding backend should be added to the input list of `sdpa_kernel`.
Copy link
Contributor

Choose a reason for hiding this comment

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

This sentence doesn't make sense to me. "added to the input list of sdpa_kernel" - but we are removing sdp_kernel.


### TOR201 Parameter `pretrained` is deprecated, please use `weights` instead.

The parameter `pretrained` has been deprecated in TorchVision models since PyTorch version 1.12.0. The `weights` parameter should be used instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't make sense.

@kit1980
Copy link
Contributor

kit1980 commented Jun 21, 2024

Sorry, I'm going to close this PR as a lot of things don't make sense even on a cursory reading, and correcting this takes more effort than doing from scratch.

@kit1980 kit1980 closed this Jun 21, 2024
@swayam0322 swayam0322 deleted the docs branch June 21, 2024 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. docathon-h1-2024 easy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants