Replies: 2 comments 2 replies
-
First I just want to make a couple clarifying points. We don't really run Rather this is something users use at the end of a dplyr query to be performed on a hub's data to execute said query. hub_con %>%
filter(output_type == "quantile", location == "US") %>%
collect() The point of all this is to allow the user the flexibility to write more custom queries (that are also quite performant). It means we have no control over what the output of queries are though so there is no way for us to ensure bolting In some ways that's why we developed the function. As users are free to interrogate their hubs in any way they can, passing their output through Having said all that, if we describe the expectations clearly and warn of the possibility of failure if the output of any preceding queries does not conform to collect_hub <- function(x) {
x %>%
dplyr::collect() %>%
hubUtils::as_model_out_tbl()
} and is deployed as such: hub_con %>%
filter(output_type == "quantile", location == "US") %>%
collect_hub() |
Beta Was this translation helpful? Give feedback.
-
I agree with your points and appreciate the generality and flexibility of just using |
Beta Was this translation helpful? Give feedback.
-
I'm trying to make sense of the data loading and validation pipeline. My understanding is that currently we have something where we do something like
To get data from a hub. The resulting
a
object is atibble
.This system works fine, and there is some "validation" on the data in
a
already, by virtue of it coming into the hub already and being "collected". But then to make it an actualmodel_out_df
object, we need to then run another function here, like:This feels like an unnecessary and potentially confusing step for new users who then want to go on and use the downstream functions that require the
model_out_tbl
object (e.g. in hubVis or hubEnsembles). I suggest that, without removing the existingdplyr::collect()
functionality, which is nice to have out of the box, we add ahubUtils::collect_hub()
function that essentially does the followingas a convenience for the typical user.
Beta Was this translation helpful? Give feedback.
All reactions