-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huggingface model deployer support #157
base: develop
Are you sure you want to change the base?
Huggingface model deployer support #157
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -1,7 +1,7 @@ | |||
module "istio" { | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -38,7 +38,7 @@ | |||
"vertex", | |||
], | |||
"mlops_platform": ["zenml"], | |||
"model_deployer": ["seldon"], | |||
"model_deployer": ["seldon","huggingface"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"model_deployer": ["seldon","huggingface"], | |
"model_deployer": ["seldon", "huggingface"], |
src/mlstacks/enums.py
Outdated
@@ -31,6 +31,7 @@ class ComponentTypeEnum(str, Enum): | |||
FEATURE_STORE = "feature_store" | |||
ANNOTATOR = "annotator" | |||
IMAGE_BUILDER = "image_builder" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/mlstacks/enums.py
Outdated
@@ -50,6 +51,7 @@ class ComponentFlavorEnum(str, Enum): | |||
VERTEX = "vertex" | |||
ZENML = "zenml" | |||
DEFAULT = "default" | |||
HUGGINGFACE = "huggingface" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs updating as we're no longer using EKS for this etc..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
develop
and the open PR is targetingdevelop
. If your branch wasn't based on develop readContribution guide on rebasing branch to develop.
Types of changes
change)