Skip to content

Commit 7bb2984

Browse files
committed
docs: clarify Trainer namespace binding and CustomTrainer inputs
Signed-off-by: Shanhuizi Jiang <sjiang83@fordham.edu>
1 parent 93f5c33 commit 7bb2984

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ pip install -U kubeflow
6060
```
6161

6262
### Run your first PyTorch distributed job
63-
63+
> Design notes (KEP-936 alignment)
64+
>
65+
> - **Why SDK-wrapping (vs direct API):** the SDK provides a single Pythonic surface for auth/config, local execution modes, and consistent orchestration across BuiltinTrainer/CustomTrainer workflows.
66+
> - **Namespace binding (SDK reality):** `TrainerClient` binds namespace via `KubernetesBackendConfig(namespace=...)` (not per-call).
67+
> **MCP suggestion:** expose `namespace` as an explicit tool parameter, and internally create/cache a per-namespace `TrainerClient`.
68+
> - **CustomTrainer input (today):** pass a Python callable via `func=...` when constructing `CustomTrainer`. **Future/MCP-layer suggestion:** consider a `script_code: str` input (with `ast.parse` validation and denylisted imports) at the tooling layer, not as part of the current SDK.
69+
> - **Minimal toolset stance (MCP tools, not SDK methods):** start with orchestration tools (e.g. MCP `fine_tune` wrapping `TrainerClient.train`) + observability tools (e.g. MCP `get_training_logs` / `events` wrapping `TrainerClient.get_job_logs` / `TrainerClient.get_job_events`); gate fine-grained list/get tools via persona filtering.
6470
```python
6571
from kubeflow.trainer import TrainerClient, CustomTrainer, TrainJobTemplate
6672

0 commit comments

Comments
 (0)