This repository has been archived by the owner on Nov 21, 2023. It is now read-only.
Modularize the detectron library in a single python detectron module. #265
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the setup.py in the detectron repo installs an assortment of modules with names like utils, ops, datasets, and core. These names are not descriptive on their own. Considering namespaces are one honking great idea, I've done some initial work to consolidate all of these modules as submodules of a module called
detectron
.Therefore, when you would previously use
import core
, you now would writeimport detectron.core
orfrom detectron import core
.This restructure introduces a lot of changes even though there is really no new logic. I realize that this makes reviewing and merging a PR like this difficult. To try and alleviate this process I scripted everything that I did to get to the state of this PR. This more effectively summarizes the real changes, and allows for what I did to be reproduced in case of any rebasing issues.
Note that I've been unable to get Detectron to actually build and work outside the docker container, so my testing of these changes has thusfar been minimal. Its quite possible that I forgot to search and replace a pattern or that one of my patterns was incorrect.