nicklashansen / tdmpc2

Code for "TD-MPC2: Scalable, Robust World Models for Continuous Control"
https://www.tdmpc2.com
MIT License
272 stars 49 forks source link

data loading typo #27

Open quantumiracle opened 2 months ago

quantumiracle commented 2 months ago

Hi, this line should be:

assert self.buffer.num_eps == (self.buffer.capacity // _cfg.episode_length), \
    f'Buffer has {self.buffer.num_eps} episodes, expected {self.buffer.capacity // _cfg.episode_length} episodes.'
nicklashansen commented 2 months ago

Great catch! This seems to be a leftover from the previous buffer implementation (pre commit https://github.com/nicklashansen/tdmpc2/commit/54145a4d8c4c080836ff1f186fc5a87f70c8a8c7). I'll fix this soon and double-check that everything else in the offline trainer works as expected.