kubeflow / kubeflow/mcp-server

get_runtime rejects the torchtune runtime names Trainer ships

Open Beginner friendly
#232 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
44
Forks
54
Avg merge
2d 18h
Merged PRs (30d)
29

Description

### Description

`get_runtime` and the `runtime` filter of `list_training_jobs` return `VALIDATION_ERROR` for any runtime name with a dot in it. All three torchtune runtimes that Kubeflow Trainer installs have one: `torchtune-llama3.2-1b`, `torchtune-llama3.2-3b` and `torchtune-qwen2.5-1.5b`. These are the runtimes `fine_tune()` needs, and its own error message suggests `torchtune-llama3.2-1b`.

ClusterTrainingRuntime names are Kubernetes object names, and dots are allowed there. The check came in with #163, so 0.1.1 is not affected.

### Steps to Reproduce

```python
from kubeflow_mcp.trainer.api.discovery import get_runtime, list_training_jobs
print(get_runtime("torchtune-llama3.2-1b"))
print(list_training_jobs(runtime="torchtune-qwen2.5-1.5b"))
```

No cluster needed. Against a cluster with Trainer v2.3.0 and its default runtimes, `list_runtimes` returns `torchtune-llama3.2-1b` and `get_runtime` on that same name fails.

### Expected Behavior

`get_runtime` returns the runtime and `list_training_jobs` filters by it.

### Actual Behavior

```
{'success': False, 'error': 'name must be lowercase alphanumeric with hyphens', 'error_code': 'VALIDATION_ERROR', 'details': {'value': 'torchtune-llama3.2-1b', 'pattern': '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'}, 'hint': None}
```

The `list_training_jobs` call fails the same way with `runtime must be lowercase alphanumeric with hyphens`.

### MCP Server Version

main at 0f90ca6

### Python Version

3.12

### Kubernetes Version

1.34

### MCP Client

Custom / Other

### References

#162, #163, https://github.com/kubeflow/trainer/tree/v2.3.0/manifests/base/runtimes/torchtune

I'll open a PR for this.

Contributor guide

Open the contributing guide

Research direction

Start in kubeflow_mcp.trainer.api.discovery at get_runtime and list_training_jobs, then inspect the validation introduced by #163. Reproduce the calls with the torchtune runtime names from the issue and verify that get_runtime returns the runtime and list_training_jobs accepts the runtime filter without validation errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, python
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.