Bart Rust Development

I was able to fork @gstechschulte ‘s rust version of BART and get a pretty nice version running with updated packages here. I have a pull request PR which isn’t passing tests or something. The PR is just for my update_trees branch which sends the model from python to rust for the sampling then loads the trees back into python and uses the pymc_bart python version for everything else. I also have a smart_sampler branch that keeps the trees in rust and has a rust version of sampleposterior for the various utils functions like plot_pdp and plot_ice.

I have now run into the classic ‘it runs on my (linux) machine’ problem and I can’t get it to run on windows unless I specify cores=1 in pm.sample(). It’s a fork vs spawn multiprocessing context issue and I don’t know how to fix it.

I would like people to be able to use it but making the multiprocessing context work and getting the code up to the right quality is a bit beyond my skill level and I had to turn my attention to other projects. Would anyone be interested in helping me get it across the finish line?

@aloctavodia has already looked at it. I just can’t get it to work quite right.

Have you looked at nuts-rs to see how it handles multiprocessing? The python multiprocessing code for nuts and smc might also be useful.

Tagging @aseyboldt because he knows everything

1 Like

Oh that’s a good idea. I will take a look at that.