-
Notifications
You must be signed in to change notification settings - Fork 542
Update examples for deployed pipelines #3960
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
base: feature/served-pipelines
Are you sure you want to change the base?
Update examples for deployed pipelines #3960
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 ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Broken Links ReportSummary
Details
📂 Full file paths
|
Documentation Link Check Results❌ Absolute links check failed |
Classification template updates in |
…for OpenAI in agent.yaml.- Integrate LLM responses and classifier upgrades in agent pipeline.- Log metadata for training and response generation
…isc/update-examples-deployed-pipelines
…Rename agent_serving_pipeline to support_agent
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
settings: | ||
docker: | ||
requirements: requirements.txt | ||
parent_image: zenmldocker/zenml:0.85.0-py3.12 |
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.
remove
settings={ | ||
"docker": DockerSettings( | ||
requirements="requirements.txt", | ||
parent_image="zenmldocker/zenml:0.85.0-py3.12", |
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.
remember to remove
settings={ | ||
"docker": DockerSettings( | ||
requirements="requirements.txt", | ||
parent_image="zenmldocker/zenml:0.85.0-py3.12", |
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.
remember to remove
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.
Getting there. Bunch of small suggestions, but yeah almost there!
(Thanks for adding the eval pipeline too!)
examples/quickstart/run.py
Outdated
Usage: | ||
python run.py --train # Train classifier and tag as production |
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.
add the rest of the options here as well?
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.
(or delete)
# limitations under the License. | ||
# | ||
from typing import Optional | ||
#!/usr/bin/env python3 |
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.
Does this file (and others) need the ZenML license at the top?
("good morning", "general"), | ||
("i have a question about my account", "general"), | ||
("what services do you offer", "general"), | ||
("i need assistance with banking", "general"), |
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 need assistance with banking", "general"), | |
("i need assistance with banking", "general"), | |
# More Card Lost (6 examples) | |
("please freeze my card i cant find it", "card_lost"), | |
("how do i report my card stolen", "card_lost"), | |
("need a new card mine went missing", "card_lost"), | |
("lost debit card cancel it now", "card_lost"), | |
("misplaced my credit card can you disable it", "card_lost"), | |
("i lost my atm card what now", "card_lost"), | |
# More Payments (6 examples) | |
("set up autopay for my account", "payments"), | |
("why was my payment declined", "payments"), | |
("make a one time payment today", "payments"), | |
("can i change my payment date", "payments"), | |
("payment is pending how long will it take", "payments"), | |
("set a recurring monthly payment", "payments"), | |
# More Account Balance (6 examples) | |
("whats my available credit right now", "account_balance"), | |
("show balance for my checking account", "account_balance"), | |
("how much can i spend before reaching my limit", "account_balance"), | |
("tell me my statement balance", "account_balance"), | |
("balance inquiry please", "account_balance"), | |
("how much do i have available to spend", "account_balance"), | |
# More Dispute (6 examples) | |
("i want to file a chargeback", "dispute"), | |
("merchant charged me twice", "dispute"), | |
("charged the wrong amount", "dispute"), | |
("i didnt receive the service i paid for", "dispute"), | |
("how do i dispute a fraudulent transaction", "dispute"), | |
("there is an unauthorized withdrawal on my card", "dispute"), | |
# More Credit Limit (6 examples) | |
("lower my credit limit please", "credit_limit"), | |
("temporary limit increase for travel", "credit_limit"), | |
("why was my credit limit reduced", "credit_limit"), | |
("can you review my credit line", "credit_limit"), | |
("whats my current credit limit", "credit_limit"), | |
("reduce my credit line for safety", "credit_limit"), | |
# More General (6 examples) | |
("good afternoon", "general"), | |
("thanks for your help", "general"), | |
("i need support with my account", "general"), | |
("can i talk to an agent", "general"), | |
("help please", "general"), | |
("can you assist me with something", "general"), |
Added some more examples
examples/quickstart/steps/data.py
Outdated
|
||
logger = get_logger(__name__) | ||
|
||
# Expanded dataset for intent classification with more diverse examples |
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.
# Expanded dataset for intent classification with more diverse examples |
@@ -0,0 +1,106 @@ | |||
"""Visualization utilities for the ZenML quickstart.""" |
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.
Small thing, but not sure all this logic should be in an init 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.
This is fine i think
examples/quickstart/README.md
Outdated
This quickstart demonstrates the evolution from generic LLM responses to structured, intent-driven customer support. You'll see how adding a simple intent classifier dramatically improves response quality and user experience. We will: | ||
|
||
Unlike traditional MLOps tools, ZenML offers unparalleled flexibility and control. It integrates seamlessly with your infrastructure, allowing both ML and Ops teams to collaborate effectively without compromising on their specific requirements. | ||
- Deploy a generic LLM agent that gives general banking advice |
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.
- Deploy a generic LLM agent that gives general banking advice | |
- Deploy a generic LLM agent that gives generic banking advice |
examples/quickstart/README.md
Outdated
Unlike traditional MLOps tools, ZenML offers unparalleled flexibility and control. It integrates seamlessly with your infrastructure, allowing both ML and Ops teams to collaborate effectively without compromising on their specific requirements. | ||
- Deploy a generic LLM agent that gives general banking advice | ||
- Train an intent classifier and tag it as "production" | ||
- Compare generic responses vs. structured, targeted responses |
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.
Are we missing the part where we deploy the intent classifier and/or use it in a
newly deployed agent or something? At least in this story, I somehow assume that
when I run an eval, I'm comparing against two deployments.
examples/quickstart/README.md
Outdated
def my_pipeline(): | ||
data = load_data() # Step 1: Load data | ||
model = train_model(data) # Step 2: Train model using data from step 1 | ||
do_agentic_loop(model) # Step 3: Evaluate the model with an agent (toy example) |
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.
the comments are out of step with the names of the steps..
examples/quickstart/README.md
Outdated
``` | ||
|
||
You can edit `configs/training_aws.yaml` to adjust the settings for running your pipeline in aws. | ||
This generates: |
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.
Include screenshots of the visualizations?
examples/quickstart/README.md
Outdated
|
||
zenml stack set <INSERT_YOUR_STACK_NAME_HERE> | ||
python run.py --model_type=t5-small | ||
The magic happens in the init hook: |
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.
link to our docs on hooks?
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Describe changes
I implemented/fixed _ to achieve _.
Pre-requisites
Please ensure you have done the following:
develop
and the open PR is targetingdevelop
. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.Types of changes