Commit 5d7dfaba authored by Matthew Yu's avatar Matthew Yu Committed by Facebook GitHub Bot
Browse files

add basic logging

Summary:
Pull Request resolved: https://github.com/facebookresearch/d2go/pull/422

Add a logger to distillation so we can check when distillation is applied

Reviewed By: XiaoliangDai

Differential Revision: D40375046

fbshipit-source-id: bb1d821fa26fb2da75e82122a30307fcccf7e558
parent 419974bb
......@@ -13,6 +13,7 @@
# We use two additional registries so that users can select their
# distillation algorithms in configs: DISILLATION_ALAGORITHM, DISTILLATION_HELPER
import logging
from abc import abstractmethod
from dataclasses import dataclass
from typing import Callable, Dict, List, Optional, Set, Union
......@@ -30,6 +31,9 @@ from detectron2.utils.file_io import PathManager
from mobile_cv.common.misc.mixin import dynamic_mixin, remove_dynamic_mixin
logger = logging.getLogger(__name__)
def add_distillation_configs(_C: CN) -> None:
"""Add default parameters to config
......@@ -411,6 +415,7 @@ class DistillationModelingHook(mh.ModelingHook):
super().forward(...) # call MyModel.forward
...
"""
logger.info("Applying distillation")
dynamic_mixin(
model,
self.distillation_algorithm_class,
......
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