mlr-org / parallelMap

R package to interface some popular parallelization backends with a unified interface
https://parallelmap.mlr-org.com
Other
57 stars 14 forks source link

printing a ParallelMapOptions object doesn't print the particular object. #41

Closed mb706 closed 4 years ago

mb706 commented 8 years ago

Printing the result of parallelGetOptions doesn't print the value of that object, but the current state of parallelMap options. This is imho not in the spirit of a print function. If this behaviour is deliberate, did I miss the documentation somewhere?

Note the 'mode' slot of y in the following:

> parallelStartMPI(2)  # frame not visible
Starting parallelization in mode=mpi with cpus=2.
    2 slaves are spawned successfully. 0 failed.
> y = parallelGetOptions()
> y
parallelMap options : value      (default)

mode                : mpi        (not set)
cpus                : 2          (not set)
level               : NA         (not set)
logging             : FALSE      (not set)
show.info           : TRUE       (not set)
storagedir          : /home/herbert/lmu/master/automlr/working
                      (not set)
> parallelStop()
Stopped parallelization. All cleaned up.
> y
parallelMap options : value      (default)

mode                : local      (not set)
cpus                : 2          (not set)
level               : NA         (not set)
logging             : FALSE      (not set)
show.info           : TRUE       (not set)
storagedir          : /home/herbert/lmu/master/automlr/working
                      (not set)
> y$settings$mode
[1] "mpi"