MCPcopy Create free account
hub / github.com/MoonshotAI/checkpoint-engine / update

Function update

checkpoint_engine/api.py:96–106  ·  view source on GitHub ↗
(checkpoint_name: str, req: UpdateRequest)

Source from the content-addressed store, hash-verified

94
95 @app.post("/v1/checkpoints/{checkpoint_name}/update")
96 async def update(checkpoint_name: str, req: UpdateRequest) -> Response:
97 def update_func(socket_paths: list[tuple[str, str]]):
98 if req.update_url is None:
99 return
100 if req.inference_group_ranks:
101 socket_paths = [socket_paths[i] for i in req.inference_group_ranks]
102 request_inference_to_update(
103 req.update_url, dict(socket_paths), timeout=req.timeout, uds=req.uds
104 )
105
106 return wrap_exception(lambda: ps.update(checkpoint_name, update_func, ranks=req.ranks))
107
108 return app

Callers

nothing calls this directly

Calls 2

wrap_exceptionFunction · 0.85
updateMethod · 0.80

Tested by

no test coverage detected