chandar-lab / Recall2Imagine

Recall to Imagine, a model-based RL algorithm with superhuman memory. Oral (1.2%) @ ICLR 2024
https://recall2imagine.github.io/
MIT License
44 stars 4 forks source link

atari100k:atari_pong fails on Batcher creation #8

Open eadadi opened 2 months ago

eadadi commented 2 months ago

Running with:

python3 ./recall2imagine/train.py /
  --logdir /logdir/$(date +%Y%m%d-%H%M%S) /
  --configs atari100k tiny
  --task atari_pong
  --jax.platform=cpu

Fails with:

AttributeError: 'function' object has no attribute 'serializer'

Traceback:

Traceback (most recent call last):
  File "./recall2imagine/train.py", line 241, in <module>
    main()
  File "./recall2imagine/train.py", line 81, in main
    embodied.run.train_eval(
  File "/code/recall2imagine/embodied/run/train_eval.py", line 74, in train_eval
    dataset_train = agent.dataset(train_replay.dataset)
  File "/code/recall2imagine/jaxagent.py", line 104, in dataset
    batcher = embodied.BatcherSM(
  File "/code/recall2imagine/embodied/core/batcher.py", line 123, in __init__
    self._serializer = self._replay.serializer
AttributeError: 'function' object has no attribute 'serializer'

NOTE: on train_eval.py one can change:

dataset_train = agent.dataset(train_replay.dataset)

to:

dataset_train = agent.dataset(train_replay)

which make sense since the LFS_FIFO object has serializer attribute, but then the same errors goes on the next line:

dataset_train = agent.dataset(train_replay)
dataset_eval = agent.dataset(eval_replay.dataset) <-------------

which is of Uniform and does not have serializer.

artemZholus commented 2 months ago

Looks like this is a bug. I will take a look.

Liuxueyi commented 2 months ago

Hi, guys! Have you resolved this problem?I met the same issue.

artemZholus commented 2 months ago

Hi @Liuxueyi .

Apologies for not getting back to you on this sooner. Both first authors are currently attending ICLR 24 where we present this paper. I will get back on this right after the conference.

Liuxueyi commented 2 months ago

Thank you for your reply and wish the conference a success!