tabnet icon indicating copy to clipboard operation
tabnet copied to clipboard

move parsnip to depends

Open topepo opened this issue 3 years ago • 3 comments

I know that the package is not specifically a tidymodels package but some function won't work unless it is fully attached:

library(tabnet)

tabnet(mode = "regression") %>%
  set_engine("torch") %>%
  fit(mpg ~ ., data = mtcars)
#> Error in fit(., mpg ~ ., data = mtcars): could not find function "fit"

Created on 2022-11-04 by the reprex package (v2.0.1)

topepo avatar Nov 04 '22 15:11 topepo

I don't think we want to add the parsnip requirement here to this package. Perhaps we can attach parsnip the first time tabnet is called, for instance, this is also where we register parsnip related stuff:

https://github.com/mlverse/tabnet/blob/cc78cc280054f00b4361837449c07e42b06b4885/R/parsnip.R#L249-L252

dfalbel avatar Nov 04 '22 20:11 dfalbel