3232 OSSMountConfig ,
3333 PageableInput ,
3434 PolarFsConfig ,
35- SandboxInput ,
3635 TemplateInput ,
3736)
3837from agentrun .utils .config import Config
@@ -499,7 +498,6 @@ async def create_sandbox_async(
499498 self ,
500499 template_name : str ,
501500 sandbox_idle_timeout_seconds : Optional [int ] = 600 ,
502- sandbox_id : Optional [str ] = None ,
503501 nas_config : Optional [NASConfig ] = None ,
504502 oss_mount_config : Optional [OSSMountConfig ] = None ,
505503 polar_fs_config : Optional [PolarFsConfig ] = None ,
@@ -510,7 +508,6 @@ async def create_sandbox_async(
510508 Args:
511509 template_name: 模板名称 / Template name
512510 sandbox_idle_timeout_seconds: 沙箱空闲超时时间(秒) / Sandbox idle timeout (seconds)
513- sandbox_id: 沙箱 ID(可选) / Sandbox ID (optional)
514511 nas_config: NAS 配置 / NAS configuration
515512 oss_mount_config: OSS 挂载配置 / OSS mount configuration
516513 polar_fs_config: PolarFS 配置 / PolarFS configuration
@@ -539,7 +536,6 @@ async def create_sandbox_async(
539536 result = await self .__sandbox_data_api .create_sandbox_async (
540537 template_name = template_name ,
541538 sandbox_idle_timeout_seconds = sandbox_idle_timeout_seconds ,
542- sandbox_id = sandbox_id ,
543539 nas_config = nas_config_dict ,
544540 oss_mount_config = oss_mount_config_dict ,
545541 polar_fs_config = polar_fs_config_dict ,
@@ -564,7 +560,6 @@ def create_sandbox(
564560 self ,
565561 template_name : str ,
566562 sandbox_idle_timeout_seconds : Optional [int ] = 600 ,
567- sandbox_id : Optional [str ] = None ,
568563 nas_config : Optional [NASConfig ] = None ,
569564 oss_mount_config : Optional [OSSMountConfig ] = None ,
570565 polar_fs_config : Optional [PolarFsConfig ] = None ,
@@ -575,7 +570,6 @@ def create_sandbox(
575570 Args:
576571 template_name: 模板名称 / Template name
577572 sandbox_idle_timeout_seconds: 沙箱空闲超时时间(秒) / Sandbox idle timeout (seconds)
578- sandbox_id: 沙箱 ID(可选) / Sandbox ID (optional)
579573 nas_config: NAS 配置 / NAS configuration
580574 oss_mount_config: OSS 挂载配置 / OSS mount configuration
581575 polar_fs_config: PolarFS 配置 / PolarFS configuration
@@ -604,7 +598,6 @@ def create_sandbox(
604598 result = self .__sandbox_data_api .create_sandbox (
605599 template_name = template_name ,
606600 sandbox_idle_timeout_seconds = sandbox_idle_timeout_seconds ,
607- sandbox_id = sandbox_id ,
608601 nas_config = nas_config_dict ,
609602 oss_mount_config = oss_mount_config_dict ,
610603 polar_fs_config = polar_fs_config_dict ,
@@ -625,62 +618,6 @@ def create_sandbox(
625618 data = result .get ("data" , {})
626619 return Sandbox .model_validate (data , by_alias = True )
627620
628- async def create_sandbox_with_input_async (
629- self ,
630- input : SandboxInput ,
631- config : Optional [Config ] = None ,
632- ) -> Sandbox :
633- """使用 SandboxInput 创建 Sandbox(异步) / Create Sandbox with SandboxInput (async)
634-
635- Args:
636- input: Sandbox 创建配置 / Sandbox creation configuration
637- config: 配置对象 / Config object
638-
639- Returns:
640- Sandbox: 创建的 Sandbox 对象 / Created Sandbox object
641-
642- Raises:
643- ClientError: 客户端错误 / Client error
644- ServerError: 服务器错误 / Server error
645- """
646- return await self .create_sandbox_async (
647- template_name = input .template_name ,
648- sandbox_idle_timeout_seconds = input .sandbox_idle_timeout_seconds ,
649- sandbox_id = input .sandbox_id ,
650- nas_config = input .nas_config ,
651- oss_mount_config = input .oss_mount_config ,
652- polar_fs_config = input .polar_fs_config ,
653- config = config ,
654- )
655-
656- def create_sandbox_with_input (
657- self ,
658- input : SandboxInput ,
659- config : Optional [Config ] = None ,
660- ) -> Sandbox :
661- """使用 SandboxInput 创建 Sandbox(同步) / Create Sandbox with SandboxInput (async)
662-
663- Args:
664- input: Sandbox 创建配置 / Sandbox creation configuration
665- config: 配置对象 / Config object
666-
667- Returns:
668- Sandbox: 创建的 Sandbox 对象 / Created Sandbox object
669-
670- Raises:
671- ClientError: 客户端错误 / Client error
672- ServerError: 服务器错误 / Server error
673- """
674- return self .create_sandbox (
675- template_name = input .template_name ,
676- sandbox_idle_timeout_seconds = input .sandbox_idle_timeout_seconds ,
677- sandbox_id = input .sandbox_id ,
678- nas_config = input .nas_config ,
679- oss_mount_config = input .oss_mount_config ,
680- polar_fs_config = input .polar_fs_config ,
681- config = config ,
682- )
683-
684621 async def stop_sandbox_async (
685622 self , sandbox_id : str , config : Optional [Config ] = None
686623 ) -> Sandbox :
0 commit comments