Update the sandbox pre-installed package and sandbox timeout (#104)

This commit is contained in:
Tianjing Zeng
2026-01-16 16:09:53 +08:00
committed by GitHub
parent bf2d75ff0f
commit 9503bda45d
5 changed files with 9 additions and 26 deletions

View File

@@ -31,7 +31,6 @@ from .ds_agent_utils import (
files_filter_pre_reply_hook,
add_ds_specific_tool,
set_run_ipython_cell,
install_package,
)
from .ds_agent_utils.ds_config import PROMPT_DS_BASE_PATH
@@ -70,7 +69,6 @@ class DataScienceAgent(AliasAgentBase):
state_saving_dir=state_saving_dir,
)
install_package(self.toolkit.sandbox)
set_run_ipython_cell(self.toolkit.sandbox)
self.uploaded_files: List[str] = []

View File

@@ -5,7 +5,6 @@ from .utils import (
model_call_with_retry,
set_run_ipython_cell,
get_prompt_from_file,
install_package,
)
from .ds_toolkit import add_ds_specific_tool
from .prompt_selector import LLMPromptSelector
@@ -19,7 +18,6 @@ __all__ = [
"model_call_with_retry",
"get_prompt_from_file",
"set_run_ipython_cell",
"install_package",
"add_ds_specific_tool",
"LLMPromptSelector",
"files_filter_pre_reply_hook",

View File

@@ -95,21 +95,3 @@ def set_run_ipython_cell(sandbox):
print(
sandbox.call_tool("run_ipython_cell", {"code": summarize_chart_code}),
)
def install_package(sandbox):
pkgs = [
# "pandas",
# "matplotlib",
# "numpy",
# "seaborn",
# "scipy",
# "scikit-learn",
"agentscope",
"qdrant-client",
]
command = f"pip install {' '.join(pkgs)}"
sandbox.call_tool(
name="run_shell_command",
arguments={"command": command},
)

View File

@@ -3,6 +3,9 @@ worker_processes 1;
events { worker_connections 1024; }
http {
proxy_connect_timeout 120s;
proxy_send_timeout 120s;
proxy_read_timeout 120s;
include /etc/nginx/mime.types;
default_type application/octet-stream;

View File

@@ -1,9 +1,9 @@
ipython==8.31.0
fastapi==0.115.6
uvicorn==0.34.0
pydantic==2.10.5
pydantic==2.12.5
requests==2.32.3
mcp==1.9.0
mcp==1.25.0
aiofiles
uv
gitpython
@@ -14,3 +14,5 @@ scikit-learn
scipy
seaborn
matplotlib
agentscope[full]==1.0.11
qdrant-client==1.15.1