Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cxzhang4
Copy link
Collaborator

No description provided.

@cxzhang4 cxzhang4 marked this pull request as draft June 17, 2025 07:51
@cxzhang4 cxzhang4 marked this pull request as ready for review June 17, 2025 07:53

super_cbgen_public_methods = cbgen$get_inherit()$public_methods
superclass_implemented_stages = names(super_cbgen_public_methods)[grepl("^on_", names(super_cbgen_public_methods))]
implemented_stages = union(superclass_implemented_stages, names(cbgen$public_methods)[grepl("^on_", names(cbgen$public_methods))])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it makes sense to check the superclass for implemented stages, since a subclass would inherit any stages that it doesn't override.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

And without this change, the autotest does not detect a stage as implemented when it is only implemented in the superclass

Copy link
Member

Choose a reason for hiding this comment

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

do it recursively.

@cxzhang4 cxzhang4 requested a review from sebffischer June 20, 2025 10:00
scheduler = NULL,
#' @description
#' Creates a new instance of this [R6][R6::R6Class] class.
#' @param .scheduler (`LRScheduler`)\cr
Copy link
Member

Choose a reason for hiding this comment

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

already documented above


super_cbgen_public_methods = cbgen$get_inherit()$public_methods
superclass_implemented_stages = names(super_cbgen_public_methods)[grepl("^on_", names(super_cbgen_public_methods))]
implemented_stages = union(superclass_implemented_stages, names(cbgen$public_methods)[grepl("^on_", names(cbgen$public_methods))])
Copy link
Member

Choose a reason for hiding this comment

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

do it recursively.

@sebffischer sebffischer merged commit ff4acad into main Jul 7, 2025
6 checks passed
@sebffischer sebffischer deleted the fix/lr_scheduler branch July 7, 2025 09:37
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.

3 participants