You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NEWS.md
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# mirai 1.1.1.9019 (development)
1
+
# mirai 1.1.1.9020 (development)
2
2
3
3
*`everywhere()` adds argument '.serial' to accept serialization configurations created by `serial_config()`. These allow normally non-exportable reference objects such as Arrow Tables or torch tensors to be used seamlessly across parallel processes without additional marshalling steps. Configurations apply on a per compute profile basis.
4
4
*`serialization()` is now deprecated in favour of the above usage of `everywhere()`, and will be removed in a future version.
@@ -7,9 +7,10 @@
7
7
* Collecting a 'mirai_map' no longer spuriously introduces empty names where none were present originally.
8
8
* Faster local `daemons(dispatcher = FALSE)` and `make_cluster()` by using asynchronous launches (thanks @mtmorgan#123).
9
9
* Local dispatcher daemons now synchronize with host, the same as non-dispatcher daemons (prevents use before all have connected).
10
+
* Fixes rare cases of `everywhere()` not reaching all daemons when using dispatcher.
10
11
* More efficient dispatcher startup by only loading the base package, in addition to not reading startup configurations (thanks @krlmlr).
11
12
* Removes hard dependency on `stats` and `utils` base packages.
As a mirai represents an async operation, it is never necessary to wait for it. Other code can continue to be run. Once it completes, the return value automatically becomes available at `$data`.
For easy programmatic use of `mirai()`, '.expr' accepts a pre-constructed language object, and also a list of named arguments passed via '.args'. So, the following would be equivalent to the above:
The default `dispatcher = TRUE` creates a `dispatcher()` background process that connects to individual daemon processes on the local machine. This ensures that tasks are dispatched efficiently on a first-in first-out (FIFO) basis to daemons for processing. Tasks are queued at the dispatcher and sent to a daemon as soon as it can accept the task for immediate execution.
210
210
@@ -233,7 +233,7 @@ status()
233
233
#> [1] 6
234
234
#>
235
235
#> $daemons
236
-
#> [1] "abstract://3447f493f716be0137955a97"
236
+
#> [1] "abstract://1561773b749829cf1e118973"
237
237
```
238
238
This implementation sends tasks immediately, and ensures that tasks are evenly-distributed amongst daemons. This means that optimal scheduling is not guaranteed as the duration of tasks cannot be known *a priori*. As an example, tasks could be queued at a daemon behind a long-running task, whilst other daemons are idle having already completed their tasks.
239
239
@@ -261,11 +261,11 @@ m <- mirai(capture.output(str(con)))
261
261
m[]
262
262
#> [1] "Formal class 'SQLiteConnection' [package \"RSQLite\"] with 8 slots"
@@ -356,7 +356,7 @@ By specifying `dispatcher = FALSE`, remote daemons connect directly to the host
356
356
357
357
```r
358
358
daemons(url= host_url(), dispatcher=FALSE)
359
-
#> [1] "tcp://hostname:40087"
359
+
#> [1] "tcp://hostname:40369"
360
360
```
361
361
Note that above, calling `host_url()` without a port value uses the default of '0'. This is a wildcard value that will automatically cause a free ephemeral port to be assigned. The actual assigned port is provided in the return value of the call, or it may be queried at any time via `status()`.
362
362
@@ -370,7 +370,7 @@ status()
370
370
#> [1] 0
371
371
#>
372
372
#> $daemons
373
-
#> [1] "tcp://hostname:40087"
373
+
#> [1] "tcp://hostname:40369"
374
374
```
375
375
To reset all connections and revert to default behaviour:
Use `...` to further specify objects referenced but not defined in `.f` - the 'do' in the anonymous function below:
774
774
@@ -783,13 +783,13 @@ ml
783
783
#> < mirai map [3/3] >
784
784
ml[]
785
785
#> $a
786
-
#> [1] "39"
786
+
#> [1] "e0"
787
787
#>
788
788
#> $b
789
-
#> [1] ff 1c
789
+
#> [1] 84 de
790
790
#>
791
791
#> $c
792
-
#> [1] "9eaf02"
792
+
#> [1] "4d73ce"
793
793
```
794
794
Use of `mirai_map()` assumes that `daemons()` have previously been set. If not then one (non-dispatcher) daemon is set to allow the function to proceed. This ensures safe behaviour, but is unlikely to be optimal, so please ensure daemons are set beforehand.
0 commit comments