Abstract image processor arg checks.#28843
Conversation
|
Also linked to #28711 as I discovered logic flow issues here, seems fitting to abstract them separately and deal with the actual processing in the main PR. Here I'll try to stick to verifications and fix what's necessary to satisfy existing tests. |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
amyeroberts
left a comment
There was a problem hiding this comment.
Looks great - so much tidier 🤩 Thanks for abstracting this out!
Let me know when it's ready for final review
amyeroberts
left a comment
There was a problem hiding this comment.
Looks great! Thanks for working on this and tidying all this code up 🧹 🧹 🧹
Just a few small comments
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
|
@amyeroberts I think it's ok to take another look at this one now! Improved a few things, didn't add much, will rebase the other refactor off of that one |
amyeroberts
left a comment
There was a problem hiding this comment.
Looks great - thanks for working on this!
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
What does this PR do?
This refactors existing image processor argument checks that sprawl out on all existing models that have an
ImageProcessor.Lines such as
can be abstracted away in a
validate...function residing inimage_utils.Also, fixing (when it doesn't break BC) some cases where existence of arguments is checked, but the actual
preprocessmethod doesn't seem to call them.bridgetowerdoesn't passcenter_cropfrom init,chinese_clipdoes notconvert_to_rgb, and so on.Who can review?
@amyeroberts