Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi ,get trouble with runing , when run to trainer.py for idx, data in enumerate(self.train_loader): it stop at here #14

Closed
Luo-Zhongwei opened this issue Sep 2, 2024 · 7 comments

Comments

@Luo-Zhongwei
Copy link

{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "MLKD+Ours", "type": "debugpy-old", "request": "launch", "program": "/home/linfeng/lzw/code/log_kd/tools/train.py", "args": [ "--cfg","configs/cifar100/mlkd/resnet32x4_resnet8x4.yaml", "--logit-stand", "--base-temp","2", "--kd-weight","9" ], "console": "integratedTerminal", "justMyCode": true } ] }

@Luo-Zhongwei
Copy link
Author

the above is vscode json ,the following is output
`['/home/linfeng/lzw/code/log_kd/tools', '/home/linfeng/anaconda3/envs/GVBSM36/lib/python36.zip', '/home/linfeng/anaconda3/envs/GVBSM36/lib/python3.6', '/home/linfeng/anaconda3/envs/GVBSM36/lib/python3.6/lib-dynload', '/home/linfeng/anaconda3/envs/GVBSM36/lib/python3.6/site-packages', '/home/linfeng/lzw/code/log_kd']
[INFO] CONFIG:
DATASET:
NUM_WORKERS: 2
TEST:
BATCH_SIZE: 64
TYPE: cifar100
DISTILLER:
STUDENT: resnet8x4
TEACHER: resnet32x4
TYPE: MLKD
EXPERIMENT:
LOGIT_STAND: true
NAME: ''
PROJECT: cifar100_baselines
TAG: MLKD,res32x4,res8x4
LOG:
PREFIX: ./output
SAVE_CHECKPOINT_FREQ: 40
TENSORBOARD_FREQ: 500
WANDB: false
SOLVER:
BATCH_SIZE: 64
EPOCHS: 480
LR: 0.025
LR_DECAY_RATE: 0.1
LR_DECAY_STAGES:

  • 150
  • 180
  • 210
    MOMENTUM: 0.9
    TRAINER: ours
    TYPE: SGD
    WEIGHT_DECAY: 0.0005

Files already downloaded and verified
Files already downloaded and verified
[INFO] Loading teacher model
[INFO] Extra parameters of MLKD: 0
0%| | 0/782 [00:00<?, ?it/s]`

@sunshangquan
Copy link
Owner

Hi @Zhongwei-Luo , I am not familiar with VScode configuration, but I guess the problem comes from data_loader. MLKD's codes used another set of data_loader with stronger augmentations. Could you try KD instead of MLKD first to make sure the issue does not come from the alternative data_loader? If possible, you could also try running codes with terminal commend line to make sure the problem does not come from VScode.

@Luo-Zhongwei
Copy link
Author

Hi @Zhongwei-Luo , I am not familiar with VScode configuration, but I guess the problem comes from data_loader. MLKD's codes used another set of data_loader with stronger augmentations. Could you try KD instead of MLKD first to make sure the issue does not come from the alternative data_loader? If possible, you could also try running codes with terminal commend line to make sure the problem does not come from VScode.

hi, KD,MLKD, DKD don't work hh, both of them. and alought I already install mdistiller,but when I run command in terminal I will get error "no module mdistiller",but If I use vscode json config to run code ,this won't happen hh

@sunshangquan
Copy link
Owner

Thanks for your response. Since I did not try our codes on vscode, I thus cannot provide any helpful suggestions for your vscode issue. But regarding your current issue on terminal, I find a similar issue and potential solution. You could follow the instruction if possible.

@Luo-Zhongwei
Copy link
Author

Thanks for your response. Since I did not try our codes on vscode, I thus cannot provide any helpful suggestions for your vscode issue. But regarding your current issue on terminal, I find a similar issue and potential solution. You could follow the instruction if possible.

Hi, I will try your solution ,but what is more, I dont think the problem is caused by vscode, another person create a new paper based on your code,[https://github.com/zju-swj/rld?tab=readme-ov-file] it is Knowledge Distillation with Refined Logits, but I could run it without problem. so back to the origin problem , when I running your logit std code ,stuck when run to [for idx, data in enumerate(self.train_loader):] in trainer.py

@sunshangquan
Copy link
Owner

Thank you for your information. I will try reproducing the first issue and update if any solution is found. For now, you could alternatively try running on the terminal and addressing the issue of no module mdistiller. If it still cannot work, please feel free to raise further issues.

@Luo-Zhongwei
Copy link
Author

感谢您的信息。我会尝试重现第一个问题,如果找到任何解决方案,我会更新。目前,您也可以尝试在终端上运行并解决 的问题no module mdistiller。如果仍然无法正常工作,请随时提出进一步的问题。

thank you very much! I found solution,and find problem is vscode itself ,lol ! https://stackoverflow.com/questions/53660465/vscode-bug-with-pytorch-dataloader running code using vscode need get dataloader with num_workers=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants