JuliaPOMDP / SARSOP.jl

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

Silent mode? #13

Closed gondsm closed 7 years ago

gondsm commented 7 years ago

Hello! I'm running the SARSOP solver in a loop, working with several rewards, etc., for a small performance benchmark I'm developing.

However, every time the solver runs, it outputs something like:

Generating a pomdpx file: model.pomdpx

Loading the model ...
  input file   : model.pomdpx
  loading time : 0.00s 

SARSOP initializing ...
  initialization time : 0.00s

-------------------------------------------------------------------------------
 Time   |#Trial |#Backup |LBound    |UBound    |Precision  |#Alphas |#Beliefs  
-------------------------------------------------------------------------------
 0       0       0        0.724116   12.1669    11.4428     3        1        
 0       1       50       7.68026    11.9561    4.27581     3        6        
 0       3       109      11.5083    11.9561    0.447765    2        7        
 0       4       150      11.8259    11.9561    0.13022     7        8        
 0       6       215      11.945     11.9561    0.0111009   2        10       
 0       7       250      11.9528    11.9561    0.003254    3        10       
 0       8       285      11.9551    11.9561    0.000946333 2        10       
-------------------------------------------------------------------------------

SARSOP finishing ...
  target precision reached
  target precision  : 0.001000
  precision reached : 0.000946 

-------------------------------------------------------------------------------
 Time   |#Trial |#Backup |LBound    |UBound    |Precision  |#Alphas |#Beliefs  
-------------------------------------------------------------------------------
 0       8       285      11.9551    11.9561    0.000946333 2        10       
-------------------------------------------------------------------------------

I understand that this is probably the underlying SARSOP software spilling out its diagnostics, but is there a way to suppress these output messages, so they don't mess up my own output buffer?

Thanks!

mykelk commented 7 years ago

It's because run is used to call the solver. We can add a silent mode that calls success instead. PRs welcome.

gondsm commented 7 years ago

Great, I'll take a look! Thanks!