Giter VIP home page Giter VIP logo

lambda-r-survival-stats's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lambda-r-survival-stats's Issues

R Query

Where is the R script and how do I load the R libraries. Also how can I pass parameters to the R Script....do we send the input parameters to Python and Python sends it to R. I am unable to understand where do R and its related libraries come into the picture as I do not see a single script.R file which is supposed to take the input parameters and do the calculation using known R libraries and output the result back to the API

OSError: lib/libRrefblas.so: undefined symbol: xerbla_

Thanks for sharing your code on how to use R on AWS.

Unfortunately if i follow your code with the current Lambda-AMI i get the following error when testing it on a new AWS instance:

[ec2-user@***]$ python ./test_handler.py
Traceback (most recent call last):
  File "./test_handler.py", line 17, in <module>
    import handler
  File "/home/ec2-user/handler.py", line 29, in <module>
    ctypes.cdll.LoadLibrary(os.path.join('lib', file))
  File "/usr/lib64/python2.7/ctypes/__init__.py", line 438, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib64/python2.7/ctypes/__init__.py", line 360, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: lib/libRrefblas.so: undefined symbol: xerbla_

I tried googling for it but unfortunately do not understand how to fix this...
Any idea?

While running the script it throws the following error:

cp: cannot stat '/usr/lib64/libblas.so.3': No such file or directory
cp: cannot stat '/usr/lib64/liblapack.so.3': No such file or directory

I tried installing these libraries using

sudo yum -y install blas
sudo yum -y install lapack

And then ran the script again... still same error

The script installs the current R version 3.3.2 - dont know if this helps

Might that have something to do with openBlas VS blas?
https://bodhi.fedoraproject.org/updates/rkward-0.6.5-3.fc24%20rpy-2.8.3-1.fc24%20R-3.3.2-2.fc24/edit

Python 3

Thanks for this great worked example!

When I run the build file I get an error - I believe rpy2 is looking for python3, not 2.7.

Thoughts about where in the build script I might change this?

Collecting rpy2
  Downloading https://files.pythonhosted.org/packages/f1/98/c7652cc9d7fc0afce74d2c30a52b9c9ac391713a63d037e4ab8feb56c530/rpy2-2.9.4.tar.gz (194kB)
    100% |████████████████████████████████| 204kB 13.4MB/s 
    Complete output from command python setup.py egg_info:
    rpy2 is no longer supporting Python < 3. Consider using an older rpy2 release when using an older Python release.
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-iPB2pw/rpy2/

Step 8: Deploy the Lambda function --- Not Fully Understood

I do not know how to apply Step 4 as mentioned here: https://aws.amazon.com/blogs/compute/extracting-video-metadata-using-lambda-and-mediainfo/
for our purposes.
I created the role for lambda_trust_policy and I skipped the DynamoDB related role creation as we are not doing anything with DynamoDB.
Then I execute this command:

    --function-name MyAmazingLambda \
    --runtime python2.7 \
    --role LambdaMediaInfoExecutionRole \
    --handler handler.lambda_handler \
    --description "My Amazing Lambda Function" \
    --timeout 30 \
    --memory-size 1536 \
    --zip-file fileb://lambda_r_survival.zip

but I get the following complaint:

When calling the CreateFunction operation: 1 validation error detected: Value 'LambdaMediaInfoExecutionRole' at 'role' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+

Could you be so kind to specify more what needs to be done under Step 8: Deploy the Lambda function so I do not encounter the above error?

Thank

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.