drl-rec
drl-rec copied to clipboard
Error training with sample data
I'm trying to use the sample data to train the model but I get the following error:
File "build_estimator.py", line 11, in <module>
from replay_buffer import RelayBuffer
File "/.../drl-rec/replay_buffer.py", line 7, in <module>
from simulator import data
File "/.../drl-rec/simulator.py", line 6, in <module>
from pre_process_data import data
File "/.../drl-rec/pre_process_data.py", line 94, in <module>
data, recall_data = process_data("train.csv", "embed.csv")
File "/.../drl-rec/pre_process_data.py", line 29, in process_data
], axis=1
File "/.../anaconda2/envs/tensorflow/lib/python3.7/site-packages/pandas/core/frame.py", line 6487, in apply
return op.get_result()
File "/.../envs/tensorflow/lib/python3.7/site-packages/pandas/core/apply.py", line 151, in get_result
return self.apply_standard()
File "/.../anaconda2/envs/tensorflow/lib/python3.7/site-packages/pandas/core/apply.py", line 257, in apply_standard
self.apply_series_generator()
File "/.../anaconda2/envs/tensorflow/lib/python3.7/site-packages/pandas/core/apply.py", line 286, in apply_series_generator
results[i] = self.f(v)
File "/.../drl-rec/pre_process_data.py", line 27, in <lambda>
list(map(lambda t: list(np.array(t.split(','), dtype=np.float64)), row[org].split('|')))
AttributeError: ("'int' object has no attribute 'split'", 'occurred at index 0')
I found that in the README the elements are separated with ',' but in the sample data they are separated with '|'. I don't know if that is the problem, I think that it could also be that I'm using different versions of the dependencies. It would be nice if you could provide a requirements file with that information.
Have you solved the problem?I had the same problem.
Same problem here! Hope an update comes soon
How did you get the sample data??
It's train.csv
, right?
I made my own file! mytest.zip
Thank you so much for sharing!! It's very good!!
I've solved this issue by adding str() in line #16,27 list(map(lambda t: list(np.array(str(t).split(','), dtype=np.float64)), str(row[org]).split('|')))
@kimsse0430 Can you please tell me what your line is on line 16 to get it to work?
What is the version of tensorflow and python that you can run?
谢谢。您的邮件已收到,我会尽快处理。
In my opinion, according to the original paper, the action and the reward should be a list of items, and they should be sepreated by the '|' in the dataset. As for the recall, i'm still confused of it.
谢谢。您的邮件已收到,我会尽快处理。