完善部分平台治理功能,及修改看板缺陷
This commit is contained in:
@@ -138,6 +138,14 @@ class FakePlatformStore:
|
||||
return dict(u)
|
||||
return None
|
||||
|
||||
def create_session(self, user_id: str) -> dict[str, Any]:
|
||||
import secrets
|
||||
sid = secrets.token_hex(16)
|
||||
return {"session_id": sid, "user_id": user_id}
|
||||
|
||||
def finish_session(self, session_id: str) -> None:
|
||||
pass
|
||||
|
||||
def users(self) -> list[dict[str, Any]]:
|
||||
return [dict(u) for u in self._users]
|
||||
|
||||
@@ -392,12 +400,21 @@ class FakePlatformStore:
|
||||
def tasks(self) -> list[dict[str, Any]]:
|
||||
return self._tasks
|
||||
|
||||
def eval_tasks(self) -> list[dict[str, Any]]:
|
||||
return []
|
||||
|
||||
def compute_nodes(self) -> list[dict[str, Any]]:
|
||||
return self._compute_nodes
|
||||
|
||||
def gpus(self) -> list[dict[str, Any]]:
|
||||
return self._gpus
|
||||
|
||||
def compare_tasks(self) -> list[dict[str, Any]]:
|
||||
return []
|
||||
|
||||
def trained_models(self) -> list[dict[str, Any]]:
|
||||
return []
|
||||
|
||||
def system_info(self) -> dict[str, Any]:
|
||||
return {"cpu": {}, "memory": {}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user