cnellington / Contextualized

An SKLearn-style toolbox for estimating and analyzing models, distributions, and functions with context-specific parameters.
http://contextualized.ml/
GNU General Public License v3.0
65 stars 9 forks source link

fix bootstrap not training for multiple epochs #94

Closed blengerich closed 2 years ago

blengerich commented 2 years ago

Fixes the problem with bootstrap trajectories not training for multiple epochs.

The cause of the problem was that callbacks include trajectory state, so they must be reinitialized for each training trajectory. As a result, SKlearnWrapper now expects argument callback_constructors (which is a list of lambda functions that each return a Callback object) instead of callbacks (which was a list of Callback objects).