-
Notifications
You must be signed in to change notification settings - Fork 2
Added script to measure latency #173
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
| visualization_prompt = state.get("visualization_prompt") | ||
| result = ExecutionResult( | ||
| text=last_ai_message.text(), | ||
| text=last_ai_message.text, |
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.
New version of LangChain raise deprecation warning on this.
examples/latency.py
Outdated
|
|
||
|
|
||
| def run_scenario() -> bool: | ||
| DB_PATH = file_path / "web_shop_orders/data/web_shop.duckdb" |
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.
DB_PATH isn’t a global constant here, so it would be better to use lowercase to match the naming conventions.
examples/latency.py
Outdated
| print( | ||
| f"Mean time: {sum(time_measures) / len(time_measures):.2f} seconds, Std: {pd.Series(time_measures).std():.2f}" | ||
| ) |
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.
To make this a bit cleaner, I’d suggest rewriting it as:
measures = pd.Series(time_measures)
print(
f"Mean time: {measures.mean():.2f} seconds, Std: {measures.std():.2f}"
)
catstrike
left a comment
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.
Please squash commits before merging
No description provided.