state-spaces/s4

"pretrained_model" is not defined before being called in train.py

francoisgermain opened this issue · 2 comments

I am not using this section of the code at the moment so I don't have a full grasp of the goal of that section, but neither my IDE nor I can find where pretrained_model would be defined before this call:

s4/train.py

Line 714 in a246043

pretrained_dict = pretrained_model.state_dict()

My best guess at the moment is that the following line should say pretrained_model rather than model:

s4/train.py

Line 704 in a246043

model = SequenceLightningModule.load_from_checkpoint(

(model is already defined a few lines before so this line actually overwrites it)

Makes sense?

It looks like a legacy codepath. Feel free to remove it.

I see. Well, considering someone might want to consider pretrained model, it could be a helpful starting point for whoever that is even if it's not functional as it is. That code won't be run without the associated hydra attributes anyway.

Thanks for clarifying. Closing.