Skip to content

Cleanup namings of Multi-weights classes and enums #5003

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

Merged
merged 5 commits into from
Nov 29, 2021

Conversation

datumbox
Copy link
Contributor

@datumbox datumbox commented Nov 29, 2021

Fixes partially #4652

  • Rename classes Weights => WeightsEnum and WeightEntry => Weights
  • Make enum values follow the naming convention _V1, _V2 etc
  • Cleanup the Enum class naming conventions. We settled on the following convention: We will use proper casing so that the class names are more readable but their lowercased names should be capitalized(model_builder_name) + "_Weights" or capitalized(model_builder_name) + "_QuantizedWeights".

cc @datumbox @bjuncek

@facebook-github-bot
Copy link

facebook-github-bot commented Nov 29, 2021

💊 CI failures summary and remediations

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


  • 3/3 failures introduced in this PR

3 failures not recognized by patterns:

Job Step Action
CircleCI binary_linux_wheel_py3.6_rocm4.2 packaging/build_wheel.sh 🔁 rerun
CircleCI binary_linux_wheel_py3.7_rocm4.2 packaging/build_wheel.sh 🔁 rerun
CircleCI binary_linux_wheel_py3.7_rocm4.3.1 packaging/build_wheel.sh 🔁 rerun

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.

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

LGTM when green, thanks

@datumbox datumbox force-pushed the prototype/cleanup_api branch 2 times, most recently from 32a2505 to aca9b51 Compare November 29, 2021 13:37
@datumbox datumbox changed the title Cleanup and Refactor Multi-weights API Cleanup namings of Multi-weights classes and enums Nov 29, 2021
Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Looked at each commit independently, still LGTM :)

@datumbox datumbox force-pushed the prototype/cleanup_api branch from aca9b51 to 5d3500e Compare November 29, 2021 14:28
@datumbox datumbox merged commit b9da6db into pytorch:main Nov 29, 2021
@datumbox datumbox deleted the prototype/cleanup_api branch November 29, 2021 15:39
@github-actions
Copy link

Hey @datumbox!

You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

@datumbox datumbox linked an issue Nov 29, 2021 that may be closed by this pull request
5 tasks
facebook-github-bot pushed a commit that referenced this pull request Dec 2, 2021
Summary:
* Rename classes Weights => WeightsEnum and WeightEntry => Weights.

* Make enum values follow the naming convention `_V1`, `_V2` etc

* Cleanup the Enum class naming conventions.

* Add a test to check naming conventions.

Reviewed By: NicolasHug

Differential Revision: D32759196

fbshipit-source-id: 5348a432dc439cad21fbb1db507b21edcbeb7ece
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi pretrained weights: Cleanups and Refactoring
3 participants