I was trying to pass the base_margin to the xgboost in fit() as part of the sklearn pipeline.
base_margin
fit()
My code would work if you swap base_marg
base_marg