From the course: MLOps Tools: MLflow and Hugging Face
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Saving and serving MLflow models - Hugging Face Tutorial
From the course: MLOps Tools: MLflow and Hugging Face
Saving and serving MLflow models
- Now that you know how to register some of the models that you'll be working with, it's time to find about how to interact with them. And one way that you can do that is by serving them. We've already seen a little bit of these script that I created to log that model, which has a couple of components. The first component is this one where we have the summarizer class, which inherits from this Python model class. So as you know, this is so that you can, so that ML flow understands how to interact with that. And in this case, we've used a hugging phase, API so that we can do some predictions. In reality what we're doing is translating English to German. As you can see here, we're going to get the input and then we're going to use that input to the tokenizer. And then the predict method is going to return the actual output. Now we've also, and this is pretty important, especially when you're serving, we've also determined that we have the model input and model output right there. And we…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.