Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛BUG] TypeError: expected Tensor as element 0 in argument 0, but got Interaction #43

Open
yoosan opened this issue Dec 19, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@yoosan
Copy link

yoosan commented Dec 19, 2022

Hi developers,
I am a new user of RecBole-CDR. I follow the tutorial and reproduce the DTCDR method, but got an error.

Here is the overall config:
I modified the eval_args.mode from full to uni999, I guss this change cause the error, could you tell me how to fix it?

# general
gpu_id: 0
use_gpu: True
seed: 2022
state: INFO
reproducibility: True
data_path: 'dataset/'
checkpoint_dir: 'saved'
show_progress: True
save_dataset: False
dataset_save_path: ~
save_dataloaders: False
dataloaders_save_path: ~
log_wandb: False
wandb_project: 'recbole_cdr'

# training settings
train_epochs: ["BOTH:300"]
train_batch_size: 4096
learner: adam
learning_rate: 0.0005 #0.001
neg_sampling:
  uniform: 1
eval_step: 1
stopping_step: 10
clip_grad_norm: ~
# clip_grad_norm:  {'max_norm': 5, 'norm_type': 2}
weight_decay: 0.0
loss_decimal_place: 4
require_pow: False

# evaluation settings
eval_args: 
  split: {'RS':[0.8,0.1,0.1]}
  split_valid: {'RS':[0.8,0.2]}
  group_by: user
  order: RO
  mode: uni999 # full
repeatable: False
metrics: ["Recall","MRR","NDCG","Hit","Precision"]
topk: [10]
valid_metric: MRR@10
valid_metric_bigger: True
eval_batch_size: 409600
metric_decimal_place: 4

Others config here

DTCDR.yaml

embedding_size: 64
base_model: NeuMF
mlp_hidden_size: [64, 64]
dropout_prob: 0.3
alpha: 0.3

dataset config

# dataset config
gpu_id: 0
state: INFO
seed: 2022
field_separator: "\t"
source_domain:
  dataset: AmazonBooks
  data_path: '/data/home/work/projects/RecBole-CDR/recbole_cdr/dataset_example/'
  USER_ID_FIELD: user_id
  ITEM_ID_FIELD: item_id
  RATING_FIELD: rating
  TIME_FIELD: timestamp
  NEG_PREFIX: neg_
  LABEL_FIELD: label
  load_col:
    inter: [user_id, item_id, rating]
  user_inter_num_interval: "[10,inf)"
  item_inter_num_interval: "[10,inf)"
  val_interval:
    rating: "[3,inf)"
  drop_filter_field: True

target_domain:
  dataset: AmazonMov
  data_path: '/data/home/work/projects/RecBole-CDR/recbole_cdr/dataset_example/'
  USER_ID_FIELD: user_id
  ITEM_ID_FIELD: item_id
  RATING_FIELD: rating
  TIME_FIELD: timestamp
  NEG_PREFIX: neg_
  LABEL_FIELD: label
  load_col:
    inter: [user_id, item_id, rating]
  user_inter_num_interval: "[10,inf)"
  item_inter_num_interval: "[10,inf)"
  val_interval:
    rating: "[3,inf)"
  drop_filter_field: True
@yoosan yoosan added the bug Something isn't working label Dec 19, 2022
@Wicknight Wicknight self-assigned this Dec 22, 2022
@Wicknight
Copy link
Collaborator

@yoosan Hello, thanks for your attention to RecBole-CDR!
Actually we only provide support for full mode in current release. If you want to use uni999 evaluation, you need to write new code of dataloader to support this evaluation(just like CrossDomainFullSortEvalDataLoader in dataloader.py to support full evaluation). We will also consider providing support for this method in next release.

@ajaykv1
Copy link

ajaykv1 commented Nov 10, 2023

Hi, has this issue been resolved? I am currently using uni999, but I am still getting the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants