Prophet package and credentials

First off, great service. I can see the potential contribution to teaching, collaboration, and promoting open science. I was kicking the tires and noticed a problem when attempting to install the prophet package. It is a little different in that it requires compiling at installation. It seems the requisite rtools and rstan are in place, but it still fails.

Also, I want to inquire about credential storage. I am all for public sharing of code, but you should have some facility (private .Rprofile) for storing webservice keys and authentication credentials in a private space.



Do you mind sharing the output when you try to install the prophet package? Some packages can fail to compile if they use a lot of memory during compilation.

In terms of credential storage, while its not as secure as it could be, we are working on a change where we will restructure the disk layout of projects and make is so that the files stored in the home directory are NOT shared (only the files in the "Project" folder will be shared). Once rolled out, you could put your API keys in ~/.Rprofile and they would remain private when you share the project. Let me know if you think this will help.



Andy, thanks for the quick response. On treatment and storage of credentials, it has been my practice to create (R package digest) encrypted txt files that contained sensitive keys and source them in my code. I would be happy with a solution that allowed those files to be uploaded and stored in my project folder.Here is the output from the attempt to install the prophet package:

* installing *source* package ‘prophet’ ...
** package ‘prophet’ successfully unpacked and MD5 sums checked
** libs
installing via 'install.libs.R' to /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/prophet
Compiling models (this will take a minute...)
Writing models to: /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/prophet/libs
Compiling using binary: /opt/R/3.4.4/lib/R/bin
Warning: running command '/opt/R/3.4.4/lib/R/bin/R CMD SHLIB file10c31f115d2.cpp 2> file10c31f115d2.cpp.err.txt' had status 1
In file included from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/smart_ptr/shared_ptr.hpp:28:0,

more similar stuff......

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
make: *** [file10c31f115d2.o] Error 4

ERROR(s) during compilation: source code errors or compiler configuration errors!

Program source:
  2: // includes from the plugin
  5: // user includes
  6: #define STAN__SERVICES__COMMAND_HPP// Code generated by Stan version 2.17.0
  8: #include <stan/model/model_header.hpp>
 10: namespace model10c700d6f6d_prophet_logistic_growth_namespace {
 12: using std::istream;
 13: using std::string;
 14: using std::stringstream;
 15: using std::vector;
 16: using stan::io::dump;
 17: using stan::math::lgamma;
 18: using stan::model::prob_grad;
 19: using namespace stan::math;

more stuff ...

Error in compileCode(f, code, language = language, verbose = verbose) : 
  Compilation ERROR, function(s)/method(s) not created! In file included from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/smart_ptr/shared_ptr.hpp:28:0,
                 from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/shared_ptr.hpp:17,
                 from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/StanHeaders/include/stan/math/prim/mat/fun/LDLT_factor.hpp:7,
                 from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/StanHeaders/include/stan/math/prim/mat/err/check_ldlt_factor.hpp:6,
                 from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/StanHeaders/include/stan/math/prim/mat.hpp:26,
                 from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/StanHeaders/include/stan/math/rev/mat.hpp:12,
                 from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/StanHeaders/include/stan/math.hpp:4,
                 from /home/rstudio-user/R/x86_64-pc-linux-gnu-libr
* removing ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.4/prophet’
Warning in install.packages :
  installation of package ‘prophet’ had non-zero exit status

1 Like

It looks like you're hitting an issue with the memory limits causing the compiler to be killed. Currently projects are limited to 1GB of memory. I'll see if we can cache a binary version of the package for you, which should solve the problem.

If the files are encrypted, what prevents you from uploading them to your Projects today? I am assuming you would not also store the key with the Project.

1 Like

Good point, I went ahead an loaded the txt files. Thanks for looking into a binary.

1 Like