Skip to content

Conversation

@EmilHvitfeldt
Copy link
Member

To close #191


# @export - onLoad
#' @rdname inf_conformal-butcher
axe_call.int_conformal_full <- function(x, verbose = FALSE, ...) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that there is a good amount of repetition. However the functions are also really short, so I think that this is the more readable form

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind but maybe they should all share a int_conformal class?

@EmilHvitfeldt EmilHvitfeldt requested a review from hfrick October 8, 2025 22:19
Copy link
Member

@hfrick hfrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally on board but I'm hoping to learn something about S3 registration details!


# @export - onLoad
#' @rdname inf_conformal-butcher
axe_call.int_conformal_full <- function(x, verbose = FALSE, ...) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind but maybe they should all share a int_conformal class?

add_butcher_class(x)
}

# @export - onLoad
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for not directly exporting the method? The help page for vctrs::s3_register() says it's for registering an S3 method for a generic from a package you dont' import, just suggest. probably is importing butcher so I'm wondering if we need this extra layer here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm doing it the same way that it was done in {workflows}

https://github.com/tidymodels/workflows/blob/db117b59d8c545a55fd57eeb339ad232616e38a8/R/zzz.R#L6-L10

https://github.com/tidymodels/workflows/blob/db117b59d8c545a55fd57eeb339ad232616e38a8/R/butcher.R#L15

It didn't work when I did it the normal way. So it might be a little out of my depth to understand why.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fairly sure that the reason for this in workflows is because butcher is only in Suggests and not in Imports.

Maybe that affects things here because we make use of the workflows methods, which don't seem to be exported from workflows? 🤔 I'm okay moving on and getting this merged though!

@EmilHvitfeldt
Copy link
Member Author

I assume that the reason why there isn't one overall class is that some of the methods have a $flow slot and one of the methods have a $models slot which is a list of workflows.

I do believe it would be worth looking into if there is a way to unify some of the code. But I don't think this PR is the place to do it

@hfrick
Copy link
Member

hfrick commented Oct 9, 2025

oh totally agree, the shared class is not a question for this PR!

@EmilHvitfeldt EmilHvitfeldt merged commit d210d09 into main Oct 9, 2025
13 checks passed
@EmilHvitfeldt EmilHvitfeldt deleted the butcher branch October 9, 2025 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add butcher support for probably conformal inference prediction intervals

3 participants