Skip to content

proxystore.store.endpoint

EndpointStore Implementation.

EndpointStore

EndpointStore(
    name: str,
    endpoints: Sequence[str | uuid.UUID],
    proxystore_dir: str | None = None,
    *,
    serializer: SerializerT | None = None,
    deserializer: DeserializerT | None = None,
    cache_size: int = 16,
    metrics: bool = False
) -> None

Bases: Store[EndpointConnector]

Store wrapper for ProxyStore Endpoints.

Warning

This wrapper exists for backwards compatibility with ProxyStore <=0.4.* and will be deprecated in version 0.6.0.

Parameters:

  • name (str) –

    Name of the store instance (default: None).

  • endpoints (Sequence[str | uuid.UUID]) –

    Sequence of valid and running endpoint UUIDs to use. At least one of these endpoints must be accessible by this process.

  • proxystore_dir (str | None) –

    Optionally specify the proxystore home directory. Defaults to [home_dir()[proxystore.utils.home_dir].

  • serializer (SerializerT | None) –

    Optional callable which serializes the object. If None, the default serializer (serialize()) will be used.

  • deserializer (DeserializerT | None) –

    Optional callable used by the factory to deserialize the byte string. If None, the default deserializer (deserialize()) will be used.

  • cache_size (int) –

    Size of LRU cache (in # of objects). If 0, the cache is disabled. The cache is local to the Python process.

  • metrics (bool) –

    Enable recording operation metrics.

Source code in proxystore/store/endpoint.py
def __init__(
    self,
    name: str,
    endpoints: Sequence[str | uuid.UUID],
    proxystore_dir: str | None = None,
    *,
    serializer: SerializerT | None = None,
    deserializer: DeserializerT | None = None,
    cache_size: int = 16,
    metrics: bool = False,
) -> None:
    warnings.warn(
        'The EndpointStore will be deprecated in v0.6.0. Initializing a '
        'Store with a Connector is preferred. See '
        'https://github.com/proxystore/proxystore/issues/214 for details.',
        DeprecationWarning,
        stacklevel=2,
    )
    connector = EndpointConnector(
        endpoints=endpoints,
        proxystore_dir=proxystore_dir,
    )
    super().__init__(
        name,
        connector,
        serializer=serializer,
        deserializer=deserializer,
        cache_size=cache_size,
        metrics=metrics,
    )