16 points · by rococode · 6y ago · 8 comments
I've been searching around and haven't found a clear standard/best way to do this.
Here are some of the options I've considered:
- Algorithmia (came across this yesterday, unsure how good it is and have some questions about the licensing)
- Something fancy with Kubernetes
- Write a load balancer and manually spin up new instances when needed.
Right now I'm leaning towards Algorithmia as it seems to be cost-effective and basically designed to do what I want. But I'm unsure how it handles long model loading times, or if the major cloud providers have similar services.
I'm quite new to this kind of architecture and would appreciate some thoughts on the best way to accomplish this!
Cortex automates all of the devops work—from containerizing your model, to orchestrating Kubernetes, to autoscaling instances to meet demands. We have a bunch of PyTorch examples in our repo, if you're interested: https://github.com/cortexlabs/cortex/tree/master/examples
Sagemaker takes care of infrastructure for you. It has also been integrated with various orchestrations like k8s, airflow etc.
https://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_...
With Kubernetes, you can either wrap your model inside a container or mount it into the container from a persistent volume.
As for scaling you have two options:
1) Horizontal Pod Autoscaler https://kubernetes.io/docs/tasks/run-application/horizontal-...
2) Knative, which is Kubernetes serverless on-prem solution.
The Software License section states:
> You do not transfer ownership of the Software to Algorithmia, but you do hereby grant Algorithmia, in its capacity as the provider of the Services, a worldwide, non-exclusive, perpetual, irrevocable, fully paid-up and royalty free license to use and permit others to use the Software (including the source code if made viewable) in any manner and without restriction of any kind or accounting to you, including, without limitation, the right to make, have made, sell, offer for sale, use, rent, lease, import, copy, prepare derivative works, publicly display, publicly perform, and distribute all or any part of the Software and any modifications, derivatives and combinations thereof and to sublicense (directly or indirectly through multiple tiers) or transfer any and all such rights; <and then some stuff about FOSS>
I'm no lawyer but my reading of this is that I own the IP but by using the platform Algorithmia receives a perpetual and irrevocable license to do as they please with the models, even if they're intended to be private.
Please correct me if I'm mistaken! I've been playing around with Algorithmia and quite like it, but that specific part is a bit off-putting and makes me hesitate to put the most important parts of our product on Algorithmia.
PyTorch? Dunno. Last I spoke to those ppl, they had a solution too.