Available framework version for AWS SageMaker SKLearn - amazon-sagemaker

I'm using SageMaker Python SDK's SKLearn class which has a parameter called framework version. Its default is 0.20.0.
I want to use a different version of Scikit-learn (0.21.0 or higher). It is possible? How do I know which versions are supported?

I actually couldn't find a nice link that showed this, but if you enter an incorrect framework the error message will print out the available versions.
estimator = SKLearn(
entry_point = "train.py",
source_dir = source_dir,
instance_type='ml.m4.xlarge',
role = role,
framework_version='0.30.0',
py_version = 'py3'
)
ValueError: Unsupported sklearn version: 0.30.0. You may need to upgrade your SDK version (pip install -U sagemaker) for newer sklearn versions.
Supported sklearn version(s): 0.20.0, 0.23-1.

Related

Is it possible to use Argon2 on Google App Engine Standard environment?

I'm in the process of migrating an application to Google App Engine. If possible I want to use the standard environment. My application uses Argon2 to hash passwords. Neither on PHP 7.2, 7.3 nor 7.4 Argon2 is available with a basic app.yaml file.
app.yaml:
runtime: php72|php73|php74
Is there any configuration I can adjust to get the support for Argon2?
In order to use Argon2 it is necessary to install 3rd party libraries that are not included in the php distributions (to install you do sudo apt install argon2 ). Based on this information, the best solution for you would be to use Cloud Run[1].
Follow the tutorial in the Cloud Run Quickstart [2], taking into account that you have to edit your Dockerfile to make sure that Argon2 is installed.
[1] https://cloud.google.com/serverless-options
[2] https://cloud.google.com/run/docs/quickstarts/build-and-deploy#php

tcms-api 5.3 package incompatible with Windows

I attempted to upgrade my tcms-api library from 5.0 to 5.3 using:
pip install tcms-api --upgrade
on a Windows 10 machine, I saw a lot of errors when trying to install the dependent package of kerberos. Even though this is old, I saw a similar set of errors. The package installation failed since the kerberos package isn't supported on Windows and I was left at tcms-api 5.0.
Please file a bug against https://github.com/kiwitcms/tcms-api.
We can do a quick fix by providing 2 package names:
tcms-api and tcms-api[kerberos]
The first one will not install the kerberos package.
The proposed workaround makes sense but changing the underlying kerberos implementation needs careful testing which isn't a quick job.
OTOH https://github.com/kiwitcms/python-social-auth-kerberos uses gssapi which seems to be the latest and most actively maintained implementation of Kerberos for Python. There is an open issue to migrate to that in tcms-api so you can contribute if you want.
As a workaround, I was able to do the following (caveat: I haven't extensively tested my installation yet):
Clone the tcms-api repo from GitHub
Edit setup.py to change the install_requires line to use 'kerberos-sspi' rather than 'kerberos'
Install the following pip packages: Setuptools, Wheel, Twine
CD to repo folder and run: python setup.py bdist_wheel
That creates a package under the dist folder
Run pip install dist\tcms_api-5.3-py3-none-any.whl
Celebrate successful package install
The steps were modified from this page.
Update:
I confirmed the things I need the API to do work with my custom package (create and update test runs). However, I'm in a situation where I don't need to specifically harden my Kiwi instance using kerberos authentication.

Pandas and Numpy Import error when using Apache2, Anaconda and Django

Am getting the following error - Missing required dependencies ['numpy']
Standalone and via Django, without Apache2 integration - the code work likes charm, however things start to fall when used with Apache2. It refuses to import pandas or numpy giving one error after another.
I am using Apache2, libapache2-mod-wsgi-py3, Python 3.5 and Anaconda 2.3.0
Request Method: GET
Request URL: http://127.0.0.1/api/users/0/
Django Version: 1.10.5
Exception Type: ImportError
Exception Value:
Missing required dependencies ['numpy']
Exception Location: /home/fractaluser/anaconda3/lib/python3.4/site-packages/pandas/__init__.py in <module>, line 18
Python Executable: /usr/bin/python3
Python Version: 3.5.2
Python Path:
['/home/fractaluser/anaconda3/lib/python3.4/site-packages',
'/home/fractaluser/anaconda3/lib/python3.4/site-packages/Sphinx-1.3.1-py3.4.egg',
'/home/fractaluser/anaconda3/lib/python3.4/site-packages/setuptools-27.2.0-py3.4.egg',
'/usr/lib/python35.zip',
'/usr/lib/python3.5',
'/usr/lib/python3.5/plat-x86_64-linux-gnu',
'/usr/lib/python3.5/lib-dynload',
'/usr/local/lib/python3.5/dist-packages',
'/usr/lib/python3/dist-packages',
'/var/www/html/cgmvp']
Server time: Fri, 9 Jun 2017 11:12:37 +0000
You can't force mod_wsgi built with the system Python version to use a Python virtual environment built for a different Python version, nor different Python installation. That is what it appears you are doing. You would need to uninstall mod_wsgi and install it from source code, compiling it against the Anaconda Python distribution. Best to use the pip install method and follow steps to integrate it into existing Apache installation. See:
https://pypi.python.org/pypi/mod_wsgi
Also see the following documentation for setting up a Python virtual environment with mod_wsgi, as it appears you aren't doing that in the recommended way either.
http://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
First task though is to reinstall mod_wsgi.
I had the same problem using apache2 with mod_wsgi python 3.6 envinronmet 64, the version numpy used was 1.13, only change the version with previous and worked !!.
pip3 install numpy==1.12

Mint 18.1, Ckan, SOLR schema version not supported

I'm a front-end developer and I need to do a Ckan Theme. To do so, I need a working source install of CKAN on my system. I'm using Mint 18.1 and installing Ckan 2.6.2.
Following the steps of the installation of ckan's docs I've got a warning and an error at step 6 as shown on the image.
As you can see the last line says SOLR schema version not supported: 2.7. Supported versions are [2.3] and I can't proceed with the installation. Searching on the Internet I found people having the same problem, but using Docker (have no idea what is this) and their solutions didn't work for me.
Because I have a really short time to build this theme I gave up CKAN 2.6.2 and installd 2.5.2 and everything worked fine.
The SOLR schema that comes with CKAN 2.6.2 is version 2.3, so somehow you have got 2.7, which is provided with later versions of CKAN. Maybe you installed CKAN master and the schema is lingering from then.
Here are some steps so that you can find out where the problem is:
You can check the version of the schema in the CKAN source repo on your disk:
grep 'name="ckan" version=' /usr/lib/ckan/default/src/ckan/ckan/config/solr/schema.xml
You would have then installed this file into Solr (in Step 5, using the 'ln' command). You can check the version in Solr:
grep 'name="ckan" version=' /etc/solr/conf/schema.xml
(When this file is changed, you need to restart SOLR (i.e. jetty) for it to take effect - see the docs again).
You can see what schema SOLR is actually using:
curl -s 'http://localhost:8983/solr/admin/file/?contentType=text/xml;charset=utf-8&file=schema.xml'|grep 'name="ckan" version='
Please do feed back on these.
It sounds like your Docker container for SOLR is a newer version than that is not compatible with CKAN 2.6.2.

Mongodb on plesk 12.5 and Ubuntu

I tried trying to install mongodb and php extension on my server with Ubuntu 14.04 and plesk 12.5 but without success of php extension. Anyone can help me with a simple tutorial on how to install mongodb driver and Mongo db php extension on my dedicated server?
Thanks
You can look on official documentation
DigitalOcean provides a detailed recipe: https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04
PHP MongoDB extension: installation from PECL
Forum AskUbuntu
Here you can see how you're installing multiple versions of PHP and switching them in Plesk.
Mind that you install every PHP version independently with its own extensions.
In your case you need to add MongoDB extension to some (or all) PHP versions you work with.

Resources