docs(training-guides): daily fine-tuning pipeline with MLflow + TrustyAI#280
Open
typhoonzero wants to merge 2 commits into
Open
docs(training-guides): daily fine-tuning pipeline with MLflow + TrustyAI#280typhoonzero wants to merge 2 commits into
typhoonzero wants to merge 2 commits into
Conversation
…cking and TrustyAI evaluation Full solution guide under docs/en/training_guides/ that stitches together the smaller Kubeflow Pipelines + MLflow primer and TrustyAI LM-Eval reference into one end-to-end recipe: SFT Qwen3-0.6B with the HF Trainer + MLflow autologging, register the model in the MLflow Model Registry, deploy it as a KServe InferenceService, evaluate it with a TrustyAI LMEvalJob, log the results back into the same MLflow experiment, clean up the temporary serving resources, schedule the whole thing as a KFP Recurring Run, and compare day-over-day evaluation runs in MLflow. Also wires the new page into the training_guides Pick-a-path index and adds a See-also from pipelines-mlflow-integration.mdx. TrustyAI-slice smoke on the x86 dev cluster surfaced three gotchas that are now folded back into the guide: - ta-lmes-job runs as UID 65532 and needs pod.securityContext.fsGroup so the operator-managed output PVC is writable. - state=Complete is reached on both success and failure; check status.reason to distinguish them. - tokenized_requests: "False" does NOT skip AutoTokenizer.from_pretrained, so air-gapped clusters must use the offline PVC path in the LM-Eval docs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Deploying alauda-ai with
|
| Latest commit: |
c7b63c2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://91800880.alauda-ai.pages.dev |
| Branch Preview URL: | https://docs-finetune-pipeline-mlflo.alauda-ai.pages.dev |
… x86 + DSPO Fed back real findings from getting the pipeline to reach `Succeeded::9/9` on the x86 dev cluster (DSPO KFP backend, MLflow Cluster Plugin v3.10.0, HAMi vGPU): - KFP-v2 pods hit `runAsNonRoot` on argoexec/kfp-launcher; document the `spec.podSpecPatch` workaround and the auto-recycle-of-CreateContainerConfigError pods trick. - Shared PVC root dir is root-owned; either add `fsGroup: 1001` to the same podSpecPatch or bootstrap-chown once. - `python:3.12-slim` has `HOME=/`, so ModelScope/HF caches trip `PermissionError: '/.modelscope'` on non-root pods — set `MODELSCOPE_CACHE`, `HF_HOME`, `HOME` env vars in the component. - `torch>=2.3` pulls the full CUDA stack; use `torch==2.5.1+cpu` from Aliyun's pytorch-wheels mirror (Tsinghua does not host `+cpu` variants; pytorch.org is bandwidth-throttled to <100KB/s from mainland-China dev clusters). - KFP v2 `dsl.ExitHandler` fails DSPO compile with `unknown component implementation` — use `cleanup(...).after(evaluate)` and make cleanup idempotent (delete-by-label). - KServe vLLM runs as UID 1000; fine-tune writes as UID 1001 with umask 0660, so vLLM crashes with `FileNotFoundError: model.safetensors`. `chmod` the save directory to 0755/0644 after `save_pretrained`. - `mlflow.set_experiment(...)` must be called in every component that opens a nested run — otherwise MLflow defaults to experiment id 0 which the multi-tenant server rejects. - The Alauda MLflow plugin's default `/mlflow/artifacts` is emptyDir on the server pod, so client `log_artifacts` / `log_model` hits `PermissionError: '/mlflow'` and `create_model_version` rejects `file://` sources outside a run's artifact dir. Document the two options: reconfigure MLflow for S3, or skip the registry and coordinate via parent-run tags. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Author
Full E2E now green on
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
docs/en/training_guides/fine-tuning-pipeline-with-mlflow-trustyai.mdx— an end-to-end solution guide that stitches Kubeflow Pipelines, MLflow tracking + Model Registry, KServe, and TrustyAI LM-Eval into one recipe:Qwen/Qwen3-0.6Bwith the HFTrainer+report_to="mlflow", register the fine-tuned model in the MLflow Model Registry.InferenceService.LMEvalJoband log the metrics back into the same MLflow experiment as a nested run + a tag on the model version.dsl.ExitHandler.mlflow.search_runssnippet for a CI gate and aset_registered_model_alias("champion", …)snippet for promotion.Also wires the new page into the
training_guidesPick-a-path index and adds a "See also" line frompipelines-mlflow-integration.mdx.What's been validated
TrustyAI-slice smoke on the
x86dev cluster (only TrustyAI was installed; KFP + MLflow are not present, so the KFP orchestration is not exercised):ceph-rbdPVC.InferenceServiceon the HAMi vGPU with the platform'saml-vllm-0.20.2-cuda-13.0runtime;/v1/completionsreturns the expected Qwen3 answer.LMEvalJobCRD accepts the exact spec the guide'sevaluatecomponent builds and launchespython -m lm_evalwith the rightmodel_args.Three real gotchas surfaced by the smoke are now folded into the guide (see Prereqs + Troubleshooting):
ta-lmes-jobruns as UID 65532, sospec.pod.securityContext.fsGroup: 65532is required or the driver dies withopen …/output/stdout.log: permission denied.state == "Complete"is reached on both success and failure — the guide's wait loop now also checksstatus.reason == "Succeeded".tokenized_requests: "False"does not skipAutoTokenizer.from_pretrained(...), so air-gapped clusters must switch to the offline PVC path documented intrustyai/lm-eval.mdx.Test plan
yarn lintclean (verified locally).0 2 * * *and confirm two daily runs land as separate rows in the MLflow experiment.🤖 Generated with Claude Code