Skip to contents

Prepares the dataset for shared-memory access and tags the model specification so that mvpa_iterate uses the shard backend instead of the default furrr pipeline.

Usage

use_shard(mod_spec)

Arguments

mod_spec

A model specification created by mvpa_model (or any constructor that produces an object inheriting from "model_spec").

Value

A copy of mod_spec with class "shard_model_spec" prepended and a $shard_data list attached.

Details

This is an experimental feature. It requires the shard package and a platform that supports POSIX shared memory (shm_open).

Examples

if (FALSE) { # \dontrun{
  mspec <- mvpa_model(mdl, dataset, design, "classification", crossval = cval)
  mspec <- use_shard(mspec)
  results <- run_searchlight(mspec, ...)
} # }