refactor: Ignore Pydantic deprecation warnings in build_component
This commit is contained in:
parent
17065e4e4a
commit
8d3a175375
1 changed files with 4 additions and 2 deletions
|
|
@ -1,10 +1,12 @@
|
||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import warnings
|
||||||
from typing import TYPE_CHECKING, Any, Type
|
from typing import TYPE_CHECKING, Any, Type
|
||||||
|
|
||||||
import orjson
|
import orjson
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
from pydantic import PydanticDeprecatedSince20
|
||||||
|
|
||||||
from langflow.custom.eval import eval_custom_component_code
|
from langflow.custom.eval import eval_custom_component_code
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
|
|
@ -121,8 +123,8 @@ async def build_component(
|
||||||
):
|
):
|
||||||
# Now set the params as attributes of the custom_component
|
# Now set the params as attributes of the custom_component
|
||||||
custom_component.set_attributes(params)
|
custom_component.set_attributes(params)
|
||||||
|
with warnings.filterwarnings("ignore", category=PydanticDeprecatedSince20):
|
||||||
build_results, artifacts = await custom_component.build_results(vertex)
|
build_results, artifacts = await custom_component.build_results(vertex)
|
||||||
|
|
||||||
return custom_component, build_results, artifacts
|
return custom_component, build_results, artifacts
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue