Skip to content

Commit d6a1020

Browse files
[KFTO-SDK] Add doc on cutomizing base images for Train API
Follow up from kubeflow/trainer#2261 as this is a user facing change. Signed-off-by: Varsha Prasad Narsing <[email protected]>
1 parent b83d113 commit d6a1020

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

content/en/docs/components/training/user-guides/fine-tuning.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,19 @@ TrainingClient().train(
8787
After you execute `train`, the Training Operator will orchestrate the appropriate PyTorchJob resources
8888
to fine-tune the LLM.
8989

90+
## Using custom images with Fine-Tuning API
91+
Platform engineers can customize the storage initializer and trainer images by setting the `STORAGE_INITIALIZER_IMAGE` and `TRAINER_TRANSFORMER_IMAGE` environment variables before executing the `train` command.
92+
93+
For example: In your python code, set the env vars before executing `train`:
94+
95+
```python
96+
...
97+
os.environ['STORAGE_INITIALIZER_IMAGE'] = 'docker.io/<username>/<custom-storage-initiailizer_image>'
98+
os.environ['TRAINER_TRANSFORMER_IMAGE'] = 'docker.io/<username>/<custom-trainer_transformer_image>'
99+
100+
TrainingClient().train(...)
101+
```
102+
90103
## Next Steps
91104

92105
- Run the example to [fine-tune the TinyLlama LLM](https://github.com/kubeflow/training-operator/blob/6ce4d57d699a76c3d043917bd0902c931f14080f/examples/pytorch/language-modeling/train_api_hf_dataset.ipynb)

0 commit comments

Comments
 (0)