@@ -146,7 +146,7 @@ get_seed <- function() {
146
146
sample.int(
147
147
n = 2 ^ 30 ,
148
148
size = 1
149
- )
149
+ )
150
150
}
151
151
152
152
# does a pointer exist (as a named object) and is it from the current session
@@ -680,8 +680,8 @@ as_tf_function <- function(r_fun, ...) {
680
680
sub_dag <- dag_class $ new(targets )
681
681
682
682
# TF1/2 check remove
683
- # `get_default_graph()` doesn't work with either eager execution or
684
- # `tf.function`.
683
+ # `get_default_graph()` doesn't work with either eager execution or
684
+ # `tf.function`.
685
685
# use the default graph, so that it can be overwritten when this is called?
686
686
# alternatively fetch from above, or put it in greta_stash?
687
687
# sub_dag$tf_graph <- tf$compat$v1$get_default_graph()
@@ -879,10 +879,10 @@ check_if_software_available <- function(software_available,
879
879
}
880
880
881
881
compare_version_vec <- Vectorize(
882
- FUN = compareVersion ,
883
- vectorize.args = " b" ,
884
- SIMPLIFY = TRUE
885
- )
882
+ FUN = compareVersion ,
883
+ vectorize.args = " b" ,
884
+ SIMPLIFY = TRUE
885
+ )
886
886
887
887
# ' Greta Situation Report
888
888
# '
@@ -898,6 +898,8 @@ compare_version_vec <- Vectorize(
898
898
# ' }
899
899
greta_sitrep <- function (){
900
900
901
+ config_info <- reticulate :: py_config()
902
+
901
903
cli :: cli_h1(" R" )
902
904
cli :: cli_ul(" version: {.val {getRversion()}}" )
903
905
cli :: cli_ul(" path: {R.home()}" )
@@ -923,6 +925,8 @@ greta_sitrep <- function(){
923
925
check_if_software_available(software_available = have_greta_conda_env(),
924
926
software_name = " greta conda environment" )
925
927
928
+ show_greta_conda_env_path()
929
+
926
930
software_available <- c(
927
931
python = have_python(),
928
932
tf = have_tf(),
@@ -968,6 +972,18 @@ greta_sitrep <- function(){
968
972
969
973
}
970
974
975
+ show_greta_conda_env_path <- function (){
976
+ if (! have_greta_conda_env()){
977
+ cli :: cli_ul(" path: no conda env found for {.var greta-env-tf2}" )
978
+ }
979
+
980
+ py_cl <- reticulate :: conda_list()
981
+ which_greta_env <- which(py_cl $ name == " greta-env-tf2" )
982
+ greta_env_path <- py_cl $ python [which_greta_env ]
983
+ cli :: cli_ul(" path: {greta_env_path}" )
984
+
985
+ }
986
+
971
987
# adapted from https://github.com/rstudio/tensorflow/blob/main/R/utils.R
972
988
is_mac_arm64 <- function () {
973
989
if (nzchar(Sys.getenv(" GRETA_M1_MESSAGE_TESTING" ))) {
@@ -1053,8 +1069,8 @@ check_dag_introduces_new_variables <- function(dag, mcmc_dag) {
1053
1069
}
1054
1070
1055
1071
check_targets_stochastic_and_not_sampled <- function (
1056
- target ,
1057
- mcmc_dag_variables
1072
+ target ,
1073
+ mcmc_dag_variables
1058
1074
) {
1059
1075
target_nodes <- lapply(target , get_node )
1060
1076
target_node_names <- extract_unique_names(target_nodes )
@@ -1144,7 +1160,7 @@ node_type_colour <- function(type){
1144
1160
data = cli :: col_green(type ),
1145
1161
operation = cli :: col_cyan(type ),
1146
1162
distribution = cli :: col_yellow(type )
1147
- )
1163
+ )
1148
1164
1149
1165
switch_cols
1150
1166
}
@@ -1185,7 +1201,7 @@ are_null <- function(x){
1185
1201
x ,
1186
1202
is.null ,
1187
1203
FUN.VALUE = logical (1 )
1188
- )
1204
+ )
1189
1205
}
1190
1206
1191
1207
are_greta_array <- function (x ){
0 commit comments