-
Notifications
You must be signed in to change notification settings - Fork 446
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
Refactoring detection task #3860
Refactoring detection task #3860
Conversation
cc6cf41
to
7a3b01d
Compare
392f59d
to
3d7187b
Compare
@kprokofi @harimkang We changed modules' names that are affected by factory class to
|
Honestly, I think it's better to make factory function than factory class. Recently, factory class with |
Yes, I think it's a problem that class SSDHead: ...
class SSDHeadBuilder:
SSDHEAD_CFG: ClassVar[dict[str, Any]] = {...}
def __new__(cls, version: str, ...):
...
return SSDHead(**SSDHEAD_CFG[version], ...) For factory function, we can use below: SSDHEAD_CFG: dict[str, Any] = {...}
def ssd_head_builder(version: str, ...):
...
return SSDHead(**SSDHEAD_CFG[version], ...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work :)
I agree overall direction of this PR, I have a one thing to discuss.
I'm not sure that we should change every module like a factory class even if that module supports single case. IMHO, it's better to leave it as it is and change it later if that module needs to support multiple cases.
How do you think about that?
src/otx/algo/common/utils/prior_generators/base_prior_generator.py
Outdated
Show resolved
Hide resolved
Yeah, it seems unnecessary but I think it must exist for scalability and unified structure. |
Summary
This PR includes:
How to test
Checklist
License
Feel free to contact the maintainers if that's a concern.