-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on modifying by reference with data.table::set()
in the context of future.apply::future_apply()
or furrr::future_map()
#5376
Comments
After fiddling around, it seems that including n <- nrow(snp_pairs)
# `setalloccol` is needed because of `future.apply::future_lapply()`,
# otherwise https://github.com/Rdatatable/data.table/issues/5376.
data.table::setalloccol(snp_pairs, extra_cols*n) inside the source code of the mapped function, i.e. |
I have no idea how the internals of
Depending on how the serialization of That the in-place change does not work after fixing the |
Also related to #5269 which caters for the call to |
Without a call to |
Author of futureverse here: FWIW, any type of parallel backends can be used in the future, e.g. forked parallelization via the It sounds like the problem here is related to the general problem of serializing a data.table object and re-using it in another R process (concurrently or later in time). |
May this issue be related to the fact that updating |
Yes, same problem if you run foreach in parallel. You can update a data.table in a parallel worker, but you cannot expect the update to be updated in the main R session. |
Hi,
First of all, let me thank you for the development amazing
{data.table}
package.My case is that I have a list of data tables that I am trying to modify by reference with
data.table::set()
inside a loop usingfuture.apply::future_apply()
andfurrr::future_walk()
/furrr::future_map()
.However I am getting an error when using
future.apply::future_apply()
orfurrr::future_walk()
/furrr::future_map()
. It works fine withlapply()
although.I am not sure the problem is with the
{data.table}
package itself... I will post this same issue in{furrr}
and{future.apply}
Issues, and link it here.The error is:
You will need to install
{daeqtlr}
first:The text was updated successfully, but these errors were encountered: