Closed odow closed 3 years ago
@adow031 how's this?
This is currently breaking if someone uses the .json
file in a different workflow. I should probably make a include_states::Bool = false
flag so that it's opt-in.
The reason that I would have preferred that cuts just get written / read in the format that they are stored (i.e. theta is the intercept at x=0) is I have a model that has 36 states and needs 10s of thousands of cuts.
This can take a while to load, so the modification of the intercept (back and forth) is just wasted time.
Also: there is a chance that this modification of theta could introduce numerical differences in the cuts, meaning that you get a different policy from saved cuts than from the internal model (but perhaps that can happen anyway).
I've written my work-around functions, so I may just end up using those, if I find there's is an appreciable difference in read/write times.
This still needs tests, and the option to not save the visited states.
Closes #360
Still needs some tests.
@adow031, your hack isn't quite correct. It'll lead to cuts being added with the wrong intercept.