Comments (4)
Can you please provide a minimal reprex (reproducible example)? The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it: please help me help you!
If you've never heard of a reprex before, start by reading "What is a reprex", and follow the advice further down the page.
from multidplyr.
Have only run into the error once, and thought it might be a bug somewhere in multidplyr. The example is a similar scale to the data I was running at the time.
Cheers
## -- ##
library(devtools)
install_github("mfasiolo/qgam")
library(qgam)
library(dplyr)
library(multidplyr)
library(purrr)
# Create tibble
# Groups
TestData <- as_data_frame(data.frame(Group1 = sort(as.factor(rep(1:3000, length.out = 6000))),
Group2 = as.factor(rep(1:2))))
# Variables
TestData <- TestData %>%
group_by(Group1, Group2) %>%
do(x = seq(1:1000),
y = rnorm(1000)) %>%
unnest(x,y)
# Optional subset to smaller scale for speed.
#TestData <- TestData[1:10000,]
# Detect clusters
parallel::detectCores() # 4 cores
# Create groups
group <- rep(1:4,
length.out = nrow(TestData %>% group_by(Group1, Group2) %>% nest()))
TestData2 <- bind_cols(tibble(group), TestData %>% group_by(Group1, Group2) %>% nest())
TestData2 <- TestData2 %>% unnest(data)
# Create clusters
cluster <- create_cluster(cores = 4)
# Create partition dataframe
TestDataParty <- TestData2 %>% partition(group, cluster = cluster)
# Load library for within each cluster
cluster_library(TestDataParty, "qgam")
# Run models in parallel
TestDataPartyOutput <- TestDataParty %>% group_by(Group1, Group2) %>%
do(Model1 = tryCatch(qgam(y ~ s(x, k = 3), qu = 0.95, data = .), error = function(e) NA),
Model2 = tryCatch(qgam(y ~ s(x, k = 4), qu = 0.95, data = .), error = function(e) NA),
Model3 = tryCatch(qgam(y ~ s(x, k = 5), qu = 0.95, data = .), error = function(e) NA),
Model4 = tryCatch(qgam(y ~ s(x, k = 7), qu = 0.95, data = .), error = function(e) NA))
from multidplyr.
I ran into the same problem and 'resolved' it by re-initiating my cluster. I did not change any code, just re-ran the cluster setup (incl. library loading and data copying).
from multidplyr.
Seems unlikely to be a bug in multidplyr, but if you're still interested, and can create a simple reprex, please file a new issue.
from multidplyr.
Related Issues (20)
- multidplyr doesn't like unnest_longer() HOT 2
- error from summarize(.groups = "drop_last")
- Consider making `qs` a suggested package HOT 1
- Deprecated `vctrs::vec_cast_list()`
- Use purrr 1.0.0
- Release multidplyr 0.1.2
- Suppport rowwise HOT 2
- Add `warn.conflicts` argument to `cluster_library()` HOT 1
- `group_walk` / `group_map` not working -- no applicable method for `group_map` applied to object of class "multidplyr_party_df" HOT 2
- Implement `reframe()` HOT 1
- Release multidplyr 0.1.3
- custom function output which can change the number of rows of the tibble does not work in partition HOT 1
- Implement `uncount()` HOT 2
- Implementation of `slice_sample()` for bootstrapping? HOT 1
- Upkeep for multidplyr (2023)
- Use `cli_abort()`
- Use standard argument checkers
- tutorial of multidplyr
- Would mirai help?
- evenly divide rows for ungrouped data frame
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multidplyr.