DIEN model data error. #1226
-
I tried to operate autopsy on DIEN model. To do that, I need to get interaction data from dataloader. So what I did as below
The result of data_preparation() is as below
It seems to be fine, but when I do this, it says None type for training dataloader.
The error is below.
When I do for valid and test data,
I dont get the error andI get 4 outputs. I guess the 4 outputs come from NegSampleEvalDataLoader? Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@Jeriousman |
Beta Was this translation helpful? Give feedback.
@Jeriousman
Hello, thanks for your attention to RecBole!
The NoneType here refers to the model in train_data. This problem occurs because you have not passed the model of 'DIEN' into train_data before enumerating the data. You can check our function 'trainer.fit()' and you'll find that we'll first pass the model into train_data before enumerating the data if you use dynamic negative sampling.
So you can get the model first through this function:
model = get_model(config['model'])(config, train_data.dataset).to(config['device'])
and then pass the model into train_data through this function:
train_data.get_model(model)