from yacs.config import CfgNode as CN

_C = CN()

_C.NAME = ""
_C.SAVE_PSEUDO_LABLES = False # For Stage 2 only
_C.SEED = 0                   # For stage 1

_C.DATA = CN()
_C.DATA.ROOT = ""            # For stage 1
_C.DATA.NUM_CLASSES = 0      # For stage 1
_C.DATA.MODE = ""            # CHECK
_C.DATA.PSEUDO_LABEL_FOLDER = []
_C.DATA.BATCH_SIZE = 0       # For stage 1
_C.DATA.CROP_SIZE = ()       # For stage 1
_C.DATA.DATASET = ""         # For stage 1
_C.DATA.AUG=False          # For stage 2

_C.MODEL = CN()
_C.MODEL.WEIGHTS = ""       # For stage 1
_C.MODEL.ROI_SIZE = []      # For Stage 1&2
_C.MODEL.GRID_SIZE = 0      # For Stage 1&2
_C.MODEL.GAP = False          # For stage 1
_C.MODEL.BG_THRESHOLD = 0.  # For Stage 2 only
_C.MODEL.FREEZE_BN = False  # For Stage 3
_C.MODEL.LAMBDA = 0.        # For Stage 3 only
_C.MODEL.TEMPERATURE = 0.
_C.MODEL.DCRF= []           # For Stage 2&3
_C.MODEL.SAVING= False      # For stage 1
_C.MODEL.SAVE_AFTER_N_EPOCHS= 0      # For stage 1
_C.MODEL.SAVE_AFTER_N_STEPS= 0      # For stage 1
_C.MODEL.SAVE_DIR=""        # For stage 1
_C.MODEL.USE_BEST=False     # For stage 1
_C.MODEL.LOSS = ""          # For stage 3
_C.MODEL.EVAL_INTERVAL= 0   # For stage 3

_C.SOLVER = CN()
_C.SOLVER.LR = 0.           # For stage 1
_C.SOLVER.MOMENTUM = 0.     # For stage 1
_C.SOLVER.WEIGHT_DECAY = 0. # For stage 1
_C.SOLVER.MAX_ITER = 0      # For stage 1
_C.SOLVER.MAX_EPOCH = 0      # For stage 1
_C.SOLVER.MILESTONES = []   # For Stage 1 only
_C.SOLVER.GAMMA = 0.        # For Stage 3 only
_C.SOLVER.STEP_SIZE = 0.        # For Stage 3 only

_C.LOGGER=CN()              # For stage 1
_C.LOGGER.TYPE=""           # For stage 1,2&3
_C.LOGGER.LOGGING=False     # For stage 1,2&3
_C.LOGGER.NAME=""     # For stage 1,2&3
_C.LOGGER.PROJECT=""        # For stage 1,2&3
_C.LOGGER.ID=""             # For stage 1,2&3
_C.LOGGER.RESUME=False      # For stage 1&3
_C.LOGGER.CHECKPOINT=None   # For stage 1&3