Skip to content

Commit 433c8ac

Browse files
Move TrialResult import in langchain to TYPE_CHECKING only
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
1 parent b6fdc57 commit 433c8ac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/nvidia_nat_langchain/src/nat/plugins/langchain/langsmith/langsmith_optimization_callback.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515

1616
import logging
1717
import re
18+
from typing import TYPE_CHECKING
1819
from typing import Any
1920

2021
import langsmith
2122

22-
from nat.profiler.parameter_optimization.optimizer_callbacks import TrialResult
23-
2423
from .langsmith_evaluation_callback import _LS_RETRY_DELAY_S
2524
from .langsmith_evaluation_callback import _backfill_feedback_for_unlinked_items
2625
from .langsmith_evaluation_callback import _eager_link_run_to_item
@@ -32,6 +31,9 @@
3231

3332
logger = logging.getLogger(__name__)
3433

34+
if TYPE_CHECKING:
35+
from nat.profiler.parameter_optimization.optimizer_callbacks import TrialResult
36+
3537

3638
class LangSmithOptimizationCallback:
3739
"""Per-trial experiment projects with OTEL trace linking and prompt management.

0 commit comments

Comments
 (0)