greta-dev / greta

simple and scalable statistical modelling in R
https://greta-stats.org
Other
527 stars 63 forks source link

add `reinstall_greta_deps()` function #524

Closed njtierney closed 2 years ago

njtierney commented 2 years ago

From discussion with Gerry, it looks like the following helps reset things when greta stops working for whatever reason - it might be useful to wrap this up in a reinstall_greta_deps() function, which does:

remove_greta_env()
remove_miniconda()
install_greta_deps()

Perhaps adding an optional, "restart R now?" option, see #523

hrlai commented 2 years ago

I can confirm that this is necessary for reverting from developmental versions that use TF2 to one that uses TF1.x (e.g., v0.4.2). For example, to revert back to v0.4.2 after doing stuff mentioned in #539 , I had to run the codes above.

njtierney commented 2 years ago

Thanks for this, @hrlai ! Glad to know that this works.