-
Notifications
You must be signed in to change notification settings - Fork 659
[BugFix] fix mm_positions type error #5182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for your contribution! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5182 +/- ##
==========================================
Coverage ? 59.74%
==========================================
Files ? 317
Lines ? 38688
Branches ? 5815
==========================================
Hits ? 23115
Misses ? 13747
Partials ? 1826
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fastdeploy/engine/request.py
Outdated
| 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这么复杂的条件,建议写成一个小的判断函数,也能知道这里判断的作用是什么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,我改一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看了一下,from_dict是一个 classmethod 方法,不太适合调用类中的机器方法,还是写在里边比较好。简化了一下判断逻辑,同时加了注释,能清晰一些
Motivation
将ds下发的mm_positions dict类型转换为ImagePosition 类型
Modifications
Usage or Command
Accuracy Tests
Checklist
[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]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.