Skip to content

studio: drop unused max_grad_value schema + route plumbing#5424

Merged
danielhanchen merged 2 commits into
mainfrom
fix/drop-max-grad-value-schema
May 14, 2026
Merged

studio: drop unused max_grad_value schema + route plumbing#5424
danielhanchen merged 2 commits into
mainfrom
fix/drop-max-grad-value-schema

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

  • Removes the now-unused max_grad_value field from TrainingStartRequest, the route forwarder in routes/training.py, and the kwarg threading in core/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 shuffle None through unused dict keys.
  • Updates test_training_backend_forwards_grad_clipping_controls to no longer pass or assert on the removed field.
  • API contract preserved: older clients that still POST max_grad_value: 1.0 are silently accepted (Pydantic extra=ignore default).

Test plan

  • python -m pytest studio/backend/tests/test_training_raw_support.py -v (6/6 green).
  • Studio API + Auth tests on CI.
  • Wheel build + import smoke (the field is private to Studio backend; should be a no-op for non-Studio users).

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@danielhanchen danielhanchen merged commit 4192fe6 into main May 14, 2026
28 of 31 checks passed
@danielhanchen danielhanchen deleted the fix/drop-max-grad-value-schema branch May 14, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant