Skip to content

Fix python-black failure in lmdeploy device input preparation#334

Closed
Copilot wants to merge 1 commit into
mainfrom
copilot/fix-python-black-job
Closed

Fix python-black failure in lmdeploy device input preparation#334
Copilot wants to merge 1 commit into
mainfrom
copilot/fix-python-black-job

Conversation

Copilot AI commented Jun 25, 2026

Copy link
Copy Markdown

The python-black Actions job was failing on dlinfer/framework/lmdeploy_ext/device/__init__.py. This update brings custom_prepare_inputs_for_generation() back to the expected Black-formatted state so the PR no longer introduces formatting-only CI breakage.

  • Root cause

    • custom_prepare_inputs_for_generation() contained formatting drift in the multimodal input path.
    • The failing diff also showed a duplicated return_input_embeds assignment block, which caused Black to rewrite the file.
  • What changed

    • Removed the redundant return_input_embeds block in dlinfer/framework/lmdeploy_ext/device/__init__.py.
    • Normalized wrapping for long expressions in the multimodal preparation path to match Black 24.3 formatting.
    • Kept behavior unchanged; this is a formatting/duplication cleanup to unblock python-black.
  • Affected area

    • custom_prepare_inputs_for_generation()
      • multimodal input collection
      • vision embedding assignment
      • return_input_embeds computation
  • Representative cleanup

    return_input_embeds = self.is_spec_decoding and (
        pixel_values is not None or context.is_chunk_multimodal
    )

Copilot AI changed the title [WIP] Fix failing GitHub Actions job python-black Fix python-black failure in lmdeploy device input preparation Jun 25, 2026
Copilot AI requested a review from jinminxi104 June 25, 2026 05:31
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.

2 participants