Huggingface model deployer support#157
Huggingface model deployer support#157sanskriti2005 wants to merge 8 commits intozenml-io:developfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
First off, thank you for contributing! Started going through this, but the initial feedback is basically that I think we don't need most of these changes on the .tf files since the Hugging Face model deployer is serverless and doesn't rely on having a Kubernetes cluster to work.
So the output_file.tf changes are good, as are the variables updates, and the constants / enums, but all the rest is probably unneeded. You also probably want to allow the user to pass in a huggingface_token as a variable since then you can set that up already in the file (as described here https://docs.zenml.io/stack-components/model-deployers/huggingface). Maybe the namespace as well.
I think those would be the next changes I'd make here to bring you closer to having this ready.
| source = "../modules/istio-module" | ||
|
|
||
| count = (var.enable_model_deployer_seldon) ? 1 : 0 | ||
| count = (var.enable_model_deployer_huggingface || var.enable_model_deployer_seldon) ? 1 : 0 |
There was a problem hiding this comment.
I think this change is unneeded. We don't need istio for the HF deployer.
|
Thanks for the review! I will make these changes. Thank you so much for being patient with me on this. |
|
Hello! @strickvl |
strickvl
left a comment
There was a problem hiding this comment.
I made some more comments. There are still things in the terraform files that don't need to be there, IMO. I made the comments for one provider, but you can apply the same comments to the rest of the changed files.
src/mlstacks/constants.py
Outdated
| ], | ||
| "mlops_platform": ["zenml"], | ||
| "model_deployer": ["seldon"], | ||
| "model_deployer": ["seldon","huggingface"], |
There was a problem hiding this comment.
| "model_deployer": ["seldon","huggingface"], | |
| "model_deployer": ["seldon", "huggingface"], |
src/mlstacks/enums.py
Outdated
| FEATURE_STORE = "feature_store" | ||
| ANNOTATOR = "annotator" | ||
| IMAGE_BUILDER = "image_builder" | ||
|
|
src/mlstacks/enums.py
Outdated
| VERTEX = "vertex" | ||
| ZENML = "zenml" | ||
| DEFAULT = "default" | ||
| HUGGINGFACE = "huggingface" |
There was a problem hiding this comment.
Probably insert this in the alphabetical order...
| } | ||
|
|
||
| huggingface = { | ||
| version = "4.41.3" | ||
| name = "huggingface" | ||
| namespace = "huggingface-system" | ||
| workloads_namespace = "zenml-workloads-huggingface" | ||
| service_account_name = "huggingface" |
There was a problem hiding this comment.
I think we don't need this?
| name: eks_huggingface_model_deployer | ||
| configuration: {"kubernetes_context": "${aws_eks_cluster.cluster[0].arn}", "kubernetes_namespace": "${local.huggingface.workloads_namespace}", "base_url": "http://${module.istio[0].ingress-hostname}:${module.istio[0].ingress-port}"}} |
There was a problem hiding this comment.
This needs updating as we're no longer using EKS for this etc..
There was a problem hiding this comment.
@strickvl Thank you for the review! I understood everything else but for this part, Could you please provide more guidance or resources on how to do this part?
There was a problem hiding this comment.
Same theme here... we're not using a cluster any more for the HF deployment so no need to include all that stuff here..
…ttps://github.com/sanskriti2005/mlstacks into huggingface-model-deployer-support
Describe changes
Added support for the use of huggingface model deployer.
closes #151
Pre-requisites
Please ensure you have done the following:
accordingly.
developand the open PR is targetingdevelop. If your branch wasn't based on develop readContribution guide on rebasing branch to develop.
Types of changes
change)