Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@a55ffcb627e4:/# fastapi dev app
- INFO Using path app
- INFO Resolved absolute path /app
- INFO Searching for package file structure from directories with __init__.py files
- INFO Importing from /
- ╭─ Python package file structure ─╮
- │ │
- │ 📁 app │
- │ └── 🐍 __init__.py │
- │ │
- ╰─────────────────────────────────╯
- INFO Importing module app
- ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
- │ /app/.venv/lib/python3.12/site-packages/fastapi_cli/cli.py:174 in dev │
- │ │
- │ 171 │ │
- │ 172 │ Otherwise, it uses the first [bold]FastAPI[/bold] app found in the imported module o │
- │ 173 │ """ │
- │ ❱ 174 │ _run( │
- │ 175 │ │ path=path, │
- │ 176 │ │ host=host, │
- │ 177 │ │ port=port, │
- │ │
- │ ╭───────────── locals ─────────────╮ │
- │ │ app = None │ │
- │ │ host = '127.0.0.1' │ │
- │ │ path = PosixPath('app') │ │
- │ │ port = 8000 │ │
- │ │ proxy_headers = True │ │
- │ │ reload = True │ │
- │ │ root_path = '' │ │
- │ ╰──────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/fastapi_cli/cli.py:65 in _run │
- │ │
- │ 62 │ proxy_headers: bool = False, │
- │ 63 ) -> None: │
- │ 64 │ try: │
- │ ❱ 65 │ │ use_uvicorn_app = get_import_string(path=path, app_name=app) │
- │ 66 │ except FastAPICLIException as e: │
- │ 67 │ │ logger.error(str(e)) │
- │ 68 │ │ raise typer.Exit(code=1) from None │
- │ │
- │ ╭───────────── locals ─────────────╮ │
- │ │ app = None │ │
- │ │ command = 'dev' │ │
- │ │ host = '127.0.0.1' │ │
- │ │ path = PosixPath('app') │ │
- │ │ port = 8000 │ │
- │ │ proxy_headers = True │ │
- │ │ reload = True │ │
- │ │ root_path = '' │ │
- │ │ workers = None │ │
- │ ╰──────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/fastapi_cli/discover.py:154 in get_import_string │
- │ │
- │ 151 │ │ raise FastAPICLIException(f"Path does not exist {path}") │
- │ 152 │ mod_data = get_module_data_from_path(path) │
- │ 153 │ sys.path.insert(0, str(mod_data.extra_sys_path)) │
- │ ❱ 154 │ use_app_name = get_app_name(mod_data=mod_data, app_name=app_name) │
- │ 155 │ import_example = Syntax( │
- │ 156 │ │ f"from {mod_data.module_import_str} import {use_app_name}", "python" │
- │ 157 │ ) │
- │ │
- │ ╭─────────────────────────────────── locals ────────────────────────────────────╮ │
- │ │ app_name = None │ │
- │ │ mod_data = ModuleData(module_import_str='app', extra_sys_path=PosixPath('/')) │ │
- │ │ path = PosixPath('app') │ │
- │ ╰───────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/fastapi_cli/discover.py:107 in get_app_name │
- │ │
- │ 104 │
- │ 105 def get_app_name(*, mod_data: ModuleData, app_name: Union[str, None] = None) -> str: │
- │ 106 │ try: │
- │ ❱ 107 │ │ mod = importlib.import_module(mod_data.module_import_str) │
- │ 108 │ except (ImportError, ValueError) as e: │
- │ 109 │ │ logger.error(f"Import error: {e}") │
- │ 110 │ │ logger.warning( │
- │ │
- │ ╭─────────────────────────────────── locals ────────────────────────────────────╮ │
- │ │ app_name = None │ │
- │ │ mod_data = ModuleData(module_import_str='app', extra_sys_path=PosixPath('/')) │ │
- │ ╰───────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /usr/local/lib/python3.12/importlib/__init__.py:90 in import_module │
- │ │
- │ 87 │ │ │ if character != '.': │
- │ 88 │ │ │ │ break │
- │ 89 │ │ │ level += 1 │
- │ ❱ 90 │ return _bootstrap._gcd_import(name[level:], package, level) │
- │ 91 │
- │ 92 │
- │ 93 _RELOADING = {} │
- │ │
- │ ╭──── locals ─────╮ │
- │ │ level = 0 │ │
- │ │ name = 'app' │ │
- │ │ package = None │ │
- │ ╰─────────────────╯ │
- │ in _gcd_import:1387 │
- │ ╭──── locals ─────╮ │
- │ │ level = 0 │ │
- │ │ name = 'app' │ │
- │ │ package = None │ │
- │ ╰─────────────────╯ │
- │ in _find_and_load:1360 │
- │ ╭────────────────────── locals ──────────────────────╮ │
- │ │ import_ = <function _gcd_import at 0x7384b458c0e0> │ │
- │ │ module = <object object at 0x7384b4564060> │ │
- │ │ name = 'app' │ │
- │ ╰────────────────────────────────────────────────────╯ │
- │ in _find_and_load_unlocked:1331 │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ import_ = <function _gcd_import at 0x7384b458c0e0> │ │
- │ │ name = 'app' │ │
- │ │ parent = '' │ │
- │ │ parent_spec = None │ │
- │ │ path = None │ │
- │ │ spec = ModuleSpec(name='app', loader=<_frozen_importlib_external.SourceFileLoader │ │
- │ │ object at 0x7384b1f6b8f0>, origin='/app/__init__.py', │ │
- │ │ submodule_search_locations=['/app']) │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ in _load_unlocked:935 │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ module = <module 'app' from '/app/__init__.py'> │ │
- │ │ spec = ModuleSpec(name='app', loader=<_frozen_importlib_external.SourceFileLoader object │ │
- │ │ at 0x7384b1f6b8f0>, origin='/app/__init__.py', submodule_search_locations=['/app']) │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ in exec_module:995 │
- │ ╭────────────────────────────────────── locals ──────────────────────────────────────╮ │
- │ │ code = <code object <module> at 0x7384b1f41d70, file "/app/__init__.py", line 1> │ │
- │ │ module = <module 'app' from '/app/__init__.py'> │ │
- │ │ self = <_frozen_importlib_external.SourceFileLoader object at 0x7384b1f6b8f0> │ │
- │ ╰────────────────────────────────────────────────────────────────────────────────────╯ │
- │ in _call_with_frames_removed:488 │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ args = ( │ │
- │ │ │ <code object <module> at 0x7384b1f41d70, file "/app/__init__.py", line 1>, │ │
- │ │ │ { │ │
- │ │ │ │ '__name__': 'app', │ │
- │ │ │ │ '__doc__': None, │ │
- │ │ │ │ '__package__': 'app', │ │
- │ │ │ │ '__loader__': <_frozen_importlib_external.SourceFileLoader object at │ │
- │ │ 0x7384b1f6b8f0>, │ │
- │ │ │ │ '__spec__': ModuleSpec(name='app', │ │
- │ │ loader=<_frozen_importlib_external.SourceFileLoader object at 0x7384b1f6b8f0>, │ │
- │ │ origin='/app/__init__.py', submodule_search_locations=['/app']), │ │
- │ │ │ │ '__path__': ['/app'], │ │
- │ │ │ │ '__file__': '/app/__init__.py', │ │
- │ │ │ │ '__cached__': '/app/__pycache__/__init__.cpython-312.pyc', │ │
- │ │ │ │ '__builtins__': { │ │
- │ │ │ │ │ '__name__': 'builtins', │ │
- │ │ │ │ │ '__doc__': 'Built-in functions, types, exceptions, and other │ │
- │ │ objects.\n\nThis module provides '+346, │ │
- │ │ │ │ │ '__package__': '', │ │
- │ │ │ │ │ '__loader__': <class '_frozen_importlib.BuiltinImporter'>, │ │
- │ │ │ │ │ '__spec__': ModuleSpec(name='builtins', loader=<class │ │
- │ │ '_frozen_importlib.BuiltinImporter'>, origin='built-in'), │ │
- │ │ │ │ │ '__build_class__': <built-in function __build_class__>, │ │
- │ │ │ │ │ '__import__': <built-in function __import__>, │ │
- │ │ │ │ │ 'abs': <built-in function abs>, │ │
- │ │ │ │ │ 'all': <built-in function all>, │ │
- │ │ │ │ │ 'any': <built-in function any>, │ │
- │ │ │ │ │ ... +148 │ │
- │ │ │ │ }, │ │
- │ │ │ │ 'constants': <module 'app.constants' from '/app/constants.py'>, │ │
- │ │ │ │ ... +3 │ │
- │ │ │ } │ │
- │ │ ) │ │
- │ │ f = <built-in function exec> │ │
- │ │ kwds = {} │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/__init__.py:1 in <module> │
- │ │
- │ ❱ 1 from .nexus import app # noqa: F401 │
- │ 2 │
- │ │
- │ ╭────────────────────────────── locals ──────────────────────────────╮ │
- │ │ constants = <module 'app.constants' from '/app/constants.py'> │ │
- │ │ models = <module 'app.models' from '/app/models/__init__.py'> │ │
- │ │ routers = <module 'app.routers' from '/app/routers/__init__.py'> │ │
- │ │ utils = <module 'app.utils' from '/app/utils/__init__.py'> │ │
- │ ╰────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/nexus.py:6 in <module> │
- │ │
- │ 3 from starlette.middleware import Middleware │
- │ 4 │
- │ 5 from app.constants import AppConfig │
- │ ❱ 6 from app.routers import chat, embeddings, status, summary │
- │ 7 │
- │ 8 installed_middleware = [ │
- │ 9 │ Middleware( │
- │ │
- │ ╭────────────────────────────── locals ───────────────────────────────╮ │
- │ │ AppConfig = <class 'app.constants.AppConfig'> │ │
- │ │ CORSMiddleware = <class 'starlette.middleware.cors.CORSMiddleware'> │ │
- │ │ FastAPI = <class 'fastapi.applications.FastAPI'> │ │
- │ │ Middleware = <class 'starlette.middleware.Middleware'> │ │
- │ ╰─────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/routers/chat.py:7 in <module> │
- │ │
- │ 4 │
- │ 5 from app.constants import ErrorMessages │
- │ 6 from app.models.chat_request import ChatRequest │
- │ ❱ 7 from app.utils.retrieve_question_response import retrieve_question_response │
- │ 8 │
- │ 9 router = APIRouter() │
- │ 10 │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ APIRouter = <class 'fastapi.routing.APIRouter'> │ │
- │ │ ChatRequest = <class 'app.models.chat_request.ChatRequest'> │ │
- │ │ ErrorMessages = <class 'app.constants.ErrorMessages'> │ │
- │ │ JSONResponse = <class 'starlette.responses.JSONResponse'> │ │
- │ │ requests = <module 'requests' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/requests/__init__.py'> │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/utils/retrieve_question_response.py:8 in <module> │
- │ │
- │ 5 import chromadb │
- │ 6 from chromadb import ClientAPI │
- │ 7 from fastapi import HTTPException │
- │ ❱ 8 from langchain_chroma import Chroma │
- │ 9 from langchain_community.embeddings import HuggingFaceBgeEmbeddings │
- │ 10 from langchain_core.documents import Document │
- │ 11 from langchain_core.output_parsers import StrOutputParser │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ Any = typing.Any │ │
- │ │ chromadb = <module 'chromadb' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/chromadb/__init__.py'> │ │
- │ │ ClientAPI = <class 'chromadb.api.ClientAPI'> │ │
- │ │ HTTPException = <class 'fastapi.exceptions.HTTPException'> │ │
- │ │ suppress = <class 'contextlib.suppress'> │ │
- │ │ UUID = <class 'uuid.UUID'> │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langchain_chroma/__init__.py:1 in <module> │
- │ │
- │ ❱ 1 from langchain_chroma.vectorstores import Chroma │
- │ 2 │
- │ 3 __all__ = [ │
- │ 4 │ "Chroma", │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langchain_chroma/vectorstores.py:22 in <module> │
- │ │
- │ 19 import chromadb │
- │ 20 import chromadb.config │
- │ 21 import numpy as np │
- │ ❱ 22 from langchain_core.documents import Document │
- │ 23 from langchain_core.embeddings import Embeddings │
- │ 24 from langchain_core.utils import xor_args │
- │ 25 from langchain_core.vectorstores import VectorStore │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ annotations = _Feature((3, 7, 0, 'beta', 1), None, 16777216) │ │
- │ │ Any = typing.Any │ │
- │ │ base64 = <module 'base64' from '/usr/local/lib/python3.12/base64.py'> │ │
- │ │ Callable = typing.Callable │ │
- │ │ chromadb = <module 'chromadb' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/chromadb/__init__.py'> │ │
- │ │ Dict = typing.Dict │ │
- │ │ Iterable = typing.Iterable │ │
- │ │ List = typing.List │ │
- │ │ logging = <module 'logging' from '/usr/local/lib/python3.12/logging/__init__.py'> │ │
- │ │ np = <module 'numpy' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/numpy/__init__.py'> │ │
- │ │ Optional = typing.Optional │ │
- │ │ Tuple = typing.Tuple │ │
- │ │ Type = typing.Type │ │
- │ │ TYPE_CHECKING = False │ │
- │ │ Union = typing.Union │ │
- │ │ uuid = <module 'uuid' from '/usr/local/lib/python3.12/uuid.py'> │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langchain_core/documents/__init__.py:6 in <module> │
- │ │
- │ 3 │
- │ 4 """ │
- │ 5 from langchain_core.documents.base import Document │
- │ ❱ 6 from langchain_core.documents.compressor import BaseDocumentCompressor │
- │ 7 from langchain_core.documents.transformers import BaseDocumentTransformer │
- │ 8 │
- │ 9 __all__ = ["Document", "BaseDocumentTransformer", "BaseDocumentCompressor"] │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ base = <module 'langchain_core.documents.base' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/langchain_core/documents/base.py'> │ │
- │ │ Document = <class 'langchain_core.documents.base.Document'> │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langchain_core/documents/compressor.py:6 in <module> │
- │ │
- │ 3 from abc import ABC, abstractmethod │
- │ 4 from typing import Optional, Sequence │
- │ 5 │
- │ ❱ 6 from langchain_core.callbacks import Callbacks │
- │ 7 from langchain_core.documents import Document │
- │ 8 from langchain_core.pydantic_v1 import BaseModel │
- │ 9 from langchain_core.runnables import run_in_executor │
- │ │
- │ ╭──────────────────────────── locals ─────────────────────────────╮ │
- │ │ ABC = <class 'abc.ABC'> │ │
- │ │ abstractmethod = <function abstractmethod at 0x7384b45d6480> │ │
- │ │ annotations = _Feature((3, 7, 0, 'beta', 1), None, 16777216) │ │
- │ │ Optional = typing.Optional │ │
- │ │ Sequence = typing.Sequence │ │
- │ ╰─────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langchain_core/callbacks/__init__.py:22 in <module> │
- │ │
- │ 19 │ ToolManagerMixin, │
- │ 20 ) │
- │ 21 from langchain_core.callbacks.file import FileCallbackHandler │
- │ ❱ 22 from langchain_core.callbacks.manager import ( │
- │ 23 │ AsyncCallbackManager, │
- │ 24 │ AsyncCallbackManagerForChainGroup, │
- │ 25 │ AsyncCallbackManagerForChainRun, │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ AsyncCallbackHandler = <class 'langchain_core.callbacks.base.AsyncCallbackHandler'> │ │
- │ │ base = <module 'langchain_core.callbacks.base' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/langchain_core/callbacks/b… │ │
- │ │ BaseCallbackHandler = <class 'langchain_core.callbacks.base.BaseCallbackHandler'> │ │
- │ │ BaseCallbackManager = <class 'langchain_core.callbacks.base.BaseCallbackManager'> │ │
- │ │ CallbackManagerMixin = <class 'langchain_core.callbacks.base.CallbackManagerMixin'> │ │
- │ │ Callbacks = typing.Union[typing.List[langchain_core.callbacks.base.BaseCallback… │ │
- │ │ langchain_core.callbacks.base.BaseCallbackManager, NoneType] │ │
- │ │ ChainManagerMixin = <class 'langchain_core.callbacks.base.ChainManagerMixin'> │ │
- │ │ file = <module 'langchain_core.callbacks.file' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/langchain_core/callbacks/f… │ │
- │ │ FileCallbackHandler = <class 'langchain_core.callbacks.file.FileCallbackHandler'> │ │
- │ │ LLMManagerMixin = <class 'langchain_core.callbacks.base.LLMManagerMixin'> │ │
- │ │ RetrieverManagerMixin = <class 'langchain_core.callbacks.base.RetrieverManagerMixin'> │ │
- │ │ RunManagerMixin = <class 'langchain_core.callbacks.base.RunManagerMixin'> │ │
- │ │ ToolManagerMixin = <class 'langchain_core.callbacks.base.ToolManagerMixin'> │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langchain_core/callbacks/manager.py:29 in <module> │
- │ │
- │ 26 ) │
- │ 27 from uuid import UUID │
- │ 28 │
- │ ❱ 29 from langsmith.run_helpers import get_run_tree_context │
- │ 30 from tenacity import RetryCallState │
- │ 31 │
- │ 32 from langchain_core.callbacks.base import ( │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ ABC = <class 'abc.ABC'> │ │
- │ │ abstractmethod = <function abstractmethod at 0x7384b45d6480> │ │
- │ │ annotations = _Feature((3, 7, 0, 'beta', 1), None, 16777216) │ │
- │ │ Any = typing.Any │ │
- │ │ asynccontextmanager = <function asynccontextmanager at 0x7384b42a6160> │ │
- │ │ AsyncGenerator = typing.AsyncGenerator │ │
- │ │ asyncio = <module 'asyncio' from │ │
- │ │ '/usr/local/lib/python3.12/asyncio/__init__.py'> │ │
- │ │ Callable = typing.Callable │ │
- │ │ cast = <function cast at 0x7384b41c3100> │ │
- │ │ contextmanager = <function contextmanager at 0x7384b42a5260> │ │
- │ │ copy_context = <built-in function copy_context> │ │
- │ │ Coroutine = typing.Coroutine │ │
- │ │ Dict = typing.Dict │ │
- │ │ functools = <module 'functools' from '/usr/local/lib/python3.12/functools.py'> │ │
- │ │ Generator = typing.Generator │ │
- │ │ List = typing.List │ │
- │ │ logging = <module 'logging' from │ │
- │ │ '/usr/local/lib/python3.12/logging/__init__.py'> │ │
- │ │ Optional = typing.Optional │ │
- │ │ Sequence = typing.Sequence │ │
- │ │ ThreadPoolExecutor = <class 'concurrent.futures.thread.ThreadPoolExecutor'> │ │
- │ │ Type = typing.Type │ │
- │ │ TYPE_CHECKING = False │ │
- │ │ TypeVar = <class 'typing.TypeVar'> │ │
- │ │ Union = typing.Union │ │
- │ │ uuid = <module 'uuid' from '/usr/local/lib/python3.12/uuid.py'> │ │
- │ │ UUID = <class 'uuid.UUID'> │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langsmith/run_helpers.py:38 in <module> │
- │ │
- │ 35 │ runtime_checkable, │
- │ 36 ) │
- │ 37 │
- │ ❱ 38 from langsmith import client as ls_client │
- │ 39 from langsmith import run_trees, utils │
- │ 40 from langsmith._internal import _aiter as aitertools │
- │ 41 │
- │ │
- │ ╭────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ annotations = _Feature((3, 7, 0, 'beta', 1), None, 16777216) │ │
- │ │ Any = typing.Any │ │
- │ │ AsyncGenerator = typing.AsyncGenerator │ │
- │ │ asyncio = <module 'asyncio' from '/usr/local/lib/python3.12/asyncio/__init__.py'> │ │
- │ │ Awaitable = typing.Awaitable │ │
- │ │ Callable = typing.Callable │ │
- │ │ cast = <function cast at 0x7384b41c3100> │ │
- │ │ contextlib = <module 'contextlib' from '/usr/local/lib/python3.12/contextlib.py'> │ │
- │ │ contextvars = <module 'contextvars' from '/usr/local/lib/python3.12/contextvars.py'> │ │
- │ │ copy_context = <built-in function copy_context> │ │
- │ │ datetime = <module 'datetime' from '/usr/local/lib/python3.12/datetime.py'> │ │
- │ │ Dict = typing.Dict │ │
- │ │ functools = <module 'functools' from '/usr/local/lib/python3.12/functools.py'> │ │
- │ │ Generator = typing.Generator │ │
- │ │ Generic = <class 'typing.Generic'> │ │
- │ │ inspect = <module 'inspect' from '/usr/local/lib/python3.12/inspect.py'> │ │
- │ │ List = typing.List │ │
- │ │ logging = <module 'logging' from '/usr/local/lib/python3.12/logging/__init__.py'> │ │
- │ │ Mapping = typing.Mapping │ │
- │ │ Optional = typing.Optional │ │
- │ │ overload = <function overload at 0x7384b41c37e0> │ │
- │ │ Protocol = <class 'typing.Protocol'> │ │
- │ │ runtime_checkable = <function runtime_checkable at 0x7384b41c2700> │ │
- │ │ Tuple = typing.Tuple │ │
- │ │ Type = typing.Type │ │
- │ │ TYPE_CHECKING = False │ │
- │ │ TypedDict = <function TypedDict at 0x7384b41cc2c0> │ │
- │ │ TypeVar = <class 'typing.TypeVar'> │ │
- │ │ Union = typing.Union │ │
- │ │ uuid = <module 'uuid' from '/usr/local/lib/python3.12/uuid.py'> │ │
- │ │ warnings = <module 'warnings' from '/usr/local/lib/python3.12/warnings.py'> │ │
- │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langsmith/client.py:52 in <module> │
- │ │
- │ 49 from urllib3.util import Retry │
- │ 50 │
- │ 51 import langsmith │
- │ ❱ 52 from langsmith import env as ls_env │
- │ 53 from langsmith import schemas as ls_schemas │
- │ 54 from langsmith import utils as ls_utils │
- │ 55 │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ annotations = _Feature((3, 7, 0, 'beta', 1), None, 16777216) │ │
- │ │ Any = typing.Any │ │
- │ │ atexit = <module 'atexit' (built-in)> │ │
- │ │ Callable = typing.Callable │ │
- │ │ cast = <function cast at 0x7384b41c3100> │ │
- │ │ collections = <module 'collections' from │ │
- │ │ '/usr/local/lib/python3.12/collections/__init__.py'> │ │
- │ │ dataclass = <function dataclass at 0x7384b3da62a0> │ │
- │ │ datetime = <module 'datetime' from '/usr/local/lib/python3.12/datetime.py'> │ │
- │ │ DefaultDict = typing.DefaultDict │ │
- │ │ Dict = typing.Dict │ │
- │ │ Empty = <class '_queue.Empty'> │ │
- │ │ field = <function field at 0x7384b3da4b80> │ │
- │ │ functools = <module 'functools' from '/usr/local/lib/python3.12/functools.py'> │ │
- │ │ importlib = <module 'importlib' from │ │
- │ │ '/usr/local/lib/python3.12/importlib/__init__.py'> │ │
- │ │ io = <module 'io' (frozen)> │ │
- │ │ Iterable = typing.Iterable │ │
- │ │ Iterator = typing.Iterator │ │
- │ │ json = <module 'json' from '/usr/local/lib/python3.12/json/__init__.py'> │ │
- │ │ langsmith = <module 'langsmith' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/langsmith/__init__.py'> │ │
- │ │ List = typing.List │ │
- │ │ Literal = typing.Literal │ │
- │ │ logging = <module 'logging' from '/usr/local/lib/python3.12/logging/__init__.py'> │ │
- │ │ Mapping = typing.Mapping │ │
- │ │ Optional = typing.Optional │ │
- │ │ orjson = <module 'orjson' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/orjson/__init__.py'> │ │
- │ │ os = <module 'os' (frozen)> │ │
- │ │ PriorityQueue = <class 'queue.PriorityQueue'> │ │
- │ │ Queue = <class 'queue.Queue'> │ │
- │ │ random = <module 'random' from '/usr/local/lib/python3.12/random.py'> │ │
- │ │ re = <module 're' from '/usr/local/lib/python3.12/re/__init__.py'> │ │
- │ │ requests = <module 'requests' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/requests/__init__.py'> │ │
- │ │ requests_adapters = <module 'requests.adapters' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/requests/adapters.py'> │ │
- │ │ Retry = <class 'urllib3.util.retry.Retry'> │ │
- │ │ Sequence = typing.Sequence │ │
- │ │ socket = <module 'socket' from '/usr/local/lib/python3.12/socket.py'> │ │
- │ │ sys = <module 'sys' (built-in)> │ │
- │ │ threading = <module 'threading' from '/usr/local/lib/python3.12/threading.py'> │ │
- │ │ time = <module 'time' (built-in)> │ │
- │ │ Tuple = typing.Tuple │ │
- │ │ Type = typing.Type │ │
- │ │ TYPE_CHECKING = False │ │
- │ │ Union = typing.Union │ │
- │ │ urllib_parse = <module 'urllib.parse' from '/usr/local/lib/python3.12/urllib/parse.py'> │ │
- │ │ uuid = <module 'uuid' from '/usr/local/lib/python3.12/uuid.py'> │ │
- │ │ warnings = <module 'warnings' from '/usr/local/lib/python3.12/warnings.py'> │ │
- │ │ weakref = <module 'weakref' from '/usr/local/lib/python3.12/weakref.py'> │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langsmith/env/__init__.py:3 in <module> │
- │ │
- │ 1 """Utilities to get information about the runtime environment.""" │
- │ 2 from langsmith.env._git import get_git_info │
- │ ❱ 3 from langsmith.env._runtime_env import ( │
- │ 4 │ get_docker_compose_command, │
- │ 5 │ get_docker_compose_version, │
- │ 6 │ get_docker_environment, │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ _git = <module 'langsmith.env._git' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/langsmith/env/_git.py'> │ │
- │ │ get_git_info = <functools._lru_cache_wrapper object at 0x7384a940b1c0> │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langsmith/env/_runtime_env.py:9 in <module> │
- │ │
- │ 6 import subprocess │
- │ 7 from typing import Dict, List, Optional, Union │
- │ 8 │
- │ ❱ 9 from langsmith.utils import get_docker_compose_command │
- │ 10 from langsmith.env._git import exec_git │
- │ 11 │
- │ 12 try: │
- │ │
- │ ╭─────────────────────────────────────── locals ───────────────────────────────────────╮ │
- │ │ Dict = typing.Dict │ │
- │ │ functools = <module 'functools' from '/usr/local/lib/python3.12/functools.py'> │ │
- │ │ List = typing.List │ │
- │ │ logging = <module 'logging' from '/usr/local/lib/python3.12/logging/__init__.py'> │ │
- │ │ Optional = typing.Optional │ │
- │ │ os = <module 'os' (frozen)> │ │
- │ │ platform = <module 'platform' from '/usr/local/lib/python3.12/platform.py'> │ │
- │ │ subprocess = <module 'subprocess' from '/usr/local/lib/python3.12/subprocess.py'> │ │
- │ │ Union = typing.Union │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langsmith/utils.py:29 in <module> │
- │ │
- │ 26 import requests │
- │ 27 from urllib3.util import Retry │
- │ 28 │
- │ ❱ 29 from langsmith import schemas as ls_schemas │
- │ 30 │
- │ 31 _LOGGER = logging.getLogger(__name__) │
- │ 32 │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ Any = typing.Any │ │
- │ │ Callable = typing.Callable │ │
- │ │ contextlib = <module 'contextlib' from '/usr/local/lib/python3.12/contextlib.py'> │ │
- │ │ Dict = typing.Dict │ │
- │ │ enum = <module 'enum' from '/usr/local/lib/python3.12/enum.py'> │ │
- │ │ functools = <module 'functools' from '/usr/local/lib/python3.12/functools.py'> │ │
- │ │ Generator = typing.Generator │ │
- │ │ List = typing.List │ │
- │ │ logging = <module 'logging' from '/usr/local/lib/python3.12/logging/__init__.py'> │ │
- │ │ Mapping = typing.Mapping │ │
- │ │ Optional = typing.Optional │ │
- │ │ os = <module 'os' (frozen)> │ │
- │ │ pathlib = <module 'pathlib' from '/usr/local/lib/python3.12/pathlib.py'> │ │
- │ │ requests = <module 'requests' from │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/requests/__init__.py'> │ │
- │ │ Retry = <class 'urllib3.util.retry.Retry'> │ │
- │ │ Sequence = typing.Sequence │ │
- │ │ subprocess = <module 'subprocess' from '/usr/local/lib/python3.12/subprocess.py'> │ │
- │ │ sys = <module 'sys' (built-in)> │ │
- │ │ threading = <module 'threading' from '/usr/local/lib/python3.12/threading.py'> │ │
- │ │ traceback = <module 'traceback' from '/usr/local/lib/python3.12/traceback.py'> │ │
- │ │ Tuple = typing.Tuple │ │
- │ │ Union = typing.Union │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/langsmith/schemas.py:69 in <module> │
- │ │
- │ 66 │ split: Optional[Union[str, List[str]]] = None │
- │ 67 │
- │ 68 │
- │ ❱ 69 class Example(ExampleBase): │
- │ 70 │ """Example model.""" │
- │ 71 │ │
- │ 72 │ id: UUID │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ annotations = _Feature((3, 7, 0, 'beta', 1), None, 16777216) │ │
- │ │ Any = typing.Any │ │
- │ │ BaseModel = <class 'pydantic.v1.main.BaseModel'> │ │
- │ │ datetime = <class 'datetime.datetime'> │ │
- │ │ Decimal = <class 'decimal.Decimal'> │ │
- │ │ Dict = typing.Dict │ │
- │ │ Enum = <enum 'Enum'> │ │
- │ │ ExampleBase = <class 'langsmith.schemas.ExampleBase'> │ │
- │ │ ExampleCreate = <class 'langsmith.schemas.ExampleCreate'> │ │
- │ │ Field = <function Field at 0x7384b1a25760> │ │
- │ │ List = typing.List │ │
- │ │ Literal = typing.Literal │ │
- │ │ Optional = typing.Optional │ │
- │ │ PrivateAttr = <function PrivateAttr at 0x7384b1a25da0> │ │
- │ │ Protocol = <class 'typing.Protocol'> │ │
- │ │ runtime_checkable = <function runtime_checkable at 0x7384b41c2700> │ │
- │ │ SCORE_TYPE = typing.Union[pydantic.v1.types.StrictBool, pydantic.v1.types.StrictInt, │ │
- │ │ pydantic.v1.types.StrictFloat, NoneType] │ │
- │ │ StrictBool = <class 'pydantic.v1.types.StrictBool'> │ │
- │ │ StrictFloat = <class 'pydantic.v1.types.StrictFloat'> │ │
- │ │ StrictInt = <class 'pydantic.v1.types.StrictInt'> │ │
- │ │ threading = <module 'threading' from '/usr/local/lib/python3.12/threading.py'> │ │
- │ │ timedelta = <class 'datetime.timedelta'> │ │
- │ │ timezone = <class 'datetime.timezone'> │ │
- │ │ TypedDict = <function TypedDict at 0x7384b3f35080> │ │
- │ │ Union = typing.Union │ │
- │ │ UUID = <class 'uuid.UUID'> │ │
- │ │ VALUE_TYPE = typing.Union[typing.Dict, pydantic.v1.types.StrictBool, │ │
- │ │ pydantic.v1.types.StrictInt, pydantic.v1.types.StrictFloat, str, │ │
- │ │ NoneType] │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/pydantic/v1/main.py:286 in __new__ │
- │ │
- │ 283 │ │ # set __signature__ attr only for model class, but not for its instances │
- │ 284 │ │ cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls │
- │ 285 │ │ if resolve_forward_refs: │
- │ ❱ 286 │ │ │ cls.__try_update_forward_refs__() │
- │ 287 │ │ │
- │ 288 │ │ # preserve `__set_name__` protocol defined in https://peps.python.org/pep-0487 │
- │ 289 │ │ # for attributes not in `new_namespace` (e.g. private attributes) │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ _custom_root_type = False │ │
- │ │ allowed_config_kwargs = { │ │
- │ │ │ 'allow_population_by_field_name', │ │
- │ │ │ 'json_encoders', │ │
- │ │ │ 'getter_dict', │ │
- │ │ │ 'prepare_field', │ │
- │ │ │ 'validate_assignment', │ │
- │ │ │ 'alias_generator', │ │
- │ │ │ 'max_anystr_length', │ │
- │ │ │ 'json_loads', │ │
- │ │ │ 'get_field_info', │ │
- │ │ │ 'allow_mutation', │ │
- │ │ │ ... +21 │ │
- │ │ } │ │
- │ │ allowed_types = (<class 'uuid.UUID'>, <class 'NoneType'>) │ │
- │ │ ann_name = '_tenant_id' │ │
- │ │ ann_type = typing.Optional[uuid.UUID] │ │
- │ │ annotations = { │ │
- │ │ │ 'id': <class 'uuid.UUID'>, │ │
- │ │ │ 'created_at': <class 'datetime.datetime'>, │ │
- │ │ │ 'modified_at': typing.Optional[datetime.datetime], │ │
- │ │ │ 'runs': ForwardRef('List[Run]'), │ │
- │ │ │ 'source_run_id': typing.Optional[uuid.UUID], │ │
- │ │ │ '_host_url': typing.Optional[str], │ │
- │ │ │ '_tenant_id': typing.Optional[uuid.UUID] │ │
- │ │ } │ │
- │ │ base = <class 'langsmith.schemas.ExampleBase'> │ │
- │ │ base_private_attributes = {} │ │
- │ │ bases = (<class 'langsmith.schemas.ExampleBase'>,) │ │
- │ │ can_be_changed = True │ │
- │ │ class_vars = set() │ │
- │ │ cls = <class 'langsmith.schemas.Example'> │ │
- │ │ config = <class 'pydantic.v1.config.Config'> │ │
- │ │ config_from_namespace = None │ │
- │ │ config_kwargs = {} │ │
- │ │ exclude_from_namespace = { │ │
- │ │ │ 'created_at', │ │
- │ │ │ 'metadata', │ │
- │ │ │ 'outputs', │ │
- │ │ │ '__slots__', │ │
- │ │ │ 'inputs', │ │
- │ │ │ 'id', │ │
- │ │ │ 'source_run_id', │ │
- │ │ │ '_tenant_id', │ │
- │ │ │ 'modified_at', │ │
- │ │ │ '_host_url', │ │
- │ │ │ ... +2 │ │
- │ │ } │ │
- │ │ extra_validators = None │ │
- │ │ f = ModelField( │ │
- │ │ │ name='metadata', │ │
- │ │ │ type=Optional[Mapping[str, Any]], │ │
- │ │ │ required=False, │ │
- │ │ │ default=None │ │
- │ │ ) │ │
- │ │ fields = { │ │
- │ │ │ 'dataset_id': ModelField( │ │
- │ │ │ │ name='dataset_id', │ │
- │ │ │ │ type=UUID, │ │
- │ │ │ │ required=True │ │
- │ │ │ ), │ │
- │ │ │ 'inputs': ModelField( │ │
- │ │ │ │ name='inputs', │ │
- │ │ │ │ type=Mapping[str, Any], │ │
- │ │ │ │ required=True │ │
- │ │ │ ), │ │
- │ │ │ 'outputs': ModelField( │ │
- │ │ │ │ name='outputs', │ │
- │ │ │ │ type=Optional[Mapping[str, Any]], │ │
- │ │ │ │ required=False, │ │
- │ │ │ │ default=None │ │
- │ │ │ ), │ │
- │ │ │ 'metadata': ModelField( │ │
- │ │ │ │ name='metadata', │ │
- │ │ │ │ type=Optional[Mapping[str, Any]], │ │
- │ │ │ │ required=False, │ │
- │ │ │ │ default=None │ │
- │ │ │ ), │ │
- │ │ │ 'id': ModelField(name='id', type=UUID, required=True), │ │
- │ │ │ 'created_at': ModelField( │ │
- │ │ │ │ name='created_at', │ │
- │ │ │ │ type=datetime, │ │
- │ │ │ │ required=True │ │
- │ │ │ ), │ │
- │ │ │ 'modified_at': ModelField( │ │
- │ │ │ │ name='modified_at', │ │
- │ │ │ │ type=Optional[datetime], │ │
- │ │ │ │ required=False, │ │
- │ │ │ │ default=None │ │
- │ │ │ ), │ │
- │ │ │ 'runs': ModelField( │ │
- │ │ │ │ name='runs', │ │
- │ │ │ │ type=ForwardRef('List[Run]'), │ │
- │ │ │ │ required=False, │ │
- │ │ │ │ default_factory='<function list>' │ │
- │ │ │ ), │ │
- │ │ │ 'source_run_id': ModelField( │ │
- │ │ │ │ name='source_run_id', │ │
- │ │ │ │ type=Optional[UUID], │ │
- │ │ │ │ required=False, │ │
- │ │ │ │ default=None │ │
- │ │ │ ) │ │
- │ │ } │ │
- │ │ hash_func = <function generate_hash_function.<locals>.hash_function at │ │
- │ │ 0x7384a918e480> │ │
- │ │ is_untouched = <function ModelMetaclass.__new__.<locals>.is_untouched at │ │
- │ │ 0x7384a918ed40> │ │
- │ │ json_encoder = <function pydantic_encoder at 0x7384b1a24d60> │ │
- │ │ kwargs = {} │ │
- │ │ mcs = <class 'pydantic.v1.main.ModelMetaclass'> │ │
- │ │ name = 'Example' │ │
- │ │ namespace = { │ │
- │ │ │ '__module__': 'langsmith.schemas', │ │
- │ │ │ '__qualname__': 'Example', │ │
- │ │ │ '__annotations__': { │ │
- │ │ │ │ 'id': 'UUID', │ │
- │ │ │ │ 'created_at': 'datetime', │ │
- │ │ │ │ 'modified_at': 'Optional[datetime]', │ │
- │ │ │ │ 'runs': 'List[Run]', │ │
- │ │ │ │ 'source_run_id': 'Optional[UUID]', │ │
- │ │ │ │ '_host_url': 'Optional[str]', │ │
- │ │ │ │ '_tenant_id': 'Optional[UUID]' │ │
- │ │ │ }, │ │
- │ │ │ '__doc__': 'Example model.', │ │
- │ │ │ 'modified_at': FieldInfo(extra={}), │ │
- │ │ │ 'runs': FieldInfo( │ │
- │ │ │ │ default=PydanticUndefined, │ │
- │ │ │ │ default_factory=<class 'list'>, │ │
- │ │ │ │ extra={} │ │
- │ │ │ ), │ │
- │ │ │ 'source_run_id': None, │ │
- │ │ │ '_host_url': ModelPrivateAttr(), │ │
- │ │ │ '_tenant_id': ModelPrivateAttr(), │ │
- │ │ │ '__init__': <function Example.__init__ at 0x7384a918e840>, │ │
- │ │ │ ... +2 │ │
- │ │ } │ │
- │ │ new_namespace = { │ │
- │ │ │ '__config__': <class 'pydantic.v1.config.Config'>, │ │
- │ │ │ '__fields__': { │ │
- │ │ │ │ 'dataset_id': ModelField( │ │
- │ │ │ │ │ name='dataset_id', │ │
- │ │ │ │ │ type=UUID, │ │
- │ │ │ │ │ required=True │ │
- │ │ │ │ ), │ │
- │ │ │ │ 'inputs': ModelField( │ │
- │ │ │ │ │ name='inputs', │ │
- │ │ │ │ │ type=Mapping[str, Any], │ │
- │ │ │ │ │ required=True │ │
- │ │ │ │ ), │ │
- │ │ │ │ 'outputs': ModelField( │ │
- │ │ │ │ │ name='outputs', │ │
- │ │ │ │ │ type=Optional[Mapping[str, Any]], │ │
- │ │ │ │ │ required=False, │ │
- │ │ │ │ │ default=None │ │
- │ │ │ │ ), │ │
- │ │ │ │ 'metadata': ModelField( │ │
- │ │ │ │ │ name='metadata', │ │
- │ │ │ │ │ type=Optional[Mapping[str, Any]], │ │
- │ │ │ │ │ required=False, │ │
- │ │ │ │ │ default=None │ │
- │ │ │ │ ), │ │
- │ │ │ │ 'id': ModelField(name='id', type=UUID, required=True), │ │
- │ │ │ │ 'created_at': ModelField( │ │
- │ │ │ │ │ name='created_at', │ │
- │ │ │ │ │ type=datetime, │ │
- │ │ │ │ │ required=True │ │
- │ │ │ │ ), │ │
- │ │ │ │ 'modified_at': ModelField( │ │
- │ │ │ │ │ name='modified_at', │ │
- │ │ │ │ │ type=Optional[datetime], │ │
- │ │ │ │ │ required=False, │ │
- │ │ │ │ │ default=None │ │
- │ │ │ │ ), │ │
- │ │ │ │ 'runs': ModelField( │ │
- │ │ │ │ │ name='runs', │ │
- │ │ │ │ │ type=ForwardRef('List[Run]'), │ │
- │ │ │ │ │ required=False, │ │
- │ │ │ │ │ default_factory='<function list>' │ │
- │ │ │ │ ), │ │
- │ │ │ │ 'source_run_id': ModelField( │ │
- │ │ │ │ │ name='source_run_id', │ │
- │ │ │ │ │ type=Optional[UUID], │ │
- │ │ │ │ │ required=False, │ │
- │ │ │ │ │ default=None │ │
- │ │ │ │ ) │ │
- │ │ │ }, │ │
- │ │ │ '__exclude_fields__': None, │ │
- │ │ │ '__include_fields__': None, │ │
- │ │ │ '__validators__': {}, │ │
- │ │ │ '__pre_root_validators__': [], │ │
- │ │ │ '__post_root_validators__': [], │ │
- │ │ │ '__schema_cache__': {}, │ │
- │ │ │ '__json_encoder__': <staticmethod(<function pydantic_encoder │ │
- │ │ at 0x7384b1a24d60>)>, │ │
- │ │ │ '__custom_root_type__': False, │ │
- │ │ │ ... +11 │ │
- │ │ } │ │
- │ │ post_root_validators = [] │ │
- │ │ post_rv_new = [] │ │
- │ │ pre_root_validators = [] │ │
- │ │ pre_rv_new = [] │ │
- │ │ private_attributes = { │ │
- │ │ │ '_host_url': ModelPrivateAttr(), │ │
- │ │ │ '_tenant_id': ModelPrivateAttr() │ │
- │ │ } │ │
- │ │ resolve_forward_refs = True │ │
- │ │ slots = set() │ │
- │ │ untouched_types = ( │ │
- │ │ │ <class 'function'>, │ │
- │ │ │ <class 'property'>, │ │
- │ │ │ <class 'type'>, │ │
- │ │ │ <class 'classmethod'>, │ │
- │ │ │ <class 'staticmethod'> │ │
- │ │ ) │ │
- │ │ validators = {} │ │
- │ │ value = <cell at 0x7384a93f3730: ModelMetaclass object at 0x61d16065b2c0> │ │
- │ │ var_name = '__classcell__' │ │
- │ │ vg = <pydantic.v1.class_validators.ValidatorGroup object at │ │
- │ │ 0x7384a8fd5040> │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/pydantic/v1/main.py:807 in __try_update_forward_refs__ │
- │ │
- │ 804 │ │ Same as update_forward_refs but will not raise exception │
- │ 805 │ │ when forward references are not defined. │
- │ 806 │ │ """ │
- │ ❱ 807 │ │ update_model_forward_refs(cls, cls.__fields__.values(), cls.__config__.json_enco │
- │ 808 │ │
- │ 809 │ @classmethod │
- │ 810 │ def update_forward_refs(cls, **localns: Any) -> None: │
- │ │
- │ ╭─────────────────── locals ────────────────────╮ │
- │ │ cls = <class 'langsmith.schemas.Example'> │ │
- │ │ localns = {} │ │
- │ ╰───────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/pydantic/v1/typing.py:554 in update_model_forward_refs │
- │ │
- │ 551 │ │
- │ 552 │ for f in fields: │
- │ 553 │ │ try: │
- │ ❱ 554 │ │ │ update_field_forward_refs(f, globalns=globalns, localns=localns) │
- │ 555 │ │ except exc_to_suppress: │
- │ 556 │ │ │ pass │
- │ 557 │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ exc_to_suppress = (<class 'NameError'>,) │ │
- │ │ f = ModelField( │ │
- │ │ │ name='runs', │ │
- │ │ │ type=ForwardRef('List[Run]'), │ │
- │ │ │ required=False, │ │
- │ │ │ default_factory='<function list>' │ │
- │ │ ) │ │
- │ │ fields = dict_values([ModelField(name='dataset_id', type=UUID, required=True), │ │
- │ │ ModelField(name='inputs', type=Mapping[str, Any], required=True), │ │
- │ │ ModelField(name='outputs', type=Optional[Mapping[str, Any]], │ │
- │ │ required=False, default=None), ModelField(name='metadata', │ │
- │ │ type=Optional[Mapping[str, Any]], required=False, default=None), │ │
- │ │ ModelField(name='id', type=UUID, required=True), │ │
- │ │ ModelField(name='created_at', type=datetime, required=True), │ │
- │ │ ModelField(name='modified_at', type=Optional[datetime], required=False, │ │
- │ │ default=None), ModelField(name='runs', type=ForwardRef('List[Run]'), │ │
- │ │ required=False, default_factory='<function list>'), │ │
- │ │ ModelField(name='source_run_id', type=Optional[UUID], required=False, │ │
- │ │ default=None)]) │ │
- │ │ globalns = { │ │
- │ │ │ '__name__': 'langsmith.schemas', │ │
- │ │ │ '__doc__': 'Schemas for the LangSmith API.', │ │
- │ │ │ '__package__': 'langsmith', │ │
- │ │ │ '__loader__': <_frozen_importlib_external.SourceFileLoader object at │ │
- │ │ 0x7384a8fd4680>, │ │
- │ │ │ '__spec__': ModuleSpec(name='langsmith.schemas', │ │
- │ │ loader=<_frozen_importlib_external.SourceFileLoader object at │ │
- │ │ 0x7384a8fd4680>, │ │
- │ │ origin='/app/.venv/lib/python3.12/site-packages/langsmith/schemas.py'), │ │
- │ │ │ '__file__': │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/langsmith/schemas.py', │ │
- │ │ │ '__cached__': │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/langsmith/__pycache__/schemas.cp… │ │
- │ │ │ '__builtins__': { │ │
- │ │ │ │ '__name__': 'builtins', │ │
- │ │ │ │ '__doc__': 'Built-in functions, types, exceptions, and other │ │
- │ │ objects.\n\nThis module provides '+346, │ │
- │ │ │ │ '__package__': '', │ │
- │ │ │ │ '__loader__': <class '_frozen_importlib.BuiltinImporter'>, │ │
- │ │ │ │ '__spec__': ModuleSpec(name='builtins', loader=<class │ │
- │ │ '_frozen_importlib.BuiltinImporter'>, origin='built-in'), │ │
- │ │ │ │ '__build_class__': <built-in function __build_class__>, │ │
- │ │ │ │ '__import__': <built-in function __import__>, │ │
- │ │ │ │ 'abs': <built-in function abs>, │ │
- │ │ │ │ 'all': <built-in function all>, │ │
- │ │ │ │ 'any': <built-in function any>, │ │
- │ │ │ │ ... +148 │ │
- │ │ │ }, │ │
- │ │ │ 'annotations': _Feature((3, 7, 0, 'beta', 1), None, 16777216), │ │
- │ │ │ 'threading': <module 'threading' from │ │
- │ │ '/usr/local/lib/python3.12/threading.py'>, │ │
- │ │ │ ... +26 │ │
- │ │ } │ │
- │ │ json_encoders = {} │ │
- │ │ localns = {} │ │
- │ │ model = <class 'langsmith.schemas.Example'> │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/pydantic/v1/typing.py:520 in update_field_forward_refs │
- │ │
- │ 517 │ prepare = False │
- │ 518 │ if field.type_.__class__ == ForwardRef: │
- │ 519 │ │ prepare = True │
- │ ❱ 520 │ │ field.type_ = evaluate_forwardref(field.type_, globalns, localns or None) │
- │ 521 │ if field.outer_type_.__class__ == ForwardRef: │
- │ 522 │ │ prepare = True │
- │ 523 │ │ field.outer_type_ = evaluate_forwardref(field.outer_type_, globalns, localns or │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ field = ModelField( │ │
- │ │ │ name='runs', │ │
- │ │ │ type=ForwardRef('List[Run]'), │ │
- │ │ │ required=False, │ │
- │ │ │ default_factory='<function list>' │ │
- │ │ ) │ │
- │ │ globalns = { │ │
- │ │ │ '__name__': 'langsmith.schemas', │ │
- │ │ │ '__doc__': 'Schemas for the LangSmith API.', │ │
- │ │ │ '__package__': 'langsmith', │ │
- │ │ │ '__loader__': <_frozen_importlib_external.SourceFileLoader object at │ │
- │ │ 0x7384a8fd4680>, │ │
- │ │ │ '__spec__': ModuleSpec(name='langsmith.schemas', │ │
- │ │ loader=<_frozen_importlib_external.SourceFileLoader object at 0x7384a8fd4680>, │ │
- │ │ origin='/app/.venv/lib/python3.12/site-packages/langsmith/schemas.py'), │ │
- │ │ │ '__file__': '/app/.venv/lib/python3.12/site-packages/langsmith/schemas.py', │ │
- │ │ │ '__cached__': │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/langsmith/__pycache__/schemas.cpython-3… │ │
- │ │ │ '__builtins__': { │ │
- │ │ │ │ '__name__': 'builtins', │ │
- │ │ │ │ '__doc__': 'Built-in functions, types, exceptions, and other │ │
- │ │ objects.\n\nThis module provides '+346, │ │
- │ │ │ │ '__package__': '', │ │
- │ │ │ │ '__loader__': <class '_frozen_importlib.BuiltinImporter'>, │ │
- │ │ │ │ '__spec__': ModuleSpec(name='builtins', loader=<class │ │
- │ │ '_frozen_importlib.BuiltinImporter'>, origin='built-in'), │ │
- │ │ │ │ '__build_class__': <built-in function __build_class__>, │ │
- │ │ │ │ '__import__': <built-in function __import__>, │ │
- │ │ │ │ 'abs': <built-in function abs>, │ │
- │ │ │ │ 'all': <built-in function all>, │ │
- │ │ │ │ 'any': <built-in function any>, │ │
- │ │ │ │ ... +148 │ │
- │ │ │ }, │ │
- │ │ │ 'annotations': _Feature((3, 7, 0, 'beta', 1), None, 16777216), │ │
- │ │ │ 'threading': <module 'threading' from │ │
- │ │ '/usr/local/lib/python3.12/threading.py'>, │ │
- │ │ │ ... +26 │ │
- │ │ } │ │
- │ │ localns = {} │ │
- │ │ prepare = True │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- │ │
- │ /app/.venv/lib/python3.12/site-packages/pydantic/v1/typing.py:66 in evaluate_forwardref │
- │ │
- │ 63 │ def evaluate_forwardref(type_: ForwardRef, globalns: Any, localns: Any) -> Any: │
- │ 64 │ │ # Even though it is the right signature for python 3.9, mypy complains with │
- │ 65 │ │ # `error: Too many arguments for "_evaluate" of "ForwardRef"` hence the cast... │
- │ ❱ 66 │ │ return cast(Any, type_)._evaluate(globalns, localns, set()) │
- │ 67 │
- │ 68 │
- │ 69 if sys.version_info < (3, 9): │
- │ │
- │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
- │ │ globalns = { │ │
- │ │ │ '__name__': 'langsmith.schemas', │ │
- │ │ │ '__doc__': 'Schemas for the LangSmith API.', │ │
- │ │ │ '__package__': 'langsmith', │ │
- │ │ │ '__loader__': <_frozen_importlib_external.SourceFileLoader object at │ │
- │ │ 0x7384a8fd4680>, │ │
- │ │ │ '__spec__': ModuleSpec(name='langsmith.schemas', │ │
- │ │ loader=<_frozen_importlib_external.SourceFileLoader object at 0x7384a8fd4680>, │ │
- │ │ origin='/app/.venv/lib/python3.12/site-packages/langsmith/schemas.py'), │ │
- │ │ │ '__file__': '/app/.venv/lib/python3.12/site-packages/langsmith/schemas.py', │ │
- │ │ │ '__cached__': │ │
- │ │ '/app/.venv/lib/python3.12/site-packages/langsmith/__pycache__/schemas.cpython-3… │ │
- │ │ │ '__builtins__': { │ │
- │ │ │ │ '__name__': 'builtins', │ │
- │ │ │ │ '__doc__': 'Built-in functions, types, exceptions, and other │ │
- │ │ objects.\n\nThis module provides '+346, │ │
- │ │ │ │ '__package__': '', │ │
- │ │ │ │ '__loader__': <class '_frozen_importlib.BuiltinImporter'>, │ │
- │ │ │ │ '__spec__': ModuleSpec(name='builtins', loader=<class │ │
- │ │ '_frozen_importlib.BuiltinImporter'>, origin='built-in'), │ │
- │ │ │ │ '__build_class__': <built-in function __build_class__>, │ │
- │ │ │ │ '__import__': <built-in function __import__>, │ │
- │ │ │ │ 'abs': <built-in function abs>, │ │
- │ │ │ │ 'all': <built-in function all>, │ │
- │ │ │ │ 'any': <built-in function any>, │ │
- │ │ │ │ ... +148 │ │
- │ │ │ }, │ │
- │ │ │ 'annotations': _Feature((3, 7, 0, 'beta', 1), None, 16777216), │ │
- │ │ │ 'threading': <module 'threading' from │ │
- │ │ '/usr/local/lib/python3.12/threading.py'>, │ │
- │ │ │ ... +26 │ │
- │ │ } │ │
- │ │ localns = None │ │
- │ │ type_ = ForwardRef('List[Run]') │ │
- │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
- TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
Add Comment
Please, Sign In to add comment