Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the rtemis package to version 1.2.0, introducing several features to support the rtemislive backend. Key changes include the implementation of a to_json generic for S7 objects, the addition of a SuperConfigLive class for in-memory data training, and a new message sink API to redirect console output. Furthermore, algorithm discovery functions were updated to return data invisibly, and a manual build target was added to the Makefile. Review feedback identifies opportunities to use more idiomatic S7 inheritance checks, adopt NROW() for robust observation counting, remove redundant resample length fields in SupervisedRes serialization, and correct the documentation for the available_draw return value.
There was a problem hiding this comment.
Pull request overview
Adds “live” support infrastructure for rtemislive by enabling (1) in-memory training configs, (2) structured message capture instead of console-only output, and (3) JSON-serializable representations of key S7 model objects for wire transfer.
Changes:
- Introduces
SuperConfigLive+train()dispatch arm to support in-memory tabular payloads. - Adds
to_json()S7 generic + methods forSupervised/SupervisedRes, with test coverage. - Adds a message sink API (
set_msg_sink(),get_msg_sink(),with_msg_sink()) and routesmsg*()output through it when configured; updates algorithm “available_*” helpers and project metadata/docs.
Reviewed changes
Copilot reviewed 17 out of 28 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/test_to_json.R | Adds tests for to_json() generic and model/resample JSON serialization. |
| tests/testthat/test_SuperConfigLive.R | Adds tests for SuperConfigLive construction and train() dispatch. |
| tests/testthat/test_msg_sink.R | Adds tests for message sink registration, scoping, and routing behavior. |
| R/zzz.R | Adds live[["msg_sink"]] runtime slot to internal environment. |
| R/utils_async.R | Minor header/comment normalization. |
| R/train.R | Adds SuperConfigLive dispatch to train(). |
| R/msg.R | Implements sink routing for msg()/msg0()/msgstart()/msgdone() and exports sink API. |
| R/algorithmDB.R | Adds verbosity arg and invisible return values for available_*() helpers. |
| R/14_SuperConfig.R | Switches deserialization helpers to .list_to_* and defines SuperConfigLive + setup/print/repr. |
| R/07_Supervised.R | Adds to_json() methods for Supervised and SupervisedRes. |
| R/06_Tuner.R | Renames list deserializer to .list_to_TunerConfig and updates docs. |
| R/05_Resampler.R | Renames list deserializer to .list_to_ResamplerConfig and updates docs. |
| R/02_Hyperparameters.R | Renames list deserializer to .list_to_Hyperparameters and updates docs. |
| R/00_S7init.R | Adds to_json S7 generic, default method, and recursive helper .to_json_value(). |
| NAMESPACE | Exports new APIs (to_json, msg sink funcs, setup_SuperConfigLive) and .list_to_* helpers. |
| man/with_msg_sink.Rd | Generated docs for with_msg_sink(). |
| man/to_json.Rd | Generated docs for to_json(). |
| man/setup_SuperConfigLive.Rd | Generated docs for setup_SuperConfigLive(). |
| man/set_msg_sink.Rd | Generated docs for set_msg_sink(). |
| man/get_msg_sink.Rd | Generated docs for get_msg_sink(). |
| man/dot-list_to_TunerConfig.Rd | Generated docs for .list_to_TunerConfig(). |
| man/dot-list_to_ResamplerConfig.Rd | Generated docs for .list_to_ResamplerConfig(). |
| man/dot-list_to_Hyperparameters.Rd | Generated docs for .list_to_Hyperparameters(). |
| man/available_draw.Rd | Updates usage signature for available_draw() (generated doc). |
| man/available_algorithms.Rd | Updates usage/args/return for available_*() helpers (generated doc). |
| Makefile | Adds manual target for building the PDF manual. |
| DESCRIPTION | Bumps version/date and adds later, nanonext, plumber to Suggests. |
| .gitignore | Simplifies ignore rules and adds PDF ignore. |
Files not reviewed (10)
- man/available_algorithms.Rd: Language not supported
- man/available_draw.Rd: Language not supported
- man/dot-list_to_Hyperparameters.Rd: Language not supported
- man/dot-list_to_ResamplerConfig.Rd: Language not supported
- man/dot-list_to_TunerConfig.Rd: Language not supported
- man/get_msg_sink.Rd: Language not supported
- man/set_msg_sink.Rd: Language not supported
- man/setup_SuperConfigLive.Rd: Language not supported
- man/to_json.Rd: Language not supported
- man/with_msg_sink.Rd: Language not supported
Comments suppressed due to low confidence (1)
man/available_draw.Rd:12
- This help page says
\value{NULL, invisibly.}butavailable_draw()now invisibly returns the named list of draw functions (and has averbosityparameter). Please regenerate this Rd from corrected roxygen so the documented return value/args match the implementation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #' | ||
| #' @author EDG | ||
| #' @keywords internal | ||
| #' @export |
| #' @keywords internal | ||
| #' @noRd | ||
| list_to_ResamplerConfig <- function(x) { | ||
| #' @export |
| #' @noRd | ||
| list_to_TunerConfig <- function(x) { | ||
| #' @keywords internal | ||
| #' @export |
No description provided.