Skip to content

Issue with lux::fit - Unclear Error Message #8

@trevb11

Description

@trevb11

I am fitting an auto encoder but the lug::fit method is not working, and returns an unclear error message. Adding PYTORCH_ENABLE_MPS_FALLBACK=1 to the R Environment did not work

train_dl <- torch::dataloader(
zip_train, batch_size = 10, shuffle = TRUE)

my_optimizer <- function(parameters){
torch::optim_adadelta(parameters, lr=1)
}

after.setup <-luz::setup(
autoencoder,
loss = torch::nnf_mse_loss,
optimizer = my_optimizer)

#fit auto encoder
fitted <- luz::fit(after.setup, train_dl, epochs=100)

Error Message:

Epoch 1/100
Error in (function (x) : object 'delf' not found
In addition: Warning message:
Some torch operators might not yet be implemented for the MPS device. A temporary fix is to set the PYTORCH_ENABLE_MPS_FALLBACK=1 to
use the CPU as a fall back for those operators:
ℹ Add PYTORCH_ENABLE_MPS_FALLBACK=1 to your .Renviron file, for example use usethis::edit_r_environ().
✖ Using Sys.setenv() doesn't work because the env var must be set before R starts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions