Simplify PlacementResult#793
Conversation
Greptile SummaryThis PR unifies
Confidence Score: 5/5Safe to merge — all in-repo callers are updated, MultiEnvPlacementResult has no remaining references, and the simplified list return is consistent throughout. The change removes a wrapper class and flattens the return type to always be a plain list. Every call site in tests, notebooks, and the pooled placer has been updated. No remaining references to MultiEnvPlacementResult exist anywhere in the repository, and the new test_placement_result.py provides focused coverage of the remaining PlacementResult.success logic. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["ObjectPlacer.place(objects, num_envs)"] --> B["_place_ranked() → ranked_results_per_env"]
B --> C["results_per_env = [env[0] for env in ranked]"]
C --> D["return results_per_env ← list[PlacementResult]"]
D --> E1["Single-env caller\n(result,) = placer.place(...)"]
D --> E2["Multi-env caller\nfor r in placer.place(..., num_envs=N)"]
D --> E3["PooledObjectPlacer\nall_layouts = placer.place(..., num_envs=batch)"]
style D fill:#22c55e,color:#fff
style E1 fill:#3b82f6,color:#fff
style E2 fill:#3b82f6,color:#fff
style E3 fill:#3b82f6,color:#fff
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["ObjectPlacer.place(objects, num_envs)"] --> B["_place_ranked() → ranked_results_per_env"]
B --> C["results_per_env = [env[0] for env in ranked]"]
C --> D["return results_per_env ← list[PlacementResult]"]
D --> E1["Single-env caller\n(result,) = placer.place(...)"]
D --> E2["Multi-env caller\nfor r in placer.place(..., num_envs=N)"]
D --> E3["PooledObjectPlacer\nall_layouts = placer.place(..., num_envs=batch)"]
style D fill:#22c55e,color:#fff
style E1 fill:#3b82f6,color:#fff
style E2 fill:#3b82f6,color:#fff
style E3 fill:#3b82f6,color:#fff
Reviews (4): Last reviewed commit: "remove multi-env" | Re-trigger Greptile |
375482d to
d1aa47c
Compare
alexmillane
left a comment
There was a problem hiding this comment.
Thanks for the clean up!
Signed-off-by: zhx06 <zihaox@nvidia.com>
d1aa47c to
90676a2
Compare
Summary
Unify
PlacementResultandMultiEnvPlacementResultDetailed description
MultiEnvPlacementResult