This looks like we are passing a parameter to ```dump_regressor``` by setting a global flag. Could dump_regressor be refactored to support additional parameter specifying regressor type?