Skip to content
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

NOTICE: plan(multiprocess) of future is deprecated #23

Closed
HenrikBengtsson opened this issue Apr 28, 2022 · 8 comments
Closed

NOTICE: plan(multiprocess) of future is deprecated #23

HenrikBengtsson opened this issue Apr 28, 2022 · 8 comments

Comments

@HenrikBengtsson
Copy link

Hi. Please note that multiprocess is deprecated since future 1.20.0 (2020-11-03) and will soon be defunct:

suppressWarnings(future::plan("multiprocess", workers = nCores))
pp <- future.apply::future_lapply(seq_len(numLayer),
fitvario,
spdata = speciesData,
rdata = rasterLayer,
sn = sampleNumber)
future::plan("sequential")

Also, please undo to the future plan to whatever was set before, which might not be sequential as assumed above. See section 'For package developers' in https://future.futureverse.org/reference/plan.html for how to do that, e.g.

oplan <- plan(new_set_of_strategies)
on.exit(plan(oplan), add = TRUE)
@HenrikBengtsson
Copy link
Author

Just a friendly reminder that multiprocess will become defunct and eventually be removed. When that happens, your package will break and risk being archived on CRAN. My suggestion is to update to use multisession instead.

@rvalavi
Copy link
Owner

rvalavi commented Oct 11, 2022

@HenrikBengtsson thank you so much for the notice. I'll fix it soon.

@HenrikBengtsson
Copy link
Author

Friendly reminder; 'multiprocess' has been deprecated since 2020-10-30.

@rvalavi
Copy link
Owner

rvalavi commented Jan 29, 2023

Thanks @HenrikBengtsson blockCV is now updated and this issue no longer exists. I'm closing this issue.

@rvalavi rvalavi closed this as completed Jan 29, 2023
@HenrikBengtsson
Copy link
Author

How is the CRAN submission going? My revdep checks gives:

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('testSpatialAutoRange.R:19'): test spatialAutoRange function with multi-layer raster in parallel ──
<defunctError/error/condition>
Error: Detected creation of a 'multiprocess' future. Strategy 'multiprocess' is defunct in future (>= 1.20.0) [2020-10-30
 Instead, explicitly specify either 'multisession' (recommended) or 'multicore'.
Backtrace:
     ▆
  1. └─blockCV::spatialAutoRange(...) at testSpatialAutoRange.R:19:2
  2.   └─future.apply::future_lapply(...)
  3.     └─future.apply:::future_xapply(...)
  4.       └─future::future(...)
  5.         ├─future::run(future)
  6.         └─future:::run.Future(future)
  7.           ├─base::do.call(makeFuture, args = args)
  8.           └─future (local) `<FtrStrtg>`(...)
  9.             └─future (local) strategy(..., workers = workers, envir = envir)
 10.               └─future (local) dfcn(msg = msg, package = .packageName)
 11.                 └─base::.Defunct(...)

[ FAIL 1 | WARN 0 | SKIP 8 | PASS 193 ]
Error: Test failures
Execution halted

@rvalavi
Copy link
Owner

rvalavi commented Feb 2, 2023

Sorry for the delay. The package is already submitted to CRAN. I'll let you know as soon as it's up.

@rvalavi
Copy link
Owner

rvalavi commented Feb 7, 2023

Hi @HenrikBengtsson
I just want to let you know that blockCV is finally on CRAN.

@HenrikBengtsson
Copy link
Author

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants