Skip to content

Align SolverConfig with Pydantic discriminator pattern. - #2432

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_976726482
Sep 7, 2026
Merged

Align SolverConfig with Pydantic discriminator pattern.#2432
copybara-service[bot] merged 1 commit into
mainfrom
test_976726482

Conversation

@copybara-service

Copy link
Copy Markdown

Align SolverConfig with Pydantic discriminator pattern.

  • Wrap SolverConfig in Annotated[..., pydantic.Discriminator('solver_type')] directly at definition time, aligning with TransportModel, PedestalConfig, and FormationConfig.
  • Simplify ToraxConfig.solver to remove redundant field-level discriminator specification.
  • Add unit test verifying the solver_type discriminator error message.

- Wrap `SolverConfig` in `Annotated[..., pydantic.Discriminator('solver_type')]` directly at definition time, aligning with `TransportModel`, `PedestalConfig`, and `FormationConfig`.
- Simplify `ToraxConfig.solver` to remove redundant field-level discriminator specification.
- Add unit test verifying the `solver_type` discriminator error message.

PiperOrigin-RevId: 977603088
@copybara-service
copybara-service Bot merged commit 312f59f into main Sep 7, 2026
2 checks passed
@copybara-service
copybara-service Bot deleted the test_976726482 branch September 7, 2026 23:14
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