studio: drop unused max_grad_value schema + route plumbing#5424
Merged
Conversation
The MLX worker hardcodes max_grad_value to 5.0 after PR #5340. The schema field, frontend payload type, route forwarder, and start_training kwarg threading were all left in place as a transitional buffer for old clients. The field is now genuinely unused everywhere except inside the MLX worker, so the schema, route forwarder, and config-build entries can go. Pydantic still tolerates older clients that send max_grad_value because TrainingStartRequest's model_config defaults to extra=ignore.
for more information, see https://pre-commit.ci
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the max_grad_value parameter from the training configuration across the backend, including the core training logic, Pydantic models, API routes, and associated tests. I have no feedback to provide as there were no review comments to evaluate.
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
max_grad_valuefield fromTrainingStartRequest, the route forwarder inroutes/training.py, and the kwarg threading incore/training/training.py. PR MLX training support for Studio on Apple Silicon #5340 already hardcoded the MLX worker to(max_grad_norm=0.0, max_grad_value=5.0)and dropped the field from the frontend payload, so all the surviving references just shuffleNonethrough unused dict keys.test_training_backend_forwards_grad_clipping_controlsto no longer pass or assert on the removed field.max_grad_value: 1.0are silently accepted (Pydantic extra=ignore default).Test plan
python -m pytest studio/backend/tests/test_training_raw_support.py -v(6/6 green).