Skip to content

refactor(BA-6629): stop models importing the registry and views layers#12436

Open
fregataa wants to merge 1 commit into
mainfrom
refactor/BA-6629-models-leaf
Open

refactor(BA-6629): stop models importing the registry and views layers#12436
fregataa wants to merge 1 commit into
mainfrom
refactor/BA-6629-models-leaf

Conversation

@fregataa

@fregataa fregataa commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove two models/* -> upper-layer import edges so editing these model files no longer fans out into the broader manager test/typecheck scope.
  • endpoint/row.py: move ModelServiceHelper.check_scaling_group (which imported manager.registry) into ModelServingRepository as the private method _check_inference_scaling_group; callers use self._check_inference_scaling_group(...).
  • replica_group/row.py: drop the to_*_scheduling_view methods (which imported manager.views); the row → view projection now lives as the private methods _to_*_scheduling_view on ReplicaGroupDBSource.

Notes

  • The models/image/row.py -> container_registry edge is split out to a separate sub-issue (not in this PR).

Test plan

  • CI: pants check (mypy) — moved method/function signatures resolve
  • CI: pants test — model_serving scaling-group check and replica_group scheduling-view projection behave unchanged

Resolves BA-6629

@github-actions github-actions Bot added size:L 100~500 LoC comp:manager Related to Manager component labels Jun 26, 2026
fregataa added a commit that referenced this pull request Jun 26, 2026
@fregataa fregataa marked this pull request as ready for review June 26, 2026 08:56
@fregataa fregataa requested a review from a team as a code owner June 26, 2026 08:56
Remove two models -> upper-layer import edges so editing these model
files no longer fans out into the broader manager test/typecheck scope.

- endpoint/row.py: move ModelServiceHelper.check_scaling_group (which
  imported manager.registry) into ModelServingRepository as the private
  method _check_inference_scaling_group; the model_serving test patches
  that method instead of the removed helper.
- replica_group/row.py: drop the to_*_scheduling_view methods (which
  imported manager.views); the row -> view projection now lives as the
  standalone private functions _to_*_scheduling_view in the replica_group
  db_source module, covered by a dedicated unit test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fregataa fregataa force-pushed the refactor/BA-6629-models-leaf branch from 2eb5302 to b868e8c Compare June 26, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:manager Related to Manager component size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant