drl-rec icon indicating copy to clipboard operation
drl-rec copied to clipboard

Error training with sample data

Open andrebola opened this issue 5 years ago • 11 comments

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.

andrebola avatar Jul 13 '19 10:07 andrebola

Have you solved the problem?I had the same problem.

wkzqn avatar Apr 09 '20 04:04 wkzqn

Same problem here! Hope an update comes soon

mrmarten avatar Oct 06 '20 13:10 mrmarten

How did you get the sample data?? It's train.csv, right?

Rowing0914 avatar Dec 06 '20 11:12 Rowing0914

I made my own file! mytest.zip

mrmarten avatar Dec 06 '20 20:12 mrmarten

Thank you so much for sharing!! It's very good!!

Rowing0914 avatar Dec 06 '20 23:12 Rowing0914

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 avatar Feb 17 '21 07:02 kimsse0430

@kimsse0430 Can you please tell me what your line is on line 16 to get it to work?

mrmarten avatar Mar 21 '21 16:03 mrmarten

What is the version of tensorflow and python that you can run?

wangjiannan98 avatar Mar 03 '22 08:03 wangjiannan98

谢谢。您的邮件已收到,我会尽快处理。

wkzqn avatar Mar 03 '22 08:03 wkzqn

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.

amenkim avatar Apr 26 '22 02:04 amenkim

谢谢。您的邮件已收到,我会尽快处理。

wkzqn avatar Apr 26 '22 02:04 wkzqn