-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add Supervised Fine Tuning Train Operator, Hook, Tests, Docs #41807
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
Conversation
tests/providers/google/cloud/hooks/vertex_ai/test_supervised_fine_tuning.py
Outdated
Show resolved
Hide resolved
airflow/providers/google/cloud/hooks/vertex_ai/supervised_fine_tuning.py
Outdated
Show resolved
Hide resolved
airflow/providers/google/cloud/hooks/vertex_ai/supervised_fine_tuning.py
Outdated
Show resolved
Hide resolved
airflow/providers/google/cloud/operators/vertex_ai/supervised_fine_tuning.py
Outdated
Show resolved
Hide resolved
airflow/providers/google/cloud/operators/vertex_ai/supervised_fine_tuning.py
Outdated
Show resolved
Hide resolved
|
@CYarros10 What do you think about adding Links to this Operator and, maybe, for the previous operators related to generative AI? It is an example of code how it looks for PipelineJob https://github.com/apache/airflow/blob/main/airflow/providers/google/cloud/operators/vertex_ai/pipeline_job.py#L115 and https://github.com/apache/airflow/blob/main/airflow/providers/google/cloud/links/vertex_ai.py#L329 |
I think this is a great idea, I would love to do this but want to prioritize CountTokensAPI and EvaluationAPI as these could be part of a broader LLM pipeline with SupervisedTuningFineTrainOperator and GenerativeModelGenerateContentOperator. Will work on Links when I've completed those first! |
|
Refactored the code in this PR to be included in |
MaksYermak
left a comment
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.
LGTM
potiuk
left a comment
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.
Nice one
This pull request adds the following:
SupervisedFineTuningHook: Hook for Google Cloud Vertex AI Supervised Fine Tuning APIs.
SupervisedFineTuningTrainOperator: Use the Google Cloud Supervised Fine Tuning API to create a tuning job.
About Model tuning: a crucial process in adapting Gemini to perform specific tasks with greater precision and accuracy. Model tuning works by providing a model with a training dataset that contains a set of examples of specific downstream tasks.
A sample DAG containing these operators could look like:
JSONL training data arrives in GCS >> GCSObjectExistenceSensor >> SupervisedFineTuningTrainOperator >> GenerativeModelGenerateContentOperator