Closed INF800 closed 4 years ago
Perhaps I do not understand, but why do you want to use FastAPI and Vapor together? Theoretically, you should be able to use FastAPI/Flask/Something in Swift but I would not recommend it. Python interoperatibility is meant for tools like pandas, for experimenting.
By the way, I have been using S4TF + Vapor for some time now and it is mostly OK, but sometimes you come across weird bugs. Because Vapor is built on stable swift toolchain but S4TF is based on latest, nightly, toolchains and therefore there is some incompatibility.
Also, python interoperability does not converts python code into native swift. It basically "just" calls python interpreter in the background.
Also, regarding Kitura, I'll point out that it's being transitioned to a community project, so I wouldn't totally write that out either. Most of the server-side Swift for TensorFlow projects I've seen have used Vapor or even SwiftNIO directly, however.
I see. I had misconception that that python code is converted to native code. Thanks for clearing it out @kongzii.
@BradLarson currently I am hosting my models using TFLite using FastAPI (something like this). Would I get almost same inference time when using server-side-swift? Or put it in other words, what is the BEST approach to deploy S4TF models on cloud?
Hi @rakesh4real !
This is a great question, but this is not something the core S4TF team is going to focus on in the short term. As a result, if folks in the community would like to put together some best practices to share, that would be great and we'd be happy to review!
In the meantime, we'll close this issue as it's not a focus of the team.
All the best, -Brennan
Hi, with IBM ditching kitura project I have second thoughts about using vapour for REST API service. So, the first most option that comes to my mind is Python Interoperability and FastAPI.