Skip to content

Commit

Permalink
small compatibility fixes (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
vturrisi authored Jan 25, 2022
1 parent d5b96da commit e8e2303
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions solo/args/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,10 @@ def additional_setup_linear(args: Namespace):

# create backbone-specific arguments
args.backbone_args = {"cifar": args.dataset in ["cifar10", "cifar100"]}

if "resnet" not in args.backbone:
# dataset related for all transformers
crop_size = args.crop_size[0]
args.backbone_args["img_size"] = crop_size

if "vit" in args.backbone:
args.backbone_args["patch_size"] = args.patch_size

Expand Down
3 changes: 2 additions & 1 deletion tests/utils/test_checkpointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def test_checkpointer():
"optimizer_states",
"lr_schedulers",
]
assert list(ckpt.keys()) == expected_keys
ckpt_keys = list(ckpt.keys())
assert all(k in ckpt_keys for k in expected_keys)

parser = argparse.ArgumentParser()
ckpt_callback.add_checkpointer_args(parser)
Expand Down

0 comments on commit e8e2303

Please sign in to comment.