Closed keller-mark closed 1 week ago
Looks like a great step forward.
Big question is whether foreach is the right parallelization option? I've gotten a lot of mileage out of pbapply, which offers an out of the box progress bar for *apply functions. Looks like you are just doubling down on doParallel? Looks like they haven't had any development in two years and he last change was a package maintainer update.
The other thing is what this ends up looking like from a user-facing API and UX point of view. It would be nice to havea vignette showing what the expected use pattern is. Once this is merged, maybe I can work that up as a test of what you did here?
Big question is whether foreach is the right parallelization option? I've gotten a lot of mileage out of pbapply
I am not tied to foreach
and doParallel
- i will try pbapply
instead, thank you for the pointer
The other thing is what this ends up looking like from a user-facing API and UX point of view. It would be nice to havea vignette showing what the expected use pattern is. Once this is merged, maybe I can work that up as a test of what you did here?
Yes definitely we will need documentation of the usage. The tests are currently the only place that shows this https://github.com/keller-mark/pizzarr/blob/b978a5c7ad8d6192b7740a807a96797857cdf65d/tests/testthat/test-parallel.R#L50
Cool -- I'm not attached to any one parallelization scheme but it does seem that future
is the one with the most community support. http://www.futureverse.org/ It looks like that community prefers https://progressr.futureverse.org/ which takes a different approach from pbapply, it requires a more tightly coupled implementation than pbapply. I just kind of fell into pbapply and have liked it because I can just use my typical pattern where I map to a list of jobs then apply to a result list that I then recombine and I don't have to do anything else to get a progress bar. If I had to switch to a different apply function it would be a totally trivial change.
Unfortunately, the switch from
crul::HttpClient
tocrul::HttpRequest + crul::AsyncVaried
breaks the VCR request mocking due to https://github.com/ropensci/vcr/issues/246Fixes #83 Related to #31
To get tests passing again, depends on https://github.com/ropensci/crul/pull/180