this post was submitted on 20 Nov 2023
1 points (100.0% liked)

Machine Learning

1 readers
1 users here now

Community Rules:

founded 11 months ago
MODERATORS
 

I am a beginner to ML and cloud. I am planning on creating web APIs for some pre trained models i have gotten from the hugging face. My code need to take in text from other endpoints and return some classification data. I wanna deploy to google cloud, but unable to zero down on the best way. My options:-

  1. Dockerize. But then how do I scale it to use the gpus in the future.
  2. Colab Notebook. I was able to get the code working, but then how do I create an web endpoint? Missing knowledge here.
  3. Shud I just wrap my code in a flask endpoint and upload into an instance? Need some advice…
you are viewing a single comment's thread
view the rest of the comments
[–] dafuqq8@alien.top 1 points 10 months ago (1 children)

Hey, GCP is a great choice for MLOps. They offer an excellent service for various types of ML applications called Vertex AI.

The tabs you might be looking for are “Deploy and Use” (specifically, the model registry to import a pre-trained model) and “Model Development” for training a model.

Back to your original question: generally, you just need to create a Vertex AI endpoint. For scaling, you can select from many machine and accelerator types. You can then call the endpoint with Cloud Run, Cloud Functions, or the backend of your application using the ‘google-cloud-aiplatform’ SDK… Let me know if you have any troubles with this step.

Also, there is a JavaScript SDK, ‘@google-cloud/aiplatform’, which the Vertex AI team updates less often than the Python SDKs.

Here are some useful links:

Deploying HF models on Vertex AI

Deploying Torch models on Vertex AI

Feel free to ask me any clarification questions.

[–] grekt99@alien.top 1 points 10 months ago

Hey thank you so much for the info, that first link seems to be having wat I need. Will check it out.