greta_deps_spec: Specify python dependencies for greta

View source: R/install_greta_deps.R

greta_deps_specR Documentation

Specify python dependencies for greta

Description

A helper function for specifying versions of Tensorflow (TF), Tensorflow Probability (TFP), and Python. Defaulting to 2.15.1, 0.23.0, and 3.11, respectively. greta checks it supports the TF version (greta does not support TF 2.16 or later, which ship Keras 3); compatible TFP and Python versions are resolved at install time by uv (or, for a conda environment, by conda/pip). The greta_deps_tf_tfp dataset lists known-good combinations of TF, TFP, and Python; inspect it with View(greta_deps_tf_tfp).

Usage

greta_deps_spec(
  tf_version = "2.15.1",
  tfp_version = "0.23.0",
  python_version = "3.11"
)

Arguments

tf_version

character. TensorFlow version, in the format major.minor.patch. Default is 2.15.1.

tfp_version

Character. Tensorflow probability (TFP) version major.minor.patch. Default is 0.23.0.

python_version

Character. Python version in format major.minor.patch. Default is 3.11.

Details

Calling greta_deps_spec() with no arguments returns greta's current default (recommended) versions, and is the supported way to query them - for example greta_deps_spec()$tf_version for the default TensorFlow version.

Value

data frame of valid dependencies

Examples

greta_deps_spec()
greta_deps_spec(tf_version = "2.15.1")
greta_deps_spec(tf_version = "2.15.0")
greta_deps_spec(tf_version = "2.15.1", tfp_version = "0.23.0")
greta_deps_spec(tf_version = "2.15.0", tfp_version = "0.23.0")
greta_deps_spec(tf_version = "2.15.1", python_version = "3.10")
greta_deps_spec(tf_version = "2.15.0", python_version = "3.10")
greta_deps_spec(
  tf_version = "2.14.0",
  tfp_version = "0.22.1",
  python_version = "3.10"
  )
# this will fail: greta does not support TF 2.16+ (Keras 3)
## Not run: 
greta_deps_spec(tf_version = "2.16.0")
  
## End(Not run)

greta documentation built on July 20, 2026, 5:09 p.m.