Commit 421960b3 authored by Yanghan Wang's avatar Yanghan Wang Committed by Facebook GitHub Bot
Browse files

move fcos into meta_arch

Summary: FCOS is registered only because we make an import from `get_default_cfg`, if user don't call it (eg. using their own runner), they might find that the meta-arch is not registered.

Reviewed By: ppwwyyxx

Differential Revision: D31920026

fbshipit-source-id: 59eeeb3d1bf30d6b08463c2814930b1cadd7d549
parent cc7973c2
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# NOTE: making necessary imports to register with Registry # NOTE: making necessary imports to register with Registry
from . import fcos # noqa
...@@ -8,7 +8,7 @@ from d2go.data.build import ( ...@@ -8,7 +8,7 @@ from d2go.data.build import (
from d2go.data.config import add_d2go_data_default_configs from d2go.data.config import add_d2go_data_default_configs
from d2go.modeling import kmeans_anchors, model_ema from d2go.modeling import kmeans_anchors, model_ema
from d2go.modeling.backbone.fbnet_cfg import add_fbnet_v2_default_configs from d2go.modeling.backbone.fbnet_cfg import add_fbnet_v2_default_configs
from d2go.modeling.fcos import add_fcos_configs from d2go.modeling.meta_arch.fcos import add_fcos_configs
from d2go.modeling.model_freezing_utils import add_model_freezing_configs from d2go.modeling.model_freezing_utils import add_model_freezing_configs
from d2go.modeling.quantization import add_quantization_default_configs from d2go.modeling.quantization import add_quantization_default_configs
from d2go.modeling.subclass import add_subclass_configs from d2go.modeling.subclass import add_subclass_configs
......
...@@ -54,9 +54,9 @@ class BaseRegistryPopulationTests(object): ...@@ -54,9 +54,9 @@ class BaseRegistryPopulationTests(object):
class TestMetaArchRegistryPopulation(unittest.TestCase, BaseRegistryPopulationTests): class TestMetaArchRegistryPopulation(unittest.TestCase, BaseRegistryPopulationTests):
def setUp(self): def setUp(self):
import d2go.modeling.meta_arch import d2go.modeling
self._package = d2go.modeling.meta_arch self._package = d2go.modeling
def get_registered_items(self): def get_registered_items(self):
from detectron2.modeling import META_ARCH_REGISTRY from detectron2.modeling import META_ARCH_REGISTRY
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment