
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
TeachableHub Machine Learning Platform SDK. Deployments, Predictions, and Management.
Deployment, Prediction, and Management API interactions of TeachableHub Machine-Learning Deployment Platform via Python.
You can integrate this SDK in your training logic, Jupyter notebook during experimentation, or your CI/CD system during the production environment. This SDK is also applicable for deploying existing models from your model registry or storage.
from teachablehub.deployments.sklearn import TeachableDeployment
# ... training logic here ...
deployment = TeachableDeployment(
teachable="user/teachable",
environment="production",
deploy_key="your-deploy-key-here",
)
deployment.model(clf)
deployment.deploy(
summary="Automatic deployment from our CI via sklearn-deploy.py",
activate=True
)
We have prepared a couple of simple and advanced examples to show you some standard ways to integrate the TeachableHub platform very easily inside your training process. Also, there are ideas on how you can deploy your already trained and stored models to TeachableHub.
In the advanced examples, you will find some excellent tips and tricks on sharing knowledge between the training environment and the deployments via the Context API or creating and enforcing Features Schema with Validation to make your Model Serving API more understandable and secure.
Take a look at the examples here:
from teachablehub.clients import TeachableHubPredictAPI
teachable = TeachableHubPredictAPI(
teachable="user/teachable",
environment="production",
serving_key="your-serving-key-here"
)
predictions = teachable.predict([[0.03, 0.05, -0.002, -0.01, 0.04, 0.01, 0.08, -0.04, 0.005, -0.1]])
print(predictions)
from teachablehub.clients import TeachableHubPredictAPI
teachable = TeachableHubPredictAPI(
teachable="user/teachable",
environment="production",
serving_key="your-serving-key-here"
)
features = {
"age": 0.03,
"sex": 0.05,
"bmi": -0.002,
"bp": -0.01,
"s1": 0.04,
"s2": 0.01,
"s3": 0.08,
"s4": -0.04,
"s5": 0.005,
"s6": -0.1
}
predictions = teachable.predict(features, order='desc', limit=10, threshold=0.5)
print(predictions)
https://app.teachablehub.com/create
https://app.teachablehub.com/<user>/<teachable>/settings/deploy-keys
https://app.teachablehub.com/<user>/<teachable>/settings/serving-keys
from source
git clone https://github.com/teachablehub/python-sdk.git
cd python-sdk
python setup.py install
with pip
pip install teachablehub
Thanks for looking at this section. We're open to any cool ideas, so if you have one and are willing to share - fork the repo, apply changes and open a pull request. :)
Copyright (c) 2021 CloudStrap AD. See LICENSE for further details.
FAQs
TeachableHub Machine Learning Platform SDK. Deployments, Predictions, and Management.
We found that teachablehub demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.