Skip to content

Conversation

@kevincheng2
Copy link
Collaborator

Motivation

将ds下发的mm_positions dict类型转换为ImagePosition 类型

Modifications

Usage or Command

Accuracy Tests

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

@paddle-bot
Copy link

paddle-bot bot commented Nov 24, 2025

Thanks for your contribution!

@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@b9bdf82). Learn more about missing BASE report.

Files with missing lines Patch % Lines
fastdeploy/engine/request.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #5182   +/-   ##
==========================================
  Coverage           ?   59.74%           
==========================================
  Files              ?      317           
  Lines              ?    38688           
  Branches           ?     5815           
==========================================
  Hits               ?    23115           
  Misses             ?    13747           
  Partials           ?     1826           
Flag Coverage Δ
GPU 59.74% <71.42%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

lizhenyun01
lizhenyun01 previously approved these changes Nov 25, 2025
and "mm_positions" in d["multimodal_inputs"]
and isinstance(d["multimodal_inputs"]["mm_positions"], list)
and len(d["multimodal_inputs"]["mm_positions"]) > 0
and not isinstance(d["multimodal_inputs"]["mm_positions"][0], ImagePosition)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这么复杂的条件,建议写成一个小的判断函数,也能知道这里判断的作用是什么

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,我改一下

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看了一下,from_dict是一个 classmethod 方法,不太适合调用类中的机器方法,还是写在里边比较好。简化了一下判断逻辑,同时加了注释,能清晰一些

Jiang-Jia-Jun
Jiang-Jia-Jun previously approved these changes Nov 25, 2025
@Jiang-Jia-Jun Jiang-Jia-Jun merged commit df2be1c into PaddlePaddle:develop Nov 25, 2025
14 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants