Open yrf1 opened 3 years ago
@yrf1 to run the gpt2 model you need the following command:
python main_dist.py <exp_name> --train.bs=... --train.bsv=... --task_type=vb_arg --mdl.mdl_name=new_gpt2_only
In general, you can find the command inside logs by Ctrl+F cmd
Let me know if you face any other issues.
Thanks, I have some follow-up questions:
1) How does the configs for calling on a pretrained verb prediction model match with the checkpoints released in this repo? The model checkpoints in EXPTs.md are pytorch checkpoints, but when I try to update the configs in configs/vsitu_mdl_cfgs/Kinetics_c2_SLOWFAST_8x8_R50.yaml
to the pytorch checkpoints (which is called from configs/vsitu_cfg.yml), I run into checkpoint loading errors.
VidSitu/SlowFast/slowfast/utils/checkpoint.py", line 270, in load_checkpoint
checkpoint["model_state"], model_state_dict_3d
KeyError: 'model_state'
I used the slow_fast_nl_r50_8x8 mdl_ep_10.pth.
I have trouble figuring the information out from looking through the log file corresponding to slow_fast_nl_r50_8x8 mdl_ep_10.pth because the "val" part in the log file shows an empty checkpoint path while the "train" part in the log file uses the caffe checkpoint which I think you guys already converted into pytorch before release.
@yrf1
So the config inside configs/vsitu_mdl_cfgs/Kinetics_c2_SLOWFAST_8x8_R50.yaml is for pre-trained Slowfast model trained over Kinetics.
But if you want to use some of our checkpoint, you should pass --train.resume='....' and --train.resume_path='/path/to/model'
Does that answer your question?
Hi @TheShadow29, thanks for the follow-up. So I'm still trying to apply pretrained VidSitu on my dataset. I tried running a command like python main_dist.py "experiment_name" --train.resume_path='weights/vbarg_sfastpret_txe_txd_18Feb21.pth'
for the semantic role labeling task using pretrained models, but it appears that the code calls on a data/vsitu_vid_feats
directory (from line 569 in vidsitu_code/dat_loader.py).
Should this have happened? If so, how should the video features be computed for running VidSitu on external data?
@yrf1 I see that I forgot to put up the feature extraction code. I will upload it within end of day. If you are in a hurry, it initializes SFBase model, and uses the head_out
after permute (https://github.com/TheShadow29/VidSitu/blob/main/vidsitu_code/mdl_sf_base.py#L195) and saves in npy file.
@yrf1 The feature extraction code is up now vidsitu_code/feat_extractor.py
Instructions are provided in DATA_PREP.md inside data/
Let me know if you face any issues.
@TheShadow29 thank you! I'll try it out right now
I ran
python main_dist.py "experiment_name"
without further specifying the --arg1 and --arg2 flags but gotSo we should be using sf_base instead of the GPT model in config?
Also, I think it'll be cool if there can be some instructions showing how VidSitu can be applied to external data (like the data preprocessing steps and change in commands for inference etc).