Conversation
💊 CI failures summary and remediationsAs of commit 6d0cc8e (more details on the Dr. CI page): 💚 💚 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. |
06ec3ca to
fdc9d2a
Compare
fdc9d2a to
5c0ec62
Compare
5c0ec62 to
3339918
Compare
|
The references were validated by running the following commands. All work as expected: |
NicolasHug
left a comment
There was a problem hiding this comment.
Thanks @datumbox , I made some minor comments and a question, but this LGTM
|
|
||
|
|
||
| def get_weight(fn: Callable, weight_name: str) -> WeightsEnum: | ||
| def get_weight(name: str) -> WeightsEnum: |
There was a problem hiding this comment.
I'm wondering: shoudn't this return a Weight instance, instead of WeightsEnum?
Same for from_str (and in the return section below).
There was a problem hiding this comment.
I think we need to return a WeightsEnum value. That is the value of an Enum which maintains information about the class it comes from (ResNet50_Weights). Returning a Weights loses the information necessary to validate that the right type of weights were passed to the method.
Summary: * Change the `default` weights mechanism to sue Enum aliases. * Change `get_weights` to work with full Enum names and make it public. * Applying improvements from code review. Reviewed By: NicolasHug Differential Revision: D32759199 fbshipit-source-id: 13cfa6201125db29f099d2e3a73260d62341a205
Fixes #4652
defaultweights mechanism to sue Enum aliases.get_weightsto work with full Enum names and make it public.cc @datumbox @bjuncek