<s> from rlpy . Tools import plt <EOL> import numpy as np <EOL> def _checkSameExperimentResults ( exp1 , exp2 ) : <EOL> """<STR_LIT>""" <EOL> if not np . all ( exp1 . result [ "<STR_LIT>" ] == exp2 . result [ "<STR_LIT>" ] ) : <EOL> print '<STR_LIT>' <EOL> print exp1 . result [ "<STR_LIT>" ] <EOL> print exp2 . result [ "<STR_LIT>" ] <EOL> return False <EOL> if not np . all ( exp1 . result [ "<STR_LIT>" ] == exp2 . result [ "<STR_LIT>" ] ) : <EOL> print '<STR_LIT>' <EOL> print exp1 . result [ "<STR_LIT>" ] <EOL> print exp2 . result [ "<STR_LIT>" ] <EOL> return False <EOL> if not np . all ( exp1 . result [ "<STR_LIT>" ] == exp2 . result [ "<STR_LIT>" ] ) : <EOL> print '<STR_LIT>' <EOL> print exp1 . result [ "<STR_LIT>" ] <EOL> print exp2 . result [ "<STR_LIT>" ] <EOL> return False <EOL> return True <EOL> def check_seed_vis ( make_exp_fun ) : <EOL> """<STR_LIT>""" <EOL> expNoVis = make_exp_fun ( exp_id = <NUM_LIT:1> ) <EOL> expNoVis . config_logging = False <EOL> expNoVis . run ( visualize_steps = False , <EOL> visualize_learning = False , <EOL> visualize_performance = <NUM_LIT:0> ) <EOL> expVis1 = make_exp_fun ( exp_id = <NUM_LIT:1> ) <EOL> expVis1 . config_logging = False <EOL> expVis1 . run ( visualize_steps = True , <EOL> visualize_learning = False , <EOL> visualize_performance = <NUM_LIT:1> ) <EOL> plt . close ( '<STR_LIT:all>' ) <EOL> expVis2 = make_exp_fun ( exp_id = <NUM_LIT:1> ) <EOL> expVis2 . config_logging = False <EOL> expVis2 . run ( visualize_steps = False , <EOL> visualize_learning = True , <EOL> visualize_performance = <NUM_LIT:1> ) <EOL> plt . close ( '<STR_LIT:all>' ) <EOL> assert _checkSameExperimentResults ( expNoVis , expVis1 ) <EOL> assert _checkSameExperimentResults ( expNoVis , expVis2 ) </s>
