You don’t need an HTTP application to make a service. Depending on your requirements, you might not need anything besides Python’s standard library. Implementing a socket-based service using the Python standard library socketserver
module is straightforward with minimal introduction, which I plan to provide here.
Quick definition of terms, here. When I say service, in our current context I mean a program that accepts network-protocol connections from other (potentially remote) processes and handles their requests. When I first started creating services, I remember thinking I need an endpoint that I can hit with a request to [get something done]. …
If you visit the Scikit-Learn developer’s guide, you can easily find a breakdown of the objects that they expect you to customize. It includes the Estimator, Predictor, Transformer, and Model classes, and there’s a nice guide walking you through the ins and outs of their APIs.
But if for some (potentially misguided) reason you’ve decided to implement your own subclass of the sklearn.pipeline.Pipeline
class, then you’ll be stepping off the marked trail, and you’re going to need your jungle gear: plenty of coffee, the built-in function dir
, the pdb
module, and a pillow to scream into occasionally.
When it comes to…
John is a software engineer who primarily works in data science platform design.