@@ -736,7 +736,7 @@ class WorkloadPlan(WorkloadSecurity):
736736 """
737737
738738 resource_key_runtime_env_mapping : dict [str , str ] = field (
739- default_factory = lambda : envs .GPUSTACK_RUNTIME_DEPLOY_MAP_RUNTIME_VISIBLE_DEVICES ,
739+ default_factory = lambda : envs .GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_RUNTIME_VISIBLE_DEVICES ,
740740 )
741741 """
742742 Mapping from resource names to environment variable names for device allocation,
@@ -746,7 +746,7 @@ class WorkloadPlan(WorkloadSecurity):
746746 With privileged mode, the container can access all GPUs even if specified.
747747 """
748748 resource_key_backend_env_mapping : dict [str , list [str ]] = field (
749- default_factory = lambda : envs .GPUSTACK_RUNTIME_DEPLOY_MAP_BACKEND_VISIBLE_DEVICES ,
749+ default_factory = lambda : envs .GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_BACKEND_VISIBLE_DEVICES ,
750750 )
751751 """
752752 Mapping from resource names to environment variable names for device runtime,
@@ -918,8 +918,10 @@ class WorkloadStatus:
918918 Attributes:
919919 name (WorkloadName):
920920 Name for the workload, it should be unique in the deployer.
921- created_at ( str | None) :
921+ created_at str:
922922 Creation time of the workload.
923+ namespace (WorkloadNamespace | None):
924+ Namespace for the workload.
923925 labels (dict[str, str] | None):
924926 Labels for the workload.
925927 executable (list[WorkloadStatusOperation]):
@@ -940,6 +942,10 @@ class WorkloadStatus:
940942 """
941943 Creation time of the workload.
942944 """
945+ namespace : WorkloadNamespace | None = None
946+ """
947+ Namespace for the workload.
948+ """
943949 labels : dict [str , str ] | None = field (default_factory = dict )
944950 """
945951 Labels for the workload.
@@ -978,11 +984,11 @@ def fileno(self) -> int:
978984 raise NotImplementedError
979985
980986 @abstractmethod
981- def read (self , size : int = - 1 ) -> bytes | str | None :
987+ def read (self , size : int = - 1 ) -> bytes | None :
982988 raise NotImplementedError
983989
984990 @abstractmethod
985- def write (self , data : bytes | str ) -> int :
991+ def write (self , data : bytes ) -> int :
986992 raise NotImplementedError
987993
988994 @abstractmethod
@@ -1016,12 +1022,16 @@ def __init__(self):
10161022
10171023 if backend := detect_backend ():
10181024 rk = envs .GPUSTACK_RUNTIME_DETECT_BACKEND_MAP_RESOURCE_KEY .get (backend )
1019- re = envs .GPUSTACK_RUNTIME_DEPLOY_MAP_RUNTIME_VISIBLE_DEVICES .get (rk )
1020- be = envs .GPUSTACK_RUNTIME_DEPLOY_MAP_BACKEND_VISIBLE_DEVICES .get (rk )
1021- if re :
1022- self ._runtime_visible_devices_env_name = re
1023- if be :
1024- self ._backend_visible_devices_env_names = be
1025+ ren = envs .GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_RUNTIME_VISIBLE_DEVICES .get (
1026+ rk ,
1027+ )
1028+ ben = envs .GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_BACKEND_VISIBLE_DEVICES .get (
1029+ rk ,
1030+ )
1031+ if ren :
1032+ self ._runtime_visible_devices_env_name = ren
1033+ if ben :
1034+ self ._backend_visible_devices_env_names = ben
10251035
10261036 @staticmethod
10271037 @abstractmethod
0 commit comments