Skip to content
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

Rewrite training component using kubeflow-training library #231

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from training import (
data_processing_op,
knowledge_processed_data_to_artifact_op,
pytorchjob_manifest_op,
pytorch_job_launcher_op,
skills_processed_data_to_artifact_op,
)
from utils import (
Expand All @@ -36,6 +36,7 @@
pvc_to_model_op,
pvc_to_mt_bench_op,
)
from utils.consts import RHELAI_IMAGE

TEACHER_CONFIG_MAP = "teacher-server"
TEACHER_SECRET = "teacher-server"
Expand Down Expand Up @@ -264,12 +265,13 @@ def ilab_pipeline(
# Training 1
# Using pvc_create_task.output as PyTorchJob name since dsl.PIPELINE_* global variables do not template/work in KFP v2
# https://github.com/kubeflow/pipelines/issues/10453
training_phase_1 = pytorchjob_manifest_op(
training_phase_1 = pytorch_job_launcher_op(
model_pvc_name=model_pvc_task.output,
input_pvc_name=sdg_input_pvc_task.output,
name_suffix=sdg_input_pvc_task.output,
output_pvc_name=output_pvc_task.output,
phase_num=1,
base_image=RHELAI_IMAGE,
nproc_per_node=train_nproc_per_node,
nnodes=train_nnodes,
num_epochs=train_num_epochs_phase_1,
Expand All @@ -284,12 +286,13 @@ def ilab_pipeline(
training_phase_1.set_caching_options(False)

#### Train 2
training_phase_2 = pytorchjob_manifest_op(
training_phase_2 = pytorch_job_launcher_op(
model_pvc_name=model_pvc_task.output,
input_pvc_name=sdg_input_pvc_task.output,
name_suffix=sdg_input_pvc_task.output,
output_pvc_name=output_pvc_task.output,
phase_num=2,
base_image=RHELAI_IMAGE,
nproc_per_node=train_nproc_per_node,
nnodes=train_nnodes,
num_epochs=train_num_epochs_phase_2,
Expand Down
Loading
Loading