View source: R/python_backend.R
| greta_set_deps | R Documentation |
Persistently choose which versions of TensorFlow, TensorFlow Probability,
and Python greta uses, independently of where they are installed (see
greta_set_python() for that). The stored versions are used by:
the managed (uv) environment, which installs them automatically on first use after a restart, and
install_greta_deps(), as its default deps argument when building a
conda environment.
Most users never need this: greta's defaults (TensorFlow 2.15.1, TensorFlow Probability 0.23.0, Python 3.11) are the newest versions greta supports.
To clear the stored versions and return to the defaults, use
greta_remove()("deps").
greta_set_deps(deps = greta_deps_spec())
deps |
object created with |
Your choice is stored under tools::R_user_dir("greta", "config") and
applied the next time greta is loaded, so you will need to restart R
for it to take effect. Changing versions on the managed (uv) backend may
require internet access on the next load, to download the newly requested
versions.
Invisibly, the stored greta_deps_spec().
greta_set_python(), greta_deps_spec(), install_greta_deps()
## Not run:
# pin an older TensorFlow for the managed (uv) environment
greta_set_deps(greta_deps_spec(
tf_version = "2.14.0",
tfp_version = "0.22.1",
python_version = "3.10"
))
# clear the stored versions and return to greta's defaults
greta_remove("deps")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.