usail-hkust / RDAT

MIT License
12 stars 3 forks source link

error while run the code #1

Open alex-cse opened 8 months ago

alex-cse commented 8 months ago

hello, while I run the code on the pems4 dataset, it returns an error:

on both commands: //PeMS-D4 //pre-train policy net python train.py configs/PeMSD4/PeMSD4-train0.7-val0.1-test0.2-in12out12-STpgd0.1nodes0.5eps-none_dropout-gwnet-AT_policy_atten_epoch100-steps30-constant1e-03-start_index_learn-baseline_saliency-offine.yaml -d 0

python train.py configs/PeMSD4/PeMSD4-train0.7-val0.1-test0.2-in12out12-STpgd0.1nodes0.5eps-random-none_dropout-gwnet-AT_policy_atten_epoch100-steps30-constant1e-03-start_index_learn-baseline_saliency-offine-dist0.4.yaml -d 0

env: py3.8 ,torch 1.8.2+cu111 mmcv 1.62/ 1.7

error log: /home/xxx/miniconda3/envs/rdat/lib/python3.8/site-packages/mmcv/init.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details. warnings.warn( Using 1 GPUs. Using cuda [Default Configs]: load_from : None | log_level : INFO | white_box_attack : None | source_model_path : None | target_model_path : None | lr_dict : None | method : | load_modules : () | remark : | cpu_data : False | eval_freq : 5 | other_params : {} | load_model : None | deffer_opt : None | warmup_epochs : 0 | 2024-01-09 11:15:13,275 - INFO - Loading config file from configs/PeMSD4/PeMSD4-train0.7-val0.1-test0.2-in12out12-STpgd0.1nodes0.5eps-none_dropout-gwnet-AT_policy_atten_epoch100-steps30-constant1e-03-start_index_learn-baseline_saliency-offine.yaml 2024-01-09 11:15:13,275 - INFO - Models saved at ./checkpoints/PeMSD4/PeMSD4-train0.7-val0.1-test0.2-in12out12-STpgd0.1nodes0.5eps-none_dropout-gwnet-AT_policy_atten_epoch100-steps30-constant1e-03-start_index_learn-baseline_saliency-offine 2024-01-09 11:15:15,711 - INFO - Loading checkpoint from ./checkpoints/PeMSD4/PeMSD4-train0.7-val0.1-test0.2-in12out12-STpgd0.1nodes0.5eps-random-none_dropout-gwnet-AT_policy_atten_epoch100-steps30-constant1e-03-start_index_learn-baseline_saliency/policy_epoch100.pt for policynet Traceback (most recent call last): File "train.py", line 603, in main() File "train.py", line 482, in main policynet.load_state_dict(torch.load(load_path)) File "/home/xxx/miniconda3/envs/rdat/lib/python3.8/site-packages/torch/serialization.py", line 579, in load with _open_file_like(f, 'rb') as opened_file: File "/home/xxx/miniconda3/envs/rdat/lib/python3.8/site-packages/torch/serialization.py", line 230, in _open_file_like return _open_file(name_or_buffer, mode) File "/home/xxx/miniconda3/envs/rdat/lib/python3.8/site-packages/torch/serialization.py", line 211, in init super(_open_file, self).init(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: './checkpoints/PeMSD4/PeMSD4-train0.7-val0.1-test0.2-in12out12-STpgd0.1nodes0.5eps-random-none_dropout-gwnet-AT_policy_atten_epoch100-steps30-constant1e-03-start_index_learn-baseline_saliency/policy_epoch100.pt'

luckyfan-cs commented 8 months ago

The issue indicates that the pre-trained model policy_epoch100.pt is missing. To resolve this, you may need to first run the pre-trained model.

alex-cse commented 8 months ago

Thank you for the reply, may I know how to run the pre-trained model? it doesn't mentioned in the readme file.