Learn R Programming

greta (version 0.6.0)

greta_deps_spec: 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"
)

Value

data frame of valid dependencies

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.

Examples

Run this code
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)
if (FALSE) {
greta_deps_spec(tf_version = "2.16.0")
  }

Run the code above in your browser using DataLab