Greta 0.4.0 soft release

Hiya folks! {greta} 0.4.0 is nearly ready for release, and I am excited! This release features an overhauled installation helper, install_greta_deps().

We’d really appreciate it if people might be able to try it out - details here: https://greta-stats.org/articles/faq.html#how-do-i-install-greta-dependencies

We haven’t submitted this to CRAN yet - so you’ll need to install the development version, which you can do with:

options(
  repos = c(
    gretadev = 'https://greta-dev.r-universe.dev',
    CRAN = 'https://cloud.r-project.org'
    )
  )

# Install greta
install.packages('greta')

There are also a heap of bug fixes and new features, detailed here: https://greta-stats.org/news/index.html.

We’re going to be doing more regular release cycles in the future, I’m excited for what is in the pipeline!

2 Likes

Dear Nick (if I am right),
it works rather well for me under Windows (and R 4.0.4). I just had to do an extra command suggested by R/greta about installing greta dependencies (Python et al) and to adjust the time allowed to do so (sorry, I did not note the exact command but it was straightforward based on the instructions).
Sincerely,
Frédéric

1 Like

Hi Frédéric!

OK great, I am so glad to hear it installed easily - we might look into increasing the time to a different default level such as 10 minutes instead of 5 to avoid those issues.

Thank you again for testing it out, really appreciate it!

Cheers,

Nick

Hey Nick, this looks to be a nice helper function. I gave it a shot using Docker and came up a bit short, but that may be something on my end (user error). install_greta_deps() didn’t error out, but it did just hang there with no apparent progress, even after setting the max timeout to 15 minutes. I did, however, get the reticulate instructions to work. The image works great, and could likely be built using a different baselayer in the rocker stack (e.g., rocker/geospatial:4.1.2). Here is what I’ve got:

FROM rocker/geospatial:4.1.2

# Download and install miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
RUN bash Miniconda3-latest-Linux-x86_64.sh -b -p /miniconda
ENV PATH=$PATH:/miniconda/condabin:/miniconda/bin

# Update R packages and install greta
RUN Rscript -e "update.packages(ask = FALSE)" && \
    R -e "devtools::install_github('greta-dev/greta')"

# Install greta dependencies
RUN R -e "reticulate::conda_create( \
            envname = 'greta-env', python_version = '3.7' \
            )" && \
    R -e "reticulate::conda_install( \
            envname = 'greta-env', \
            packages = c('numpy==1.16.4', 'tensorflow-probability==0.7.0', 'tensorflow==1.14.0') \
            )" && \
    R - e "greta::normal(0, 1)"

# Install packages required for greta’s plotting functionality
RUN R -e "install.packages(c('igraph', 'DiagrammeR'))"
1 Like

Dear all,
I actually met the same problems as lzachmann: what I reported previously was conditional on a previous greta installation. When I tried to install greta under Windows 10 on computers that did not have greta installed previously, I met the same problems as lzachmann: install_greta_deps() got stuck at the image stage. I worked it out by first using

then using the instructions above.
Sincerely,
Frédéric

1 Like

Hi folks,

Thanks so much for trying it out!

Sorry it didn’t quite work the way we had hoped, we are about to get a windows machine to start interactively testing Greta on, as there are a few issues we want to iron out.

I’m currently away from my laptop, but I’ll take a closer look at this issue soon, the timeout feature hasn’t been behaving as we would have liked.

Wow, thanks so much for making the docker image! I’m trying to collect a few greta docker images together, so I’ve linked your image there: https://github.com/greta-dev/greta/issues/408, these will eventually end up on the website / a greta dockerhub account

:metal: just lemme know if I can help build / test at all! Happy to help.

1 Like

OK great! Will let you know.