Move Defaults to to end of arg docstring and standardise values#1848
Move Defaults to to end of arg docstring and standardise values#1848SamuelMarks wants to merge 15 commits intokeras-team:masterfrom
Defaults to to end of arg docstring and standardise values#1848Conversation
ianstenbit
left a comment
There was a problem hiding this comment.
Thanks for the PR!
I chatted with the team and I think we're generally happy about this change -- thanks for the diligence here! I left one comment about structure, and then I'll dig through every little change once you've updated that 😄
# Conflicts: # keras_cv/models/backbones/mobilenet_v3/mobilenet_v3_backbone.py # keras_cv/models/backbones/resnet_v1/resnet_v1_backbone.py
…resnet_v1_backbone.py] Resolve conflicts ; [keras_cv/models/backbones/resnet_v1/resnet_v1_{aliases,backbone}.py] Re-apply defaults-to after merge of master
|
3 weeks has gone by, @ianstenbit did you need me to merge master and redo this? |
ianstenbit
left a comment
There was a problem hiding this comment.
Reviewed up through layers/preprocessing. I think may of the comments are repeats that will apply through the rest of the PR.
My apologies for the latency on this -- it's been a very busy few weeks and PR review has been slower.
| """ | ||
|
|
||
| # Try to detect an available TPU. If none is present, defaults to | ||
| # Try to detect an available TPU. If none is present. Defaults to |
There was a problem hiding this comment.
Let's undo this change for all the comments in examples.
| img_size: the size to resize the images to, defaults to None, indicating | ||
| that images should not be resized. | ||
| epoch. Defaults to `False`. | ||
| img_size: the size to resize the images to, when None, this indicates |
There was a problem hiding this comment.
Makes sense to me:
the size to resize the images to, when None, this indicates that images should not be resized. Defaults to
None.
There was a problem hiding this comment.
Sorry I just meant use backticks for None. GitHub is rendering my backticks which makes these comments less clear 😓
| used to download the data file, and unzip. It will be used as a | ||
| cache directory. Defaults to None, and `~/.keras/pascal_voc_2012` | ||
| will be used. | ||
| cache directory. When `None`: `~/.keras/pascal_voc_2012` |
There was a problem hiding this comment.
Maybe best to just say defaults to ~/.keras/pascal_voc_2012?
There was a problem hiding this comment.
But it doesn't default to that value? - It computes to it sure, but defaults to None.
I think the merge conflicts shouldn't be too bad if you want to merge from master. I left some comments on the first ~half, but it looks like there are some fixes that will need to be made through the rest as well. Thanks for the PR and my apologies for the review delay! |
# Conflicts: # keras_cv/bounding_box/converters.py # keras_cv/models/backbones/csp_darknet/csp_darknet_backbone.py # keras_cv/models/backbones/efficientnet_v2/efficientnet_v2_backbone.py # keras_cv/models/backbones/resnet_v1/resnet_v1_backbone.py # keras_cv/models/backbones/resnet_v2/resnet_v2_backbone.py # keras_cv/models/legacy/densenet.py # keras_cv/models/legacy/segmentation/deeplab.py
|
@ianstenbit Merged in latest master and applied the defaults to changes to more places. It should be ready to go now; merge quick before master deviates! |
ianstenbit
left a comment
There was a problem hiding this comment.
LGTM -- thank you!
Left a bunch of comments about tiny changes, but once those are in I can merge this. If you're able to make the changes today I can hold off on merging any other PRs to avoid merge conflicts.
Thanks again for the big cleanup!
| image. Defaults to `target_size`. | ||
| bounding_box_format: The format of bounding boxes of input boxes. | ||
| Refer to | ||
| https://github.com/keras-team/keras-cv/blob/master/keras_cv/bounding_box/converters.py |
There was a problem hiding this comment.
why drop the github.com prefix?
Will GitHub automagically render this link for us in the UI? That would be cool
There was a problem hiding this comment.
@ianstenbit Oh actually I think it was flake8 picking up a long line
examples/training/semantic_segmentation/pascal_voc/basic_training.py
Outdated
Show resolved
Hide resolved
… docstrings ; resolve nits from @ianstenbit
|
@ianstenbit Done |
It looks like MobileNet tests are failing -- I'd recommend reverting the change in the MobileNet backbone and merging from master |
|
@ianstenbit I'm confused, what is it you want me to do? git checkout master
git pull origin master # origin is keras-team/keras-cv
git checkout defaults-to
git merge master
git checkout master keras_cv/models/backbones/mobilenet_v3/mobilenet_v3_backbone_test.py
git checkout master keras_cv/models/backbones/mobilenet_v3/mobilenet_v3_aliases.py
git commit -S -a |
yeah that seems correct. Not clear what is causing this test failure, but I'd try reverting the changes to MobileNet (See my other comment) |
|
Weird, isn't that what my |
It could be another file. But |
# Conflicts: # keras_cv/models/legacy/efficientnet_lite.py # keras_cv/models/legacy/efficientnet_v1.py
# Conflicts: # keras_cv/models/legacy/efficientnet_lite.py # keras_cv/models/legacy/efficientnet_v1.py
|
@ianstenbit Ok I've merged in master again. If you like, I can split this PR up into many small ones. |
It looks like the CI is still failing -- I think it's probably still the MobileNet issue from before but please take a look. Thanks! |
What does this PR do?
Hey it's that annoying fellow again, the one from keras-team/keras#17748
Before submitting
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.