sfa_install_python: Provision the Python Environment for Embedding

View source: R/embed.R

sfa_install_pythonR Documentation

Provision the Python Environment for Embedding

Description

Declares and installs the Python packages needed by the "sbert" embedding backend and the default sfa_nli_matrix classifier (sentence-transformers, which pulls in torch and transformers). With reticulate (>= 1.41) these requirements are also declared automatically on first use via reticulate::py_require(), so calling this is optional — it is handy for provisioning ahead of time (e.g. on a machine with internet before running offline) or into a specific environment.

Usage

sfa_install_python(packages = "sentence-transformers", ...)

Arguments

packages

Character vector of Python packages to require/install.

...

Passed to reticulate::py_install() (e.g. envname, method).

Value

Invisible NULL.

Examples

## Not run: 
# one-time setup of the Python embedding environment
sfa_install_python()

## End(Not run)

semanticfa documentation built on Sept. 2, 2026, 1:07 a.m.