Skip to content
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

Bullseye #3008

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libs/cli/langgraph_cli/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import json

Check notice on line 1 in libs/cli/langgraph_cli/config.py

View workflow job for this annotation

GitHub Actions / benchmark

Benchmark results

......................................... fanout_to_subgraph_10x: Mean +- std dev: 61.1 ms +- 1.3 ms ......................................... fanout_to_subgraph_10x_sync: Mean +- std dev: 53.0 ms +- 0.7 ms ......................................... fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 74.5 ms +- 1.2 ms ......................................... fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 95.3 ms +- 0.7 ms ......................................... fanout_to_subgraph_100x: Mean +- std dev: 620 ms +- 28 ms ......................................... fanout_to_subgraph_100x_sync: Mean +- std dev: 520 ms +- 12 ms ......................................... fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 796 ms +- 20 ms ......................................... fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 972 ms +- 22 ms ......................................... react_agent_10x: Mean +- std dev: 31.0 ms +- 0.7 ms ......................................... react_agent_10x_sync: Mean +- std dev: 23.1 ms +- 0.2 ms ......................................... react_agent_10x_checkpoint: Mean +- std dev: 38.5 ms +- 1.0 ms ......................................... react_agent_10x_checkpoint_sync: Mean +- std dev: 36.9 ms +- 0.6 ms ......................................... react_agent_100x: Mean +- std dev: 344 ms +- 6 ms ......................................... react_agent_100x_sync: Mean +- std dev: 272 ms +- 2 ms ......................................... react_agent_100x_checkpoint: Mean +- std dev: 637 ms +- 6 ms ......................................... react_agent_100x_checkpoint_sync: Mean +- std dev: 618 ms +- 6 ms ......................................... wide_state_25x300: Mean +- std dev: 23.2 ms +- 0.4 ms ......................................... wide_state_25x300_sync: Mean +- std dev: 15.4 ms +- 0.4 ms ......................................... wide_state_25x300_checkpoint: Mean +- std dev: 253 ms +- 16 ms ......................................... wide_state_25x300_checkpoint_sync: Mean +- std dev: 248 ms +- 14 ms ......................................... wide_state_15x600: Mean +- std dev: 27.2 ms +- 0.5 ms ......................................... wide_state_15x600_sync: Mean +- std dev: 17.8 ms +- 0.2 ms ......................................... wide_state_15x600_checkpoint: Mean +- std dev: 433 ms +- 15 ms ......................................... wide_state_15x600_checkpoint_sync: Mean +- std dev: 427 ms +- 14 ms ......................................... wide_state_9x1200: Mean +- std dev: 27.1 ms +- 0.5 ms ......................................... wide_state_9x1200_sync: Mean +- std dev: 17.8 ms +- 0.3 ms ......................................... wide_state_9x1200_checkpoint: Mean +- std dev: 281 ms +- 14 ms ......................................... wide_state_9x1200_checkpoint_sync: Mean +- std dev: 277 ms +- 13 ms

Check notice on line 1 in libs/cli/langgraph_cli/config.py

View workflow job for this annotation

GitHub Actions / benchmark

Comparison against main

+----------------------------------------+---------+-----------------------+ | Benchmark | main | changes | +========================================+=========+=======================+ | react_agent_100x_checkpoint_sync | 632 ms | 618 ms: 1.02x faster | +----------------------------------------+---------+-----------------------+ | react_agent_100x_checkpoint | 648 ms | 637 ms: 1.02x faster | +----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_10x_checkpoint | 75.3 ms | 74.5 ms: 1.01x faster | +----------------------------------------+---------+-----------------------+ | wide_state_25x300 | 23.4 ms | 23.2 ms: 1.01x faster | +----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_10x | 61.7 ms | 61.1 ms: 1.01x faster | +----------------------------------------+---------+-----------------------+ | wide_state_9x1200 | 27.3 ms | 27.1 ms: 1.01x faster | +----------------------------------------+---------+-----------------------+ | wide_state_15x600 | 27.3 ms | 27.2 ms: 1.01x faster | +----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_10x_sync | 53.3 ms | 53.0 ms: 1.01x faster | +----------------------------------------+---------+-----------------------+ | react_agent_100x | 345 ms | 344 ms: 1.00x faster | +----------------------------------------+---------+-----------------------+ | react_agent_100x_sync | 273 ms | 272 ms: 1.00x faster | +----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_10x_checkpoint_sync | 95.6 ms | 95.3 ms: 1.00x faster | +----------------------------------------+---------+-----------------------+ | Geometric mean | (ref) | 1.00x faster | +----------------------------------------+---------+-----------------------+ Benchmark hidden because not significant (17): fanout_to_subgraph_100x, wide_state_9x1200_checkpoint, wide_state_9x1200_checkpoint_sync, react_agent_10x, fanout_to_subgraph_100x_checkpoint_sync, react_agent_10x_checkpoint_sync, fanout_to_subgraph_100x_checkpoint, react_agent_10x_sync, wide_state_9x1200_sync, fanout_to_subgraph_100x_sync, wide_state_25x300_sync, react_agent_10x_checkpoint, wide_state_15x600_sync, wide_state_15x600_checkpoint_sync, wide_state_15x600_checkpoint, wide_state_25x300_checkpoint_sync, wide_state_25x300_checkpoint
import os
import pathlib
import textwrap
Expand Down Expand Up @@ -100,7 +100,7 @@
def _parse_version(version_str: str) -> tuple[int, int]:
"""Parse a version string into a tuple of (major, minor)."""
try:
major, minor = map(int, version_str.split("."))
major, minor = map(int, version_str.split("-")[0].split("."))
return (major, minor)
except ValueError:
raise click.UsageError(f"Invalid version format: {version_str}") from None
Expand Down Expand Up @@ -159,7 +159,7 @@
if config.get("python_version"):
pyversion = config["python_version"]
if not pyversion.count(".") == 1 or not all(
part.isdigit() for part in pyversion.split(".")
part.isdigit() for part in pyversion.split("-")[0].split(".")
):
raise click.UsageError(
f"Invalid Python version format: {pyversion}. "
Expand Down
2 changes: 1 addition & 1 deletion libs/cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langgraph-cli"
version = "0.1.65"
version = "0.1.66"
description = "CLI for interacting with LangGraph API"
authors = []
license = "MIT"
Expand Down
6 changes: 6 additions & 0 deletions libs/cli/tests/unit_tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ def test_validate_config():
validate_config({"python_version": "3.10"})
assert "Minimum required version" in str(exc_info.value)

config = validate_config({"python_version": "3.11-bullseye", "dependencies": ["."], "graphs": {"agent": "./agent.py:graph"}})
assert config["python_version"] == "3.11-bullseye"

config = validate_config({"python_version": "3.12-slim", "dependencies": ["."], "graphs": {"agent": "./agent.py:graph"}})
assert config["python_version"] == "3.12-slim"


def test_validate_config_file():
with tempfile.TemporaryDirectory() as tmpdir:
Expand Down
Loading