MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / initialize

Method initialize

lightx2v/disagg/mooncake.py:172–181  ·  view source on GitHub ↗

Initialize the mooncake instance.

(
        self,
        local_hostname: str,
        metadata_server: str,
        protocol: str,
        device_name: str,
    )

Source from the content-addressed store, hash-verified

170
171 retry_count = int(os.getenv("MOONCAKE_TRANSFER_RETRY", "5"))
172 retry_backoff_s = float(os.getenv("MOONCAKE_TRANSFER_RETRY_BACKOFF_S", "0.05"))
173 for attempt in range(retry_count + 1):
174 ret = self.engine.transfer_sync_write(session_id, buffer, peer_buffer_address, length)
175 if ret >= 0:
176 return ret
177
178 logger.warning(
179 "Transfer Return Error attempt=%s/%s session=%s src=0x%x dst=0x%x len=%s",
180 attempt + 1,
181 retry_count + 1,
182 session_id,
183 int(buffer),
184 int(peer_buffer_address),

Callers 3

__init__Method · 0.95
mainFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected