diff --git a/vitookit/evaluation/eval_cls.py b/vitookit/evaluation/eval_cls.py index e0896cff0c0291a6bb21aff0117389deb8c1a646..de4568bc1992cbdfb423061aad6dcb01845ed27c 100644 --- a/vitookit/evaluation/eval_cls.py +++ b/vitookit/evaluation/eval_cls.py @@ -265,7 +265,7 @@ def main(args): misc.init_distributed_mode(args) print(args) - + import torch device = torch.device(args.device) # fix the seed for reproducibility diff --git a/vitookit/evaluation/eval_cls_ffcv.py b/vitookit/evaluation/eval_cls_ffcv.py index e9d399e444dcfdcb9183162b93e563f2906ae6d4..0ee6485c0ae9930c41c3966ea5f69b42ea4cff4c 100644 --- a/vitookit/evaluation/eval_cls_ffcv.py +++ b/vitookit/evaluation/eval_cls_ffcv.py @@ -1,13 +1,10 @@ #!/usr/bin/env python -# Copyright (c) ByteDance, Inc. and its affiliates. -# All rights reserved. -# -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. + """ -Mostly copy-paste from DEiT library: -https://github.com/facebookresearch/deit/blob/main/main.py +Example: +vitrun --nproc_per_node=3 eval_cls_ffcv.py --train_path $train_path --val_path $val_path --gin VisionTransformer.global_pool='\"avg\"' -w wandb:dlib/EfficientSSL/xsa4wubh --batch_size 360 --output_dir outputs/cls + """ from PIL import Image # hack to avoid `CXXABI_1.3.9' not found error diff --git a/vitookit/utils/helper.py b/vitookit/utils/helper.py index 6eb89d34caed54147076ad52817fc6968338f512..d16aefa47ec3dc43a29d2db4168cbd54ba5947a5 100644 --- a/vitookit/utils/helper.py +++ b/vitookit/utils/helper.py @@ -106,6 +106,7 @@ def restart_from_checkpoint(ckp_path, run_variables=None, **kwargs): Re-start from checkpoint """ if not os.path.isfile(ckp_path): + print("the file doesn't exist") return print("Found checkpoint at {}".format(ckp_path)) if ckp_path.startswith('https'):