VIDA-NYU / tile2net

Automated mapping of pedestrian networks from aerial imagery tiles
BSD 3-Clause "New" or "Revised" License
146 stars 22 forks source link

args.eval should be args.model.eval #57

Closed dhodcz2 closed 3 months ago

dhodcz2 commented 4 months ago

test_local passed "eval" is under "mdel.eval":

class Model(AttrDesc):
    ocr_extra = OcrExtra()
    ocr = Ocr()

    scale_min: float = None
    align_corners = None
    alt_two_scale = None
    aspp_bot_ch = None
    attnscale_bn_head = None
    bnfunc = None
    bn = None
    extra_scales = None
    grad_ckpt = None
    lr_scheduler: str = None
    mscale_cat_scale_flt = None
    mscale_dropout = None
    mscale = None
    mscale_init = None
    mscale_inner_3x3 = None
    mscale_lo_scale = None
    mscale_oldarch = None
    n_scales = None
    ocr_aspp = None
    optimizer: str = None
    rmi_loss = None
    segattn_bot_ch = None
    three_scale = None
    bs_trn: int = None
    img_wt_loss: bool = None
    bs_val: int = None
    color_aug: float = None
    gblur: bool = None
    bblur: bool = None
    full_crop_modeling = None
    eval: Optional[str] = None

replaced all instances of logx.msg with logger.debug and removed tensorboardx from repo

added test_namespace:

    top = os.path.join(
        __file__,
        '..',
        '..',
        'src',
        'tile2net',
    )
    top = os.path.abspath(top)
    attrs = AttributeAccesses(
        top=top,
        name='args',
        exclude={'tile2net/src/tile2net/tileseg/tests/', }
    )
    assert not attrs.misses

walks through a directory asserts each access t oargs e.g. args.loss_supervised_mscale_wt actually exists before it takes us a while to realize it through some unlikely sequence of logic

Fixed some discrepancies or missing argument destinations:

model.bs_val
model.eval
model.rand_augment
model.scale_min
model.scale_max
loss.supervised_mscale_loss