JuliaPOMDP / SARSOP.jl

Julia package that wraps the SARSOP software for solving POMDPs/MDPs
Other
14 stars 7 forks source link

Extremely long load times on `RockSample` derivative #61

Open jmuchovej opened 1 year ago

jmuchovej commented 1 year ago

πŸ‘‹ First, thanks for building this! (Definitely one of the most painless experiences I've had with existing tools. πŸ™‚)

I just started working with SARSOP, so please bear with ignorance (and definitely feel free to point it out).

Currently, I'm building a derivative the RockSample task – right now it's just RockSample{9} on a (15, 12) world (rather than a smaller one). This generated a .pomdpx file that's ~350MB. While trying to run SARSOP, it took 30259.49s to load (~8.5hrs). This seems to be an incredibly slow loading time for such a small file – but I haven't been able to determine why that might be the case.

For reference, I'm using an M1 Pro chip with 32GB RAM (I haven't seen RAM usage from Julia climb past 6GB – and have had ~10GB free the whole time).

I have an i7-11700K I can run this on (just read as: higher clock speed and x86_64), but need to do a bit of setup so I can actually use said machine. (Will be doing this in the next hour or so.)

I'm using...

julia      1.8.2
SARSOP     0.5.6
SARSOP_jll 0.96.1+0

Do let me know if there's more info I can provide. (Not sure what the "describe your environment" expectations are. πŸ˜…)

zsunberg commented 1 year ago

Hi @jmuchovej thanks for reporting this issue. We are aware that the xml writing is a bottleneck. It might be worth it to think about how to optimize this, but here are a few comments/questions: 1) If it takes that long to load the problem, the POMDP may be to large for SARSOP to solve 2) Can you tell if the long time is due to Julia writing the xml file or SARSOP loading it after it is written? 3) My students, including @WhiffleFish have been working on a native Julia version of SARSOP, which is currently slightly slower than the C++ version, but avoids the xml bottleneck. I have been trying to motivate them to publish it - hopefully they will soon!

jmuchovej commented 1 year ago

Thanks for the quick reply – and sorry for getting back to you so late. πŸ˜…

1. If it takes that long to load the problem, the POMDP may be to large for SARSOP to solve

It is a pretty big problem – it mimics the RockSample{7,8} problem but has 3 possible states (empty, item1, item2), so it is indeed a large problem. (Which leads me to expect a long time to convergence, not necessarily the "setup" phase.)

2. Can you tell if the long time is due to Julia writing the xml file or SARSOP loading it after it is written?

Writing the XML takes a matter of seconds, reading is what takes ages. (Even on smaller problems like RockSample{5,3} (the actual problem, not the modified one) takes a minute or two to read, while it took seconds to write.)

3. My students, including @WhiffleFish have been working on a native Julia version of SARSOP, which is currently slightly slower than the C++ version, but avoids the xml bottleneck. I have been trying to motivate them to publish it - hopefully they will soon!

Sweet! I'll definitely keep an eye out for that. 😁