I'm encountering a NameError when trying to dynamically load a model class using eval(args.model_type). The error occurs because Python cannot find the class VideoChat2_it4_mistral_LinearProAda in the current namespace.
NameError Traceback (most recent call last)
Cell In[9], line 112
108 print("vision_encoder.num_frames:", cfg.model.vision_encoder.num_frames)
109 # cfg.model.vision_encoder.num_frames = 4
--> 112 model_cls = eval(args.model_type)
113 # model = VideoChat2_it_mistral(config=cfg.model)
114 model = model_cls(config=cfg.model)
File :1
NameError: name 'VideoChat2_it4_mistral_LinearProAda' is not defined