mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-28 13:00:02 +00:00
chore: Import cloudpickle Optional
This commit is contained in:
@@ -36,7 +36,7 @@ def initialize_components(
|
||||
system_app.register(
|
||||
DefaultExecutorFactory, max_workers=param.default_thread_pool_size
|
||||
)
|
||||
system_app.register(DefaultScheduler)
|
||||
system_app.register(DefaultScheduler, scheduler_enable=CFG.SCHEDULER_ENABLED)
|
||||
system_app.register_instance(controller)
|
||||
system_app.register(ConnectorManager)
|
||||
|
||||
|
@@ -2,12 +2,12 @@ import inspect
|
||||
from io import StringIO
|
||||
from typing import Any, Dict, Optional, TextIO
|
||||
|
||||
import cloudpickle
|
||||
|
||||
|
||||
def check_serializable(
|
||||
obj: Any, obj_name: str = "Object", error_msg: str = "Object is not serializable"
|
||||
):
|
||||
import cloudpickle
|
||||
|
||||
try:
|
||||
cloudpickle.dumps(obj)
|
||||
except Exception as e:
|
||||
@@ -27,6 +27,8 @@ class SerializabilityInspector:
|
||||
self.stream.write(f"{indent}{message}\n")
|
||||
|
||||
def inspect(self, obj: Any, name: str, depth: int = 3) -> bool:
|
||||
import cloudpickle
|
||||
|
||||
self.log(f"Inspecting '{name}'")
|
||||
self.indent_level += 1
|
||||
|
||||
|
Reference in New Issue
Block a user