CRAN resubmission with review feedback addressed. No user-facing API changes. (0.5.2 was submitted with these changes but did not pass the incoming pretest; 0.5.3 additionally makes backend detection fast on machines where conda is installed.)
conflibert_available()) now
uses filesystem checks only and caches its result for the session.
It previously ran conda env list, which can take more than 10
seconds per call on some systems; on CRAN's Windows pretest machine
that pushed two examples over the 10-second limit.conflibert_available(): a cheap check for whether the
'conflibert' Python environment and its core modules are usable. It
now guards all backend-dependent examples (they run wherever the
backend is installed and are skipped elsewhere, e.g. on CRAN), and it
is exported so your own scripts can degrade gracefully.\dontrun{} remains only on
conflibert_install(), which installs software.diverse = TRUE) now starts
k-means from deterministic farthest-first centers instead of seeded
random starts, so it is reproducible without reading or modifying the
user's .Random.seed (the package no longer touches the global
environment at all). Query selection remains reproducible; the exact
clusters may differ slightly from 0.5.1.conflibert_finetune(), conflibert_compare(), and
conflibert_active_start() gained a seed argument (default 42).
It seeds the classifier-head initialization, data shuffling, and
dropout, so two runs with the same seed on the same hardware and
package versions produce identical models and metrics. Change the
seed to study run-to-run variability.diverse = TRUE) is now
reproducible: the k-means clustering it uses is seeded from the
session's seed, and the user's global RNG state is restored
afterwards so nothing downstream is disturbed.conflibert_classify(), conflibert_multilabel(),
conflibert_ner(), conflibert_qa()) was already deterministic
(a plain forward pass with no sampling) and is unchanged.conflibert_install() much smaller
and more reliable, and removes the transformers < 4.50 version pin.conflibert_qa() call converts
them once and caches the PyTorch copy; environments that already have
TensorFlow (any 0.4.0 install) do this transparently. Fresh installs
can opt in with conflibert_install(qa = TRUE), and TensorFlow is
never used after the one-time conversion.conflibert_status(): a one-call diagnostic that checks the Python
environment, required packages, and compute device, with specific advice
when something is missing.conflibert environment is found.$, dplyr, [, etc.) keeps working unchanged.conflibert_finetune() results have a class with a clean print()
method; all fields are accessed exactly as before.print() for active-learning sessions and loaded classifiers got the
same treatment.theme_conflibert() ggplot2 theme: a modern, flat look (no tick
marks, hairline grids along the data axis only, bold left-aligned
titles) used by all package plots and exported for your own figures.
A grid argument controls which grid lines are kept.type = "entities")plot() (no extra packages)
and as ggplot2::autoplot() (returns a customizable ggplot).conflibert_classify(), conflibert_multilabel(), and
conflibert_ner() now run batched inference (one Python call per batch
instead of per text), with a progress bar for large inputs and a
heads-up message the first time a model is downloaded.conflibert_ner() gains score, start, and end columns (1-based
character offsets into the input text).conflibert_qa() is vectorized (with recycling) and gains a
details = TRUE argument returning answer, confidence score, and
character span. The single-question default still returns a plain
string, exactly as before.conflibert_compare() no longer fails when one model errors; the
failed model gets an error column and the rest are kept.conflibert_load() to load a saved fine-tuned classifier from disk, and a predict() method that runs batched inference returning a tidy tibble.use_lora = TRUE to conflibert_finetune(), conflibert_compare(), or conflibert_active_start() to train with a low-rank adapter; the adapter is merged into the base model before saving so reloads are transparent. peft added to the Python install list.diverse = TRUE to conflibert_active_start() to cluster top-scoring candidates in embedding space and pick one per cluster, preventing near-duplicates from dominating a batch.conflibert_active_label(): opens a Shiny gadget for labeling the current query, matching the GUI's point-and-click experience. Requires shiny and miniUI (Suggests).conflibert_active_start(): train on a labeled seed and return the most uncertain samples from a pool.conflibert_active_next(): submit labels for the current query, retrain, and get the next batch.conflibert_active_save(): persist the active-learning model as a HuggingFace checkpoint.print() and plot() methods for quick inspection and tracking metrics across rounds.entropy, margin, least_confidence.conflibert_example("active").conflibert_finetune() for training custom classifiers on user data.conflibert_compare() for comparing multiple base models side by side.conflibert_benchmark() for evaluating the pretrained classifier against labeled data.conflibert_models() to list available base model architectures.conflibert_example() to load bundled example datasets (binary and multiclass) for quick testing.conflibert_ner(): Named Entity Recognition.conflibert_classify(): Binary classification (conflict vs non-conflict).conflibert_multilabel(): Multilabel event type classification.conflibert_qa(): Extractive question answering.conflibert_install(): One-time Python dependency setup.