Skip to content

Fix book build failure in machine_learning chapter caused by duplicate predictor names - #896

Closed
artur-sannikov with Copilot wants to merge 2 commits into
develfrom
copilot/fix-build-book-devel-job
Closed

artur-sannikov with Copilot wants to merge 2 commits into
develfrom
copilot/fix-build-book-devel-job

Conversation

Copilot AI commented Sep 28, 2026 •

Copy link
Copy Markdown

The build-book (devel) Actions job failed while rendering inst/pages/machine_learning.qmd in the Random Forest classification section. mikropml::run_ml() received a dataset with duplicate feature names, which caused dplyr::pull() to abort.

  • Problem surfaced in rendered ML workflow

    • Failure occurred during supervised model training (run_ml) after preprocessing, due to non-unique feature/predictor names in the loaded TSE object.
  • Targeted fix in chapter setup

    • Added a single normalization step immediately after loading the QinJ_2012 dataset to enforce unique taxonomic row names before downstream preprocessing/modeling.
    • This prevents duplicate columns when model inputs are materialized.
  • Change

    # Ensure taxonomic feature names are unique for model matrix creation
    rownames(tse) <- make.unique(rownames(tse))

Co-authored-by: artur-sannikov <40318410+artur-sannikov@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job build-book (devel) Fix book build failure in machine_learning chapter caused by duplicate predictor names Sep 28, 2026
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.

2 participants