Skip to content

Commit 5bd7e23

Browse files
authored
chore: add torch to loaded packages (#436)
1 parent 4870a2f commit 5bd7e23

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* `t_opt("adamw")` now actually uses AdamW and not Adam.
66
* Caching: Cache directory is now created, even if its parent
77
directory does not exist.
8+
* Add `mlr3torch` to `mlr_reflections$loaded_packages` to fix errors when using `mlr3torch` in parallel.
89

910
# mlr3torch 0.3.1
1011

R/zzz.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ register_mlr3 = function() {
3939

4040
mlr_reflections = utils::getFromNamespace("mlr_reflections", ns = "mlr3") # nolint
4141
iwalk(as.list(mlr3torch_feature_types), function(ft, nm) mlr_reflections$task_feature_types[[nm]] = ft) # nolint
42+
mlr_reflections$loaded_packages = c(mlr_reflections$loaded_packages, "mlr3torch")
4243

4344
mlr_reflections$torch = list(
4445
devices = c("auto", "cpu", "cuda", "mkldnn", "opengl", "opencl", "ideep", "hip", "fpga", "xla", "mps", "meta"),

0 commit comments

Comments
 (0)