data-science

2024-04-09T08:11:46.564249Z

tc/tmd observation -> I find if I'm going through a series of transforms on a dataset or seq of datasets and I need to use as-> to put things in the right place in the pipeline, then I probably need to split things up into two functions (one w/the data at the front and the other with the data at the back)

👍 1
❤️ 1
Nick McAvoy 2024-04-09T02:41:15.643549Z

Hi there 👋 . I'd love to have time soon to get involved in this community. Related to this, I have a basic question or two: Let's say I'm building a backend service that takes input from a computer vision model. The model is trained by a colleague probably using python. What are the chances that I can deploy the model inside my clojure service? Or alternatively, am I looking at trying to interoperate with a python process? I know that's a vague description - this is somewhat speculative now, and I'm brand new to data science/ML.

2024-04-09T16:34:14.332769Z

Or you deploy / wrap the python model as is, in python and give it a JSON API. That is easely callable from any language

Nick McAvoy 2024-04-09T19:03:09.804509Z

Thanks for the replies. Beyond libpython-clj or wrapping in an API, is there a story where a python model is exported into some format that a Java/Clojure process can load?

Nick McAvoy 2024-04-09T03:05:17.940379Z

Once I typed this, I realized loading the model inside my service may not be ideal. Other than the CV component, my service is a more conventional rest API. Maybe the function from video stream to classified actions is its own service, which my service needs to interact with somehow. Maybe the model is deployed in some magic AWS service, and I need to think about consuming that output from my Clojure API?

Nick McAvoy 2024-04-09T03:27:01.074839Z

Or.. maybe the model can be deployed in the client? Then there is no video stream going over the network, and my API just gets tidy actions as parameters in a POST body?

teodorlu 2024-04-09T05:35:57.175529Z

Hi! > [...] interoperate with a Python process > If you choose to go this way, you can use libpython-clj to call Python from your clojure code: https://github.com/clj-python/libpython-clj I don't shave any recommendations about what you should do for your case (you mentioned other options), but I think trying to use libpython-clj is a decent place to start!