oneRunWithDump#
- statrl.experiments.onerun.oneRunWithDump(env, learner, interact, timeHorizon, root_folder)[source]#
Run one replicate and pickle its score series to disk.
The unit of work handed to
joblibbymulticoreRuns(). Results travel back through the filesystem rather than through the return value, because returning full score series from every worker would serializenbReplicates x timeHorizonfloats through the process pool.- Parameters:
env (object) – Environment for this replicate; already a private deep copy.
learner (object) – Agent for this replicate; already a private deep copy.
interact (Interaction) – The interaction loop of the setting.
timeHorizon (int) – Number of rounds to play.
root_folder (str) – Directory the dump is written to. Must end with a separator, and must already exist.
- Returns:
Path of the pickle written, of the form
{root_folder}aux_{env}_scores_{agent}_{horizon}_{timestamp}. Theaux_prefix is whatclear_auxiliaryfiles()deletes once the statistics have been computed.- Return type:
- Raises:
AssertionError – If the interaction returned fewer or more than
timeHorizonscores.