Skip to content

NameError when trying to evaluate model type - 'VideoChat2_it4_mistral_LinearProAda' not defined #5

@Joker-QDS

Description

@Joker-QDS

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions