rvalavi / blockCV

The blockCV package creates spatially or environmentally separated training and testing folds for cross-validation to provide a robust error estimation in spatially structured environments. See
https://doi.org/10.1111/2041-210X.13107
GNU General Public License v3.0
107 stars 24 forks source link

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

Closed HenrikBengtsson closed 1 year ago

HenrikBengtsson commented 2 years ago

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

https://github.com/rvalavi/blockCV/blob/3d43b5020078a56a1fab153613b7d270a458f289/R/spatialAutoRange.R#L162-L168

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 commented 2 years ago

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 commented 1 year ago

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

HenrikBengtsson commented 1 year ago

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

rvalavi commented 1 year ago

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

HenrikBengtsson commented 1 year ago

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 commented 1 year ago

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

rvalavi commented 1 year ago

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

HenrikBengtsson commented 1 year ago

Thank you