Commit 1a18ba34 authored by Mircea Cimpoi's avatar Mircea Cimpoi Committed by Facebook GitHub Bot
Browse files

Moving modeling hook registry to builtin

Summary:
Moving MODELING_HOOK_REGISTRY to `d2go/registry/builtin.py`, so that  bootstrap works with modeling hook registry.

This fixes the detectron2 vs mobile_cv registry.

Reviewed By: wat3rBro

Differential Revision: D37600026

fbshipit-source-id: 7aa8cdec3b5eaea89d9db6fc35c7389cc9fb3193
parent 57156eea
......@@ -5,15 +5,7 @@ from abc import abstractmethod
from typing import List
import torch
from detectron2.utils.registry import Registry
MODELING_HOOK_REGISTRY = Registry("MODELING_HOOK") # noqa F401 isort:skip
MODELING_HOOK_REGISTRY.__doc__ = """
Registry for modeling hook.
The registered object will be called with `obj(cfg)`
and expected to return a `ModelingHook` object.
"""
from d2go.registry.builtin import MODELING_HOOK_REGISTRY
class ModelingHook(object):
......
......@@ -22,6 +22,15 @@ CONFIG_UPDATER_REGISTRY = Registry("CONFIG_UPDATER")
# Registry for meta-arch, registered nn.Module should follow D2Go's meta-arch API
META_ARCH_REGISTRY = Registry("META_ARCH")
# Modeling hook registry
MODELING_HOOK_REGISTRY = Registry("MODELING_HOOK")
MODELING_HOOK_REGISTRY.__doc__ = """
Registry for modeling hook.
The registered object will be called with `obj(cfg)`
and expected to return a `ModelingHook` object.
"""
# Distillation algorithms
DISTILLATION_ALGORITHM_REGISTRY = Registry("DISTILLATION_ALGORITHM")
......
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