proxystore.store.dim.ucx
UCXStore implementation.
UCXStoreKey ¶
Bases: NamedTuple
Key to objects in a MargoStore.
UCXStore ¶
UCXStore(
name: str,
*,
interface: str,
port: int,
cache_size: int = 16,
stats: bool = False
) -> None
Bases: Store[UCXStoreKey]
Implementation for the client-facing component of UCXStore.
This client will initialize a local UCX server (Peer service) to store data to.
Parameters:
-
name
(
str
) –Name of the store instance.
-
interface
(
str
) –The network interface to use.
-
port
(
int
) –The desired port for the UCX server.
-
cache_size
(
int
) –Size of LRU cache (in # of objects). If 0, the cache is disabled. The cache is local to the Python process.
-
stats
(
bool
) –Collect stats on store operations.
Source code in proxystore/store/dim/ucx.py
close ¶
Terminate Peer server process.
Source code in proxystore/store/dim/ucx.py
UCXServer ¶
UCXServer implementation.
Parameters:
Source code in proxystore/store/dim/ucx.py
set ¶
Obtain data from the client and store it in local dictionary.
Parameters:
Returns:
-
Status
–Operation status.
Source code in proxystore/store/dim/ucx.py
get ¶
Return data at a given key back to the client.
Parameters:
-
key
(
str
) –The object key.
Returns:
Source code in proxystore/store/dim/ucx.py
evict ¶
exists ¶
handler
async
¶
Handle endpoint requests.
Parameters:
-
ep
(
ucp.Endpoint
) –The endpoint to communicate with.
Source code in proxystore/store/dim/ucx.py
run
async
¶
Run this UCXServer forever.
Creates a listener for the handler method and waits on SIGINT/TERM events to exit. Also handles cleaning up UCP objects.
Source code in proxystore/store/dim/ucx.py
launch_server ¶
Launch the UCXServer in asyncio.
Parameters:
Source code in proxystore/store/dim/ucx.py
reset_ucp ¶
Hard reset all of UCP.
UCP provides ucp.reset()
; however, this function does not correctly
shutdown all asyncio tasks and readers. This function wraps
ucp.reset()
and additionally removes all readers on the event loop
and cancels/awaits all asyncio tasks.
Source code in proxystore/store/dim/ucx.py
reset_ucp_async
async
¶
Hard reset all of UCP.
UCP provides ucp.reset()
; however, this function does not correctly
shutdown all asyncio tasks and readers. This function wraps
ucp.reset()
and additionally removes all readers on the event loop
and cancels/awaits all asyncio tasks.
Source code in proxystore/store/dim/ucx.py
wait_for_server
async
¶
Wait until the UCXServer responds.
Parameters:
-
host
(
str
) –The host of UCXServer to ping.
-
port
(
int
) –Theport of UCXServer to ping.
-
timeout
(
float
) –The max time in seconds to wait for server response.