tabnet
tabnet copied to clipboard
move parsnip to depends
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)
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