Repository navigation
genmedia-for-commerce: classifier matches look items by details; attached pins stay; look-crop shoes carry their upload - #2874
Merged
Conversation
…tails; attached pins stay; look-crop shoes carry their upload
lspataroG
requested review from
eliasecchig and
giuliosalierno
as code owners
November 6, 2026 11:42
| tiers = [hero.pick(p, None, c, PHOTOS[:3])[0] for p in (coat, bag)] | ||
| assert tiers == ["fallback", "fallback"] | ||
| tiers = [hero.pick(p, None, c, PHOTOS[:4])[0] for p in (coat, bag)] | ||
| assert tiers == ["fallback", "flat"] |
Contributor
There was a problem hiding this comment.
[MINOR] The test name says a flat photo that does not list its product is no hero, but line 1059 now asserts a flat hero for the bag. Can we update the test name to match what is being tested?
| ITEMS = ( | ||
| 'ITEMS: for every photo, "items" lists every product shown whole inside ' | ||
| "the frame, one entry per product: garments, shoes, bags, hats, glasses, " | ||
| 'ITEMS: "items" is [] for a photo of its product alone, nothing else ' |
Contributor
There was a problem hiding this comment.
[MINOR] Can we extract ITEMS as a constant in classify_prompt.py and import it here? It duplicates the prompt definition verbatim.
| if not front: | ||
| return [] | ||
| image = front[0].image | ||
| return [Detail("photo", "", "front", "", image, name="product photo")] |
Contributor
There was a problem hiding this comment.
[MINOR] use closeups.PHOTO here instead
| return long >= MIN_HERO_SIDE and short >= MIN_HERO_SHORT_SIDE | ||
|
|
||
|
|
||
| def product_photo(p: Product) -> list[Detail]: |
Contributor
There was a problem hiding this comment.
[MINOR] Perhaps this should be shoe_product_photo? It returns an empty list for any category other than "footwear".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary