Skip to content

refactor: organize layout utils - #291

Merged
sovrasov merged 3 commits into
mainfrom
vs/preproc_utils
Sep 25, 2026
Merged

sovrasov merged 3 commits into
mainfrom
vs/preproc_utils

Conversation

@sovrasov

Copy link
Copy Markdown
Contributor

Summary

  • Organize layout utils to avoid cluttering of the preprocessors folder

Why

  • Desired state is that each file or folder in preprocessors reproduces either a specific generic preprocessor or a pipeline for a particular policy.

Breaking changes

  • None

Copilot AI lite review requested due to automatic review settings September 23, 2026 09:23
@sovrasov
sovrasov requested a review from a team as a code owner September 23, 2026 09:23

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Removing image_layout breaks downstream imports; add a compatibility shim or document the breaking change.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Low severity

Open (2)
What changed in this PR

Refactors preprocessor layout utilities into dedicated enum and utility modules.

Changes:

  • Moves ImageLayout to enums.py.
  • Moves layout inference to utils/layout_utils.py.
  • Updates imports and package exports.
File Summary
src/​physicalai/​inference/​preprocessors/​utils/​layout_utils.py Hosts layout inference; restore the standard license header.
src/​physicalai/​inference/​preprocessors/​utils/​__init__.py Adds the utilities package; restore the standard license header.
src/​physicalai/​inference/​preprocessors/​smolvla.py Updates layout utility imports.
src/​physicalai/​inference/​preprocessors/​resize.py Updates layout imports; preserve compatibility for the removed image_layout module.
src/​physicalai/​inference/​preprocessors/​enums.py Defines ImageLayout.
src/​physicalai/​inference/​preprocessors/​__init__.py Re-exports ImageLayout.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/physicalai/inference/preprocessors/resize.py
Comment thread src/physicalai/inference/preprocessors/utils/__init__.py
sovrasov and others added 2 commits September 23, 2026 11:27
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sovrasov
sovrasov merged commit 9ada068 into main Sep 25, 2026
41 checks passed
@sovrasov
sovrasov deleted the vs/preproc_utils branch September 25, 2026 08:34
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.

3 participants