aaronheee / recformer Goto Github PK
View Code? Open in Web Editor NEWReplication of the paper "Text Is All You Need: Learning Language Representations for Sequential Recommendation" on KDD'23.
Replication of the paper "Text Is All You Need: Learning Language Representations for Sequential Recommendation" on KDD'23.
Hello. I have encountered an issue with reproducing the results. I replicated two methods, Recformer and UniSRec, using default parameters. The results for Recformer seem reasonable, but the performance of the reproduced UniSRec is significantly better than reported in the paper. What could be the reason for this?
Traceback (most recent call last):
File "D:\download\RecFormer-main\RecFormer-main\pretrain_data\meta_data_process.py", line 53, in
if line['asin'] is not None and line['title'] is not None:
KeyError: 'title'
(text) D:\download\RecFormer-main\RecFormer-main\pretrain_data>python meta_data_process.py
Check meta asins: 25%|███████████▊ | 2/8 [01:18<03:55, 39.31s/it]
Traceback (most recent call last):
File "D:\download\RecFormer-main\RecFormer-main\pretrain_data\meta_data_process.py", line 53, in
if line['asin'] is not None and line['title'] is not None:
KeyError: 'title'
there have some trouble
may i ask why
Firstly, congratulations on the publication! The idea presented is interesting, and the it is very well written.
I'm a bit confused about the distinction between RecformerModel
and RecformerForSeqRec
.
I understand that you used RecformerForSeqRec
to derive the results in the paper for sequential recommendations. However, I'm curious about the purpose of RecformerModel
. Is it essentially the model allenai/longformer-base-4096
, but with variations in token type embedding and item position embedding?
Thanks!
In the paper, it is said that "We rank the ground-truth item of each sequence among all items for evaluation.."
Do the candidates include items in all train, val, and test sequences?
When I followed the steps described in the Training section on the README, I stumbled upon an issue and couldn't move forward.
I downloaded the processed data and then ran python save_longformer_ckpt.py
after storing them in the pretrain_data folder.
The next code bash lightning_run.sh
gives me the following error.
Given I go with the default setting including the training strategy deepspeed_stage_2
, it looks like not running python zero_to_fp32.py . pytorch_model.bin
could be the culprit but I don't see it created automatically to the checkpoint folder)
Thanks for your guidance.
zero_to_fp32.py
Traceback (most recent call last):
File "./anaconda3/lib/python3.11/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "./RecFormer-main/lightning_pretrain.py", line 46, in _par_tokenize_doc
input_ids, token_type_ids = tokenizer_glb.encode_item(item_attr)
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'encode_item'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./RecFormer-main/lightning_pretrain.py", line 156, in <module>
main()
File "./RecFormer-main/lightning_pretrain.py", line 102, in main
doc_tuples = list(tqdm(pool_func, total=len(item_attrs), ncols=100, desc=f'[Tokenize] {path_corpus}'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "./anaconda3/lib/python3.11/site-packages/tqdm/std.py", line 1178, in __iter__
for obj in iterable:
File "./anaconda3/lib/python3.11/multiprocessing/pool.py", line 873, in next
raise value
AttributeError: 'NoneType' object has no attribute 'encode_item'
The rank is calculated as "rank = (predicts < scores).sum(-1).float()" in line 95 of utils.py.
Should "<" be replaced with "<=" to avoid the rank being 0 when all scores are the same value?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.