Red10 Python API
Python client for using: https://redten.io
-
To authenticate you will need valid login credentials
- Username
- Password
-
Please export these environment variables
export ENV_REDTEN_USER=Username export ENV_REDTEN_PASS=Password export ENV_REDTEN_EMAIL=Email export ENV_REDTEN_URL=https://api.redten.io
-
Optional exports
Set the csv file path. Note this file must be accessible on all worker nodes.
export ENV_REDTEN_CSV_FILE=<path to csv>
Send forecast results to emails. Comma-separated without any spacing.
export ENV_REDTEN_FORECAST_EMAILS=email1@email.com,email2@email.com
Can also set it to an empty string which will skip sending emails:
export ENV_REDTEN_FORECAST_EMAILS=
# Install required pips
pip install -r requirements.txtUnder the hood these are the current installed pips (pandas takes some time):
pandas==0.20.0rc1 requests>=2.13.0 uuid>=1.30 unittest2>=1.1.0 simplejson>=3.10.0
-
Install the pip from pypi repository
pip install redten
-
Run a prediction job
./bins/forecast.py <Dataset-Name>
-
Run a forecast job
./bins/predict.py
For more information:
Version
1.0.1
Debugging
I'm on fedora 24 and on a virtual env I started hitting:
Failed to Run ML Job with exception='unknown error (_ssl.c:2831)' Predict job failed with error=Failed to Run ML Job with exception='unknown error (_ssl.c:2831)
After I reinstalled certifi
it started working again.
pip uninstall certifi pip install certifi
Release Commands
- Upload to pypitest:
python setup.py sdist upload -r pypitest
- Upload to pypi:
python setup.py sdist upload -r pypi