fix(trainer): detect OpenShift pip permission error and document work…#46
Conversation
|
🎉 Welcome to the Kubeflow MCP Server! 🎉 Thanks for opening your first PR! We're happy to have you as part of our community 🚀 Here's what happens next:
Join the community:
Feel free to ask questions in the comments if you need any help or clarification! |
|
/lgtm OpenShift pip permission detection is exactly what we need. Consider consolidating with #47 if both touch the same error path. |
|
/ok-to-test |
d087685 to
40af07f
Compare
There was a problem hiding this comment.
@priyank766 One doc nit: the detection table + "/.local emptyDir fixes most pip issues" still send agents to emptyDir for Permission denied on /.local, but new version says the packages= pre-script never gets those mounts.
Can you split that case in the table (runtime writes to emptyDir; packages= to /workspace/lib workaround) so agents don't mis-route?
WDYT?
There was a problem hiding this comment.
Yeah Makes sense. I've split the error cases in both platform-fixes.md and troubleshooting.md to separate runtime write issues from the packages pre-script limitation.
@abhijeet-dhumal
…around Signed-off-by: priyank <priyank8445@gmail.com>
40af07f to
5b1f5bb
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhijeet-dhumal The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…RROR (kubeflow#46 covers it), add comprehensive HF tests Signed-off-by: Vidyansh <ezboi2312@gmail.com>
fix(trainer): detect OpenShift pip permission error and document workaround
Problem
fixes : #41
On OpenShift clusters with a restricted Security Context Constraint (SCC), the root filesystem is read-only. Running
run_custom_training(packages=[...])executespip install --user(writing to/.local), which fails with aPermissionError: [Errno 13] Permission denied: '/.local'because user-defined volumes are not mounted during the pre-script installation step.Changes
kubeflow_mcp/trainer/api/monitoring.py): Added an OpenShift-specific pattern to_FAILURE_PATTERNSto catch permission errors on/.localand return the workaround suggestion.kubeflow_mcp/trainer/__init__.py): Added prompt guidance underINSTRUCTION_SECTIONS["training"]advising AI agents to avoid thepackagesparameter on OpenShift.kubeflow_mcp/trainer/resources/platform-fixes.md): Documented the issue and the target-directory workaround.tests/unit/trainer/test_monitoring.py): Added a new test suite to verify the parser correctly matches and prioritizes the OpenShift error over generic permission errors.Workaround
Do not use the
packagesparameter on OpenShift. Instead, run the installation within the training script using:Verification