I just created a PR for this (see temporary install directions below). You would pass it in by itself (i.e., not in a list):
# remotes::install_github("tidymodels/parsnip@xgb-objective")
library(tidymodels)
#> ── Attaching packages ────────────────────────────────────── tidymodels 0.1.2 ──
#> ✓ broom 0.7.3 ✓ recipes 0.1.15.9000
#> ✓ dials 0.0.9.9000 ✓ rsample 0.0.8.9000
#> ✓ dplyr 1.0.2 ✓ tibble 3.0.4
#> ✓ ggplot2 3.3.3 ✓ tidyr 1.1.2
#> ✓ infer 0.5.3 ✓ tune 0.1.2.9000
#> ✓ modeldata 0.1.0.9000 ✓ workflows 0.2.1
#> ✓ parsnip 0.1.4.9000 ✓ yardstick 0.0.7.9000
#> ✓ purrr 0.3.4
#> ── Conflicts ───────────────────────────────────────── tidymodels_conflicts() ──
#> x purrr::discard() masks scales::discard()
#> x dplyr::filter() masks stats::filter()
#> x dplyr::lag() masks stats::lag()
#> x recipes::step() masks stats::step()
spec <-
boost_tree() %>%
set_engine("xgboost", objective = "reg:pseudohubererror") %>%
set_mode("regression")
xgb_fit <- spec %>% fit(mpg ~ ., data = mtcars)
xgb_fit$fit$params$objective
#> [1] "reg:pseudohubererror"
Created on 2021-01-14 by the reprex package (v0.3.0)