Skip to content
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

SSL example update #1365

Merged
merged 5 commits into from
Nov 30, 2021
Merged

SSL example update #1365

merged 5 commits into from
Nov 30, 2021

Conversation

Scitator
Copy link
Member

Pull Request FAQ

Description

Related Issue

Type of Change

  • Examples / docs / tutorials / contributors update
  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Checklist

  • Have you updated tests for the new functionality?
  • Have you added your new classes/functions to the docs?
  • Have you updated the CHANGELOG?
  • Have you run colab minimal CI/CD with latest and minimal requirements?
  • Have you checked XLA integration with single and multiple processes?

def get_contrastive_model(
feature_dim: int, arch: str = "resnet50", frozen: bool = False
) -> ContrastiveModel:
def conv_block(in_channels, out_channels, pool=False):

Choose a reason for hiding this comment

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

[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function

return nn.Sequential(*layers)


def resnet9(in_size: int, in_channels: int, out_features: int, size: int = 16):

Choose a reason for hiding this comment

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

[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function

return nn.Sequential(*layers)


def resnet9(in_size: int, in_channels: int, out_features: int, size: int = 16):

Choose a reason for hiding this comment

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

[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function

)


def get_contrastive_model(in_size: int, feature_dim: int) -> ContrastiveModel:
"""Init contrastive model based on parsed parametrs.

Args:

Choose a reason for hiding this comment

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

[pep8] reported by reviewdog 🐶
DAR101 Missing parameter(s) in Docstring: - in_size

try:
train_data = DATASETS[dataset]["dataset"](root="data", train=True, download=True)
valid_data = DATASETS[dataset]["dataset"](root="data", train=False, download=True)
except:

Choose a reason for hiding this comment

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

[pep8] reported by reviewdog 🐶
B901 blind except: statement

try:
train_data = DATASETS[dataset]["dataset"](root="data", train=True, download=True)
valid_data = DATASETS[dataset]["dataset"](root="data", train=False, download=True)
except:

Choose a reason for hiding this comment

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

[pep8] reported by reviewdog 🐶
E722 do not use bare 'except'

try:
train_data = DATASETS[dataset]["dataset"](root="data", train=True, download=True)
valid_data = DATASETS[dataset]["dataset"](root="data", train=False, download=True)
except:

Choose a reason for hiding this comment

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

[pep8] reported by reviewdog 🐶
B001 Do not use bare except:, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:. If you're sure what you're doing, be explicit and write except BaseException:.

@pep8speaks
Copy link

pep8speaks commented Nov 30, 2021

Hello @Scitator! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 108:5: E722 do not use bare 'except'

Comment last updated at 2021-11-30 05:38:07 UTC

@Scitator Scitator merged commit 09d3876 into master Nov 30, 2021
@mergify mergify bot deleted the docs-update-2111-4 branch November 30, 2021 05:38
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.

2 participants