Skip to content

[Feats] Invoke model faster#6

Open
duydoantechx wants to merge 1 commit intomainfrom
feats/input_config
Open

[Feats] Invoke model faster#6
duydoantechx wants to merge 1 commit intomainfrom
feats/input_config

Conversation

@duydoantechx
Copy link
Copy Markdown
Collaborator

No description provided.

@devloai
Copy link
Copy Markdown

devloai bot commented Jan 15, 2025

Automatic code review is enabled for this repository. Reviewing this PR now.

Copy link
Copy Markdown

@devloai devloai bot left a comment

Choose a reason for hiding this comment

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

The changes look good overall, adding performance optimization for model invocation. I've suggested a minor style fix for parameter formatting and raised a consideration about sync/async consistency. Please address these points to improve code quality and maintainability.

accept="application/json",
contentType="application/json",
body=json.dumps(request_body),
performanceConfigLatency = "optimized"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remove spaces around = in keyword argument to match PEP 8 style. Also, this parameter should be aligned with the others above it.

Suggested change
performanceConfigLatency = "optimized"
performanceConfigLatency="optimized"

accept="application/json",
contentType="application/json",
body=json.dumps(request_body),
performanceConfigLatency = "optimized"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider adding the same performance optimization to the sync client's _invoke_model_sync method for consistency. If there's a reason why it should only be applied to async calls, please document this in a comment.

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.

1 participant